Build fails on 64-bit targets due to missing dependencies
jmcph4 opened this issue · comments
As of eb3bd38, the 32-bit test executable target fails on target test_portable_binary_archive_32
on 64-bit platforms, with output:
Scanning dependencies of target test_portable_binary_archive_32
[ 51%] Building CXX object libs/Cereal/unittests/CMakeFiles/test_portable_binary_archive_32.dir/portable_binary_archive.cpp.o
In file included from libs/Cereal/./include/cereal/cereal.hpp:32:0,
from libs/Cereal/./include/cereal/types/memory.hpp:33,
from libs/Cereal/unittests/common.hpp:30,
from libs/Cereal/unittests/portable_binary_archive.hpp:29,
from libs/Cereal/unittests/portable_binary_archive.cpp:28:
/usr/include/c++/6/type_traits:38:28: fatal error: bits/c++config.h: No such file or directory
#include <bits/c++config.h>
^
compilation terminated.
libs/Cereal/unittests/CMakeFiles/test_portable_binary_archive_32.dir/build.make:62: recipe for target 'libs/Cereal/unittests/CMakeFiles/test_portable_binary_archive_32.dir/ portable_binary_archive.cpp.o' failed
make[2]: *** [libs/Cereal/unittests/CMakeFiles/test_portable_binary_archive_32.dir/portable_binary_archive.cpp.o] Error 1
CMakeFiles/Makefile2:1272: recipe for target 'libs/Cereal/unittests/CMakeFiles/test_portable_binary_archive_32.dir/all' failed
make[1]: *** [libs/Cereal/unittests/CMakeFiles/test_portable_binary_archive_32.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
This can be fixed by running
$ sudo apt-get install gcc-multilib g++-multilib
See this Stack Overflow answer for more details.
See #90
Sorry, accidentally closed.
I just tested the dependency using docker, it looks like Cereal tests also depend on boost:
In file included from /limonEngine/libs/Cereal/unittests/boost_variant.hpp:31:0,
from /limonEngine/libs/Cereal/unittests/boost_variant.cpp:28:
/limonEngine/libs/Cereal/./include/cereal/types/boost_variant.hpp:34:10: fatal error: boost/variant.hpp: No such file or directory
#include <boost/variant.hpp>
^~~~~~~~~~~~~~~~~~~
compilation terminated.
Is it possible you have boost installed on your system?
I encountered this error locally as well as I'm on a clean install now but installing Boost fixed it. THe current issue is:
[69%] Building CXX object libs/Cereal/unittests/CMakeFiles/test_structs_specialized.dir/structs_specialized.cpp.o
In file included from libs/Cereal/unittests/structs_specialized.cpp:28:0:
libs/Cereal/unittests/structs_specialized.hpp:67:8: error: ‘struct BogusBasePolymorphic’ has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor]
struct BogusBasePolymorphic
^~~~~~~~~~~~~~~~~~~~
libs/Cereal/unittests/structs_specialized.hpp:155:7: error: base class ‘struct BogusBasePolymorphic’ has accessible non-virtual destructor [-Werror=non-virtual-dtor]
class SpecializedMSplitPolymorphic : public BogusBasePolymorphic
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
libs/Cereal/unittests/structs_specialized.hpp:155:7: error: ‘class SpecializedMSplitPolymorphic’ has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor]
cc1plus: all warnings being treated as errors
libs/Cereal/unittests/CMakeFiles/test_structs_specialized.dir/build.make:62: recipe for target 'libs/Cereal/unittests/CMakeFiles/test_structs_specialized.dir/structs_specialized.cpp.o' failed
make[2]: *** [libs/Cereal/unittests/CMakeFiles/test_structs_specialized.dir/structs_specialized.cpp.o] Error 1
CMakeFiles/Makefile2:2971: recipe for target 'libs/Cereal/unittests/CMakeFiles/test_structs_specialized.dir/all' failed
make[1]: *** [libs/Cereal/unittests/CMakeFiles/test_structs_specialized.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
I think we should disable cereal tests instead of adding dependencies. Let me test it
Hi, I disabled cereal build, and now it works as expected. Can you test?
As side note, I am verifying on travis, not locally, and travis is using 18.04 as latest LTS release.
Closing as (at least with 3375358 - and likely much before this) this is fixed.