Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Linking CXX shared library ../../gnu_14.1_cxx11_32_release/libtbb12.dll #1441

Open
fatduckling opened this issue Jul 5, 2024 · 0 comments
Assignees
Labels

Comments

@fatduckling
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants