首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Mac m1上构建存档的英特尔tbb的正确方法是什么?

在Mac m1上构建存档的英特尔tbb的正确方法是什么?
EN

Stack Overflow用户
提问于 2021-10-19 20:27:29
回答 1查看 253关注 0票数 1

最近我一直在尝试为Mac M1编译一个较旧的应用程序,到目前为止,我已经成功地编译和链接了所有的需求,除了最后一个,TBB。

该应用程序使用较旧版本的TBB,即2019_U9 11009。

这是我在Mac M1上使用gmake的尝试:

代码语言:javascript
复制
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'

在这一点上,它将挂起几个小时。

下面是我使用make时发生的情况:

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-10-28 05:10:20

您可以使用以下命令进行尝试:

代码语言:javascript
复制
make arch=arm64 compiler=clang -j 16 

-->您可以通过命令获取arch的值:

代码语言:javascript
复制
/usr/bin/arch

另外请注意,您需要满足下面提到的系统要求:

安装OS X*或macOS*操作系统OS X* 10.11 macOS* 10.12、10.13的系统仅支持使用oneTBB2019u9。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69637282

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档