Opened 2 years ago

Last modified 2 months ago

#64936 assigned defect

oneTBB @2021.5.0: error: unrecognized command-line option '-mrtm'

Reported by: barracuda156 Owned by: mohd-akram (Mohamed Akram)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: powerpc, snowleopard, rosetta Cc:
Port: onetbb

Description

cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/build/src/tbb && /opt/local/bin/g++-mp-10 -D__TBB_BUILD -D__TBB_USE_ITT_NOTIFY -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/oneTBB-2021.5.0/src/tbb/../../include -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -mmacosx-version-min=10.6 -fPIC -flifetime-dse=1 -Wall -Wextra -Werror -Wfatal-errors -D_XOPEN_SOURCE -mrtm -flto -std=c++11 -MD -MT src/tbb/CMakeFiles/tbb.dir/allocator.cpp.o -MF CMakeFiles/tbb.dir/allocator.cpp.o.d -o CMakeFiles/tbb.dir/allocator.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/oneTBB-2021.5.0/src/tbb/allocator.cpp
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/build/src/tbb && /opt/local/bin/g++-mp-10 -D__TBB_BUILD -D__TBB_USE_ITT_NOTIFY -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/oneTBB-2021.5.0/src/tbb/../../include -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -mmacosx-version-min=10.6 -fPIC -flifetime-dse=1 -Wall -Wextra -Werror -Wfatal-errors -D_XOPEN_SOURCE -mrtm -flto -std=c++11 -MD -MT src/tbb/CMakeFiles/tbb.dir/arena.cpp.o -MF CMakeFiles/tbb.dir/arena.cpp.o.d -o CMakeFiles/tbb.dir/arena.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/oneTBB-2021.5.0/src/tbb/arena.cpp
g++-mp-10: error: unrecognized command-line option '-mrtm'; did you mean '-mhtm'?
g++-mp-10: error: unrecognized command-line option '-mrtm'; did you mean '-mhtm'?
g++-mp-10: error: unrecognized command-line option '-mrtm'; did you mean '-mhtm'?
make[2]: *** [src/tbb/CMakeFiles/tbb.dir/arena.cpp.o] Error 1
make[2]: *** [src/tbb/CMakeFiles/tbb.dir/allocator.cpp.o] Error 1
make[2]: *** [src/tbb/CMakeFiles/tbb.dir/arena_slot.cpp.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/build'
make[1]: *** [src/tbb/CMakeFiles/tbb.dir/all] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/build'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/build'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/build" && /usr/bin/make -j4 -w all VERBOSE=ON 
Exit code: 2

Attachments (1)

main.log (110.2 KB) - added by barracuda156 2 years ago.

Download all attachments as: .zip

Change History (8)

Changed 2 years ago by barracuda156

Attachment: main.log added

comment:1 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to mohd-akram
Status: newassigned
Summary: oneTBB fails on 10.6.8: error: unrecognized command-line option '-mrtm'oneTBB @2021.5.0: error: unrecognized command-line option '-mrtm'

comment:2 Changed 2 years ago by kencu (Ken)

that option is for Intel only, and you’re building as PPC on 10.6.

https://gcc.gnu.org/onlinedocs/gcc/x86-transactional-memory-intrinsics.html

That kind of atypical build is not supported by the MacPorts maintainers, but if you should find a way to fix or patch it to not use that option on PPC then it would probably be accepted, or better pushed upstream.

comment:3 Changed 2 years ago by barracuda156

Apparently the support for 32-bit Darwin was removed, at least partly, since mac32-tbbmalloc-export.def is missing, and the build on PPC fails at that. I have opened a ticket with upstream: https://github.com/oneapi-src/oneTBB/issues/819 If they dismiss it, we can still restore it via a patch, borrowing the file from an earlier source which had it.

comment:4 in reply to:  3 Changed 2 years ago by barracuda156

Replying to barracuda156:

Apparently the support for 32-bit Darwin was removed, at least partly, since mac32-tbbmalloc-export.def is missing, and the build on PPC fails at that. I have opened a ticket with upstream: https://github.com/oneapi-src/oneTBB/issues/819 If they dismiss it, we can still restore it via a patch, borrowing the file from an earlier source which had it.

Anyway, I have fixed it for PPC: https://github.com/macports/macports-ports/pull/14760

Rosetta needs some magic still LOL

comment:5 in reply to:  2 Changed 2 years ago by barracuda156

Replying to kencu:

that option is for Intel only, and you’re building as PPC on 10.6.

Weird that Cmake get the arch correctly, but still uses wrong flags.

--->  Configuring onetbb
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_opentbb/onetbb/work/build" && /opt/local/bin/cmake -G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=MacPorts -DCMAKE_INSTALL_PREFIX="/opt/local" -DCMAKE_INSTALL_NAME_DIR="/opt/local/lib" -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_OBJC_COMPILER="$CC" -DCMAKE_OBJCXX_COMPILER="$CXX" -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_POLICY_DEFAULT_CMP0060=NEW -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_MODULE_PATH="/opt/local/share/cmake/Modules" -DCMAKE_PREFIX_PATH="/opt/local/share/cmake/Modules" -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON -DCMAKE_INSTALL_RPATH="/opt/local/lib" -Wno-dev -DTBB_TEST=OFF -DCMAKE_SYSTEM_PROCESSOR="ppc" -DTBB_STRICT=OFF -DCMAKE_CXX_FLAGS="-latomic" -DCMAKE_OSX_ARCHITECTURES="ppc" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.6" -DCMAKE_OSX_SYSROOT="/" /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_opentbb/onetbb/work/oneTBB-2021.5.0 
  1. S. Removing that parasitic paragraph in GNU.cmake worked:
macmini:~ svacchanda$ port -v installed onetbb
The following ports are currently installed:
  onetbb @2021.5.0_1 (active) requested_variants='' platform='darwin 10' archs='ppc' date='2022-05-05T05:13:49+0800'
Last edited 2 years ago by barracuda156 (previous) (diff)

comment:7 Changed 2 months ago by mohd-akram (Mohamed Akram)

This is fixed and can be closed.

Note: See TracTickets for help on using tickets.