mvn包错误,因为在制作llvm项目时自动添加-arch x86_64。 M1
当我使用 mvn 包时,我收到如下错误消息:
Determining if the CXX compiler works failed with the following output:
Change Dir: /Users/steven/k/llvm-backend/target/build/CMakeFiles/CMakeTmp
Run Build Command(s):/opt/homebrew/bin/gmake -f Makefile cmTC_81381/fast && /opt/homebrew/bin/gmake -f CMakeFiles/cmTC_81381.dir/build.make CMakeFiles/cmTC_81381.dir/build
gmake[1]: Entering directory '/Users/steven/k/llvm-backend/target/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_81381.dir/testCXXCompiler.cxx.o
/opt/homebrew/opt/llvm/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -MD -MT CMakeFiles/cmTC_81381.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_81381.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_81381.dir/testCXXCompiler.cxx.o -c /Users/steven/k/llvm-backend/target/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTC_81381
/opt/homebrew/Cellar/cmake/3.22.3/bin/cmake -E cmake_link_script CMakeFiles/cmTC_81381.dir/link.txt --verbose=1
/opt/homebrew/opt/llvm/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/homebrew/opt/llvm/lib CMakeFiles/cmTC_81381.dir/testCXXCompiler.cxx.o -o cmTC_81381
ld: warning: ignoring file /opt/homebrew/opt/llvm/lib/libc++.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: in '/opt/homebrew/opt/llvm/lib/libunwind.dylib', building for macOS-x86_64 but attempting to link with file built for macOS-arm64
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_81381.dir/build.make:100: cmTC_81381] Error 1
gmake[1]: Leaving directory '/Users/steven/k/llvm-backend/target/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_81381/fast] Error 2
我已经尝试过
arch arm64 mvn package
,但没有成功。 当我只尝试创建此 Maven 项目的子模块(此错误之一)时,我的 clang++ 工作得很好。
when I'm using mvn package, I got error message like this:
Determining if the CXX compiler works failed with the following output:
Change Dir: /Users/steven/k/llvm-backend/target/build/CMakeFiles/CMakeTmp
Run Build Command(s):/opt/homebrew/bin/gmake -f Makefile cmTC_81381/fast && /opt/homebrew/bin/gmake -f CMakeFiles/cmTC_81381.dir/build.make CMakeFiles/cmTC_81381.dir/build
gmake[1]: Entering directory '/Users/steven/k/llvm-backend/target/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_81381.dir/testCXXCompiler.cxx.o
/opt/homebrew/opt/llvm/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -MD -MT CMakeFiles/cmTC_81381.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_81381.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_81381.dir/testCXXCompiler.cxx.o -c /Users/steven/k/llvm-backend/target/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTC_81381
/opt/homebrew/Cellar/cmake/3.22.3/bin/cmake -E cmake_link_script CMakeFiles/cmTC_81381.dir/link.txt --verbose=1
/opt/homebrew/opt/llvm/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/homebrew/opt/llvm/lib CMakeFiles/cmTC_81381.dir/testCXXCompiler.cxx.o -o cmTC_81381
ld: warning: ignoring file /opt/homebrew/opt/llvm/lib/libc++.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: in '/opt/homebrew/opt/llvm/lib/libunwind.dylib', building for macOS-x86_64 but attempting to link with file built for macOS-arm64
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_81381.dir/build.make:100: cmTC_81381] Error 1
gmake[1]: Leaving directory '/Users/steven/k/llvm-backend/target/build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:127: cmTC_81381/fast] Error 2
I have tried
arch arm64 mvn package
It didn't work.
My clang++ work well when I only try to make the submodule (this error one) of this maven project.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)