Blaze libraries compilation error
Hi I'm getting errors making the libraries using gcc on OSX 10.11.5. I've linked the boost include and lib directories and .dylib names in Configfile and run the executable, but receive errors when running make. Errors are typically of the form:
In file included from SystemClock.cpp:48: In file included from /.../blaze-2.5/blaze/util/SystemClock.h:45: /.../blaze-2.5/blaze/util/singleton/Singleton.h:633:7: error: unused typedef 'CONSTRAINT_MUST_BE_DERIVED_FROM_TYPEDEF633' [-Werror,-Wunused-local-typedef] BLAZE_CONSTRAINT_MUST_BE_DERIVED_FROM( T, SingletonType ); ^ /.../blaze-2.5/blaze/util/constraints/DerivedFrom.h:82:7: note: expanded from macro 'BLAZE_CONSTRAINT_MUST_BE_DERIVED_FROM' BLAZE_JOIN( CONSTRAINT_MUST_BE_DERIVED_FROM_TYPEDEF, LINE ) ^ /.../blaze-2.5/blaze/util/Suffix.h:49:28: note: expanded from macro 'BLAZE_JOIN' #define BLAZE_JOIN( X, Y ) BLAZE_DO_JOIN( X, Y ) ^ /.../blaze-2.5/blaze/util/Suffix.h:50:31: note: expanded from macro 'BLAZE_DO_JOIN' #define BLAZE_DO_JOIN( X, Y ) BLAZE_DO_JOIN2(X,Y) ^ /.../blaze-2.5/blaze/util/Suffix.h:51:32: note: expanded from macro 'BLAZE_DO_JOIN2' #define BLAZE_DO_JOIN2( X, Y ) X##Y ^ <scratch space>:220:1: note: expanded from here CONSTRAINT_MUST_BE_DERIVED_FROM_TYPEDEF633 ^
and there are 20 of them before the limit forces the compilation to quit. I've tried with blaze-2.6 and get the same errors, and am also finding the same happens in Ubuntu. I've tried many combinations for the boost directories. Could you please offer some suggestions as to where this is going wrong?
Comments (3)
-
-
-
assigned issue to
-
assigned issue to
-
- changed status to resolved
- Log in to comment
Hi!
Thanks a lot for pointing out this problem. It is caused by the
-Wunused-local-typedefs
flag that has been part of-Wall
since GCC-4.8 (see the GNU compiler options). Unfortunately, until Blaze 2.6 some of the functionality depends on local typedefs, as for instance all compile time constraints. You have several options to resolve the issue:-Wall
flag (not desirable since this also deactivates many other checks);-Wno-unused-local-typedefs
flag;-isystem
instead of-I
when specifying the include path.Alternatively you can also use the latest version of Blaze by cloning the repository. The latest version uses the C++11
static_assert
for compile time constraints, i.e. does not have any unused local typedefs anymore. Note that you will have to use the-std=c++11
flag during compilation.As an additional note: From a user perspective Blaze is a header only library, i.e. you don't have to build the library. It only contains several additional tools for an in-depth debugging of Blaze. We have to admit though that this is not made perfectly clear by the installation instructions. We will update them accordingly in the next release.
We apologize for the inconveniences this problem causes and hope that with the given advice you will be able to use Blaze without further problems.
Best regards,
Klaus!