Can not cross-compile to 32bit on x64 debian buster
Closed this issue · 1 comments
t-b commented
Due to #783 I would like to add a CI job which ensures that it compiles on 32bit.
But I'm failing here with
cmake -DCMAKE_VERBOSE_MAKEFILE=TRUE -DCMAKE_CXX_FLAGS="-m32" .. && make
which gives
[ 33%] Building CXX object cpp_test_suite/cxxtest/CMakeFiles/cxx_nan_inf_in_prop.dir/cxx_nan_inf_in_prop.cpp.o
cd /home/firma/devel/cppTango/build/cpp_test_suite/cxxtest && /usr/bin/c++ -DVALGRIND -D_FORTIFY_SOURCE=2 -D_PTHREADS -D_REENTRANT -I/home/firma/devel/cppTango/cppapi/client -I/home/firma/devel/cppTango/cppapi/client/helpers -I/home/firma/devel/cppTango/cppapi/server -I/home/firma/devel/cppTango/cppapi/server/idl -I/home/firma/devel/cppTango/log4tango/include -I/home/firma/devel/cppTango/build/cppapi/server -I/home/firma/devel/cppTango/build/log4tango/include -I/home/firma/devel/cppTango/cpp_test_suite/cxxtest/include -I/home/firma/devel/cppTango/build/cpp_test_suite/cxxtest/include -I/usr/include/pgm-5.2 -m32 -O0 -g -fstack-protector-strong -isystem /usr/include/mit-krb5 -D__x86_64__ -D__linux__ -D__OSVERSION__=2 -std=c++14 -o CMakeFiles/cxx_nan_inf_in_prop.dir/cxx_nan_inf_in_prop.cpp.o -c /home/firma/devel/cppTango/cpp_test_suite/cxxtest/cxx_nan_inf_in_prop.cpp
In file included from /usr/include/c++/8/chrono:38,
from /usr/include/c++/8/thread:38,
from /home/firma/devel/cppTango/log4tango/include/log4tango/LoggingEvent.hh:33,
from /home/firma/devel/cppTango/log4tango/include/log4tango/Layout.hh:33,
from /home/firma/devel/cppTango/log4tango/include/log4tango/Appender.hh:33,
from /home/firma/devel/cppTango/log4tango/include/log4tango/AppenderAttachable.hh:34,
from /home/firma/devel/cppTango/log4tango/include/log4tango/Logger.hh:37,
from /home/firma/devel/cppTango/cppapi/server/log4tango.h:37,
from /home/firma/devel/cppTango/cppapi/server/tango.h:113,
from /home/firma/devel/cppTango/cpp_test_suite/cxxtest/include/../../new_tests/cxx_common.h:7,
from /home/firma/devel/cppTango/cpp_test_suite/cxxtest/include/../../new_tests/cxx_nan_inf_in_prop.cpp:5,
from /home/firma/devel/cppTango/cpp_test_suite/cxxtest/cxx_nan_inf_in_prop.cpp:29:
/usr/include/c++/8/ratio:214:40: error: static assertion failed: This library calls __builtin_clzll on uintmax_t, which is unsafe on your platform. Please complain to http://gcc.gnu.org/bugzilla/
static_assert(sizeof (uintmax_t) == sizeof (unsigned long long),
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I think our cmake does not really support cross compiling at the moment. Any ideas?
t-b commented
See the PR. Not as easy as I thought, but I have solution which works already locally and can be generalized for other architectures as well.