bolero-MURAKAMI / Sprout

C++11/14 constexpr based Containers, Algorithms, Random numbers, Parsing, Ray tracing, Synthesizer, and others.
http://bolero-murakami.github.io/Sprout/
Boost Software License 1.0
876 stars 48 forks source link

Error building in archlinux 64 bit with gcc 6.3 #87

Open alexbaroni opened 7 years ago

alexbaroni commented 7 years ago

Hi I have an error (see below) building sprout with gcc6.3 on archlinux 64 bit: (out of source build) [derkalt@Arch64 Sprout]$ cmake -G "Unix Makefiles" ../../lib/Sprout -- The C compiler identification is Clang 3.9.1 -- The CXX compiler identification is Clang 3.9.1 -- Check for working C compiler: /usr/bin/clang -- Check for working C compiler: /usr/bin/clang -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/clang++ -- Check for working CXX compiler: /usr/bin/clang++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") -- Boost version: 1.63.0 -- Checking for module 'opencv' -- Found opencv, version 3.2.0 -- Configuring done -- Generating done -- Build files have been written to: /home/derkalt/build/Sprout [derkalt@Arch64 Sprout]$ make Scanning dependencies of target libs_algorithm_test_upper_bound [ 0%] Building CXX object libs/algorithm/test/CMakeFiles/libs_algorithm_test_upper_bound.dir/upper_bound.cpp.o In file included from /home/derkalt/lib/Sprout/libs/algorithm/test/upper_bound.cpp:12: In file included from /home/derkalt/lib/Sprout/sprout/array.hpp:14: In file included from /home/derkalt/lib/Sprout/sprout/array/hash.hpp:15: In file included from /home/derkalt/lib/Sprout/sprout/functional/hash.hpp:13: In file included from /home/derkalt/lib/Sprout/sprout/functional/hash/hash_value.hpp:17: In file included from /home/derkalt/lib/Sprout/sprout/functional/hash/detail/hash_float.hpp:15: In file included from /home/derkalt/lib/Sprout/sprout/math/fpclassify.hpp:19: /home/derkalt/lib/Sprout/sprout/math/issubnormal.hpp:44:3: error: expected ')' issubnormal(FloatType x) { ^ /usr/include/math.h:415:41: note: expanded from macro 'issubnormal'

define issubnormal(x) (fpclassify (x) == FP_SUBNORMAL)

                                    ^

/home/derkalt/lib/Sprout/sprout/math/issubnormal.hpp:44:3: note: to match this '(' /usr/include/math.h:415:25: note: expanded from macro 'issubnormal'

define issubnormal(x) (fpclassify (x) == FP_SUBNORMAL)

                    ^

In file included from /home/derkalt/lib/Sprout/libs/algorithm/test/upper_bound.cpp:12: In file included from /home/derkalt/lib/Sprout/sprout/array.hpp:14: In file included from /home/derkalt/lib/Sprout/sprout/array/hash.hpp:15: In file included from /home/derkalt/lib/Sprout/sprout/functional/hash.hpp:13: In file included from /home/derkalt/lib/Sprout/sprout/functional/hash/hash_value.hpp:17: In file included from /home/derkalt/lib/Sprout/sprout/functional/hash/detail/hash_float.hpp:15: In file included from /home/derkalt/lib/Sprout/sprout/math/fpclassify.hpp:19: /home/derkalt/lib/Sprout/sprout/math/issubnormal.hpp:52:22: error: no member named 'issubnormal' in namespace 'sprout::math' using sprout::math::issubnormal;


2 errors generated.
make[2]: *** [libs/algorithm/test/CMakeFiles/libs_algorithm_test_upper_bound.dir/build.make:63: libs/algorithm/test/CMakeFiles/libs_algorithm_test_upper_bound.dir/upper_bound.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:632: libs/algorithm/test/CMakeFiles/libs_algorithm_test_upper_bound.dir/all] Error 2
make: *** [Makefile:139: all] Error 2
[derkalt@Arch64 Sprout]$ ^C
[derkalt@Arch64 Sprout]$ 
KingDuckZ commented 7 years ago

I've also got errors compiling on ARM64 and 32 (Raspberry PI). Just try to compile my project here https://github.com/KingDuckZ/incredis and it fails quite early (inside submodule duckhelper). It may very well be a problem in my code, however I see no issues on x86_64.

bolero-MURAKAMI commented 7 years ago

Workaround was added. (issubnormal definition) https://github.com/bolero-MURAKAMI/Sprout/blob/59054224337259e1ba8150dff888c295b12ac6dc/sprout/math/issubnormal.hpp#L44