Hi Andreas, On 08/26/2017 10:08 PM, Andreas Tille wrote: > I moved disulfinder to Git[1] and tried to track down this issue with my > limited C++ knowledge but failed. The issue is > > ... > make[3]: Entering directory '/build/disulfinder-1.2.11/disulfind/src' > g++ -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 > -fdebug-prefix-map=/build/disulfinder-1.2.11=. -fstack-protector-strong > -Wformat -Werror=format-security -DDEFAULT_PKGDATADIR=\"/usr/share/disulfind > In file included from Input/utils.h:1:0, > from Input/GlobalDescriptor.cpp:3: > Input/../Common/Matrix.h: In constructor 'Matrix<DATATYPE>::Matrix(int, int, > DATATYPE*)': > Input/../Common/Matrix.h:208:3: error: 'Exception' has not been declared > Exception::Assert(nrows>0 && ncols>0,"construction of empty matrix"); > ^~~~~~~~~ > Input/../Common/Matrix.h: In constructor 'Matrix<DATATYPE>::Matrix(int, int, > const DATATYPE&)': > Input/../Common/Matrix.h:221:3: error: 'Exception' has not been declared > Exception::Assert(nrows>0 && ncols>0,"construction of empty matrix"); > ^~~~~~~~~ > Input/../Common/Matrix.h: In constructor 'Matrix<DATATYPE>::Matrix(int, int, > DATATYPE**)': > Input/../Common/Matrix.h:232:3: error: 'Exception' has not been declared > Exception::Assert(nrows>0 && ncols>0, "construction of empty matrix"); > ^~~~~~~~~ > Input/../Common/Matrix.h: In member function 'void > Matrix<DATATYPE>::Resize(int, int)': > Input/../Common/Matrix.h:288:3: error: 'Exception' has not been declared > Exception::Assert(nrows>0 && ncols>0, "construction of empty matrix"); > ^~~~~~~~~ > ... > > > As far as I can see Exception is declared in > disulfind/src/Common/Exception.h > which is also included in Matrix.h. > > Any hint what might be wrong here?
Common/Exception.h uses __EXCEPTION_H as its include guard macro name (so that it's included only once) - unfortunately <bits/exception.h> from GCC7 uses the same guard macro name. Hence Common/Exception.h is not actually processed in your case. The bug is in your package, see https://stackoverflow.com/a/228797 for a summary of the rules regarding identifiers in C++; the guard macro name clearly intrudes on the namespace reserved for the compiler. Change the guard macro name to something else, e.g. #ifndef DISULFIND_COMMON_EXCEPTION_H #define DISULFIND_COMMON_EXCEPTION_H and then it should work again in GCC7. Regards, Christian

