Reputation: 101
Recently I have been trying to compile an older application for Mac M1, I have so far been successful in compiling and linking all requirements except for the last, TBB.
The application uses an older version of TBB, 2019_U9 11009.
Here is my attempt to make it using gmake on Mac M1:
oneTBB-2019_U9 ❯ gmake --debug=v
GNU Make 4.3
Built for arm-apple-darwin20.2.0
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Reading makefile 'Makefile'...
Reading makefile 'build/common.inc' (search path) (no ~ expansion)...
Reading makefile 'build/macos.inc' (search path) (no ~ expansion)...
Updating makefiles....
Updating goal targets....
Considering target file 'default'.
File 'default' does not exist.
Considering target file 'tbb'.
File 'tbb' does not exist.
Considering target file 'mkdir'.
File 'mkdir' does not exist.
Finished prerequisites of target file 'mkdir'.
Must remake target 'mkdir'.
Created ./build/macos_ia32_clang_cc_os11.3.1_release and ..._debug directories
Successfully remade target file 'mkdir'.
Finished prerequisites of target file 'tbb'.
Must remake target 'tbb'.
gmake -C "./build/macos_ia32_clang_cc_os11.3.1_debug" -r -f ../../build/Makefile.tbb cfg=debug
GNU Make 4.3
Built for arm-apple-darwin20.2.0
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Reading makefile '../../build/Makefile.tbb'...
Reading makefile '../../build/common.inc' (search path) (no ~ expansion)...
Reading makefile '../../build/macos.inc' (search path) (no ~ expansion)...
Reading makefile '../../build/macos.clang.inc' (search path) (no ~ expansion)...
gmake[1]: Entering directory '/Users/trisimix/Hacking/ikos/tbb/oneTBB-2019_U9/build/macos_ia32_clang_cc_os11.3.1_debug'
At this point it will hang for hours.
Here is what happens with I use make:
oneTBB-2019_U9 ❯ make
Created ./build/macos_ia32_clang_cc_os11.3.1_release and ..._debug directories
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C "./build/macos_ia32_clang_cc_os11.3.1_debug" -r -f ../../build/Makefile.tbb cfg=debug
../../build/Makefile.tbb:28: CONFIG: cfg=debug arch=ia32 compiler=clang target=macos runtime=cc_os11.3.1
clang++ -fPIC -o libtbb_debug.dylib concurrent_hash_map.o concurrent_queue.o concurrent_vector.o dynamic_link.o itt_notify.o cache_aligned_allocator.o pipeline.o queuing_mutex.o queuing_rw_mutex.o reader_writer_lock.o spin_rw_mutex.o x86_rtm_rw_mutex.o spin_mutex.o critical_section.o mutex.o recursive_mutex.o condition_variable.o tbb_thread.o concurrent_monitor.o semaphore.o private_server.o rml_tbb.o tbb_misc.o tbb_misc_ex.o task.o task_group_context.o governor.o market.o arena.o scheduler.o observer_proxy.o tbb_statistics.o tbb_main.o concurrent_vector_v2.o concurrent_queue_v2.o spin_rw_mutex_v2.o task_v2.o -ldl -lpthread -dynamiclib -install_name @rpath/libtbb_debug.dylib -stdlib=libc++ -m32 -mmacosx-version-min=10.11 -Wl,-exported_symbols_list,tbb.def
ld: unknown/unsupported architecture name for: -arch armv4t
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [libtbb_debug.dylib] Error 1
make: *** [tbb] Error 2
Upvotes: 1
Views: 1462
Reputation: 166
You can give it a try with the below command:
make arch=arm64 compiler=clang -j 16
-->You can get the "arch" value from the command :
/usr/bin/arch
Also please note that you need to meet the system requirements as mentioned below:
Systems with OS X* or macOS* operating systems OS X* 10.11 macOS* 10.12, 10.13 are only supported for using oneTBB2019u9.
Upvotes: 2