oneTBB
oneTBB copied to clipboard
Error Linking CXX shared library ../../gnu_14.1_cxx11_32_release/libtbb12.dll
Summary
Hi I'm using mxe to cross compile oneTbb from Debian to Windows. I'm getting the following when compiling the library:
# environment
NM=$MXE_ROOT/usr/bin/i686-w64-mingw32.shared-nm
AR=$MXE_ROOT/usr/bin/i686-w64-mingw32.shared-ar
CC=$MXE_ROOT/usr/bin/i686-w64-mingw32.shared-gcc
CXX=$MXE_ROOT/usr/bin/i686-w64-mingw32.shared-g++
HOST=i686-w64-mingw32.shared
PATH=$MXE_ROOT/usr/bin:$PATH
RANLIB=$MXE_ROOT/usr/bin/i686-w64-mingw32.shared-ranlib
WINDRES=$MXE_ROOT/usr/bin/i686-w64-mingw32.shared-windres
# cmake command
i686-w64-mingw32.shared-cmake
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS="-O3"
-DCMAKE_C_FLAGS="-O3"
-DCMAKE_INSTALL_BINDIR=/tmp/v2021.13.0/build_WINDOWS_X86_32
-DCMAKE_INSTALL_DOCDIR=/tmp/v2021.13.0/build_WINDOWS_X86_32
-DCMAKE_INSTALL_LIBDIR=lib
-DCMAKE_INSTALL_MANDIR=/tmp/v2021.13.0/build_WINDOWS_X86_32
-DCMAKE_INSTALL_PREFIX=$MXE_ROOT/usr/i686-w64-mingw32.shared
# tbb options
-DTBB_TEST=OFF
-DTBB_STRICT=OFF
-DTBB_ENABLE_IPO=ON
-DCMAKE_CROSSCOMPILING=1
-DTBBMALLOC_PROXY_BUILD=OFF
-DTBB_FIND_PACKAGE=ON
-B
/tmp/v2021.13.0/build_WINDOWS_X86_32
/tmp/v2021.13.0
Version
oneTBB 2021.13.0 Latest
Error:
[ 83%] Building CXX object src/tbb/CMakeFiles/tbb.dir/thread_dispatcher.cpp.obj
[ 85%] Building CXX object src/tbb/CMakeFiles/tbb.dir/version.cpp.obj
[ 88%] Building CXX object src/tbb/CMakeFiles/tbb.dir/threading_control.cpp.obj
/opt/mxe/usr/bin/i686-w64-mingw32.shared-ar: CMakeFiles/tbbmalloc.dir/backend.cpp.obj: plugin needed to handle lto object
[ 90%] Building CXX object src/tbb/CMakeFiles/tbb.dir/thread_request_serializer.cpp.obj
[ 92%] Building RC object src/tbb/CMakeFiles/tbb.dir/tbb.rc.res
[ 95%] Building CXX object src/tbb/CMakeFiles/tbb.dir/queuing_rw_mutex.cpp.obj
[ 97%] Building CXX object src/tbb/CMakeFiles/tbb.dir/rtm_rw_mutex.cpp.obj
[100%] Linking CXX shared library ../../gnu_14.1_cxx11_32_release/libtbb12.dll
/opt/mxe/usr/bin/i686-w64-mingw32.shared-ar: CMakeFiles/tbb.dir/address_waiter.cpp.obj: plugin needed to handle lto object
lto1: internal compiler error: in get_token, at opts-common.cc:2146
0x1d3ff5d internal_error(char const*, ...)
???:0
0x72a7d6 fancy_abort(char const*, int, char const*)
???:0
0x76edc0 lto_main()
???:0
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
lto-wrapper: fatal error: /opt/mxe/usr/bin/i686-w64-mingw32.shared-gcc returned 1 exit status
compilation terminated.
I can temporarily fix it by disabling IPO. Any other suggestions?