Skip to content

[Build failed] Building for macOS-arm64 but attempting to link with file built for macOS-x86_64 #59

@anabioticsoul

Description

@anabioticsoul

Hello everyone, I'm new to SVF. I attempted to utilize SVF as an external library in CLion on macOS Monterey, but encountered a cmake failure along with the following log:

It appears that the SVF library is currently available for x86_64 architecture but not for arm64. Would it be possible to provide an arm64 version for macOS? Your assistance would be greatly appreciated! Thank you very much!

====================[ 构建 | svf-ex | Release-Clang-14 ]==========================
/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake --build /Users/xxx/Repositories/git_repos/SVF-example/cmake-build-release-clang-14 --target svf-ex -- -j 6
[ 50%] Linking CXX executable ../bin/svf-ex
ld: warning: ignoring file /Users/xxx/node_modules/svf-lib/SVF-osx/Release-build/svf-llvm/libSvfLLVM.a, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture arm64:
  "SVF::LLVMModuleSet::getSVFValue(llvm::Value const*)", referenced from:
      aliasQuery(SVF::PointerAnalysis*, llvm::Value*, llvm::Value*) in svf-ex.cpp.o
  "SVF::LLVMModuleSet::llvmModuleSet", referenced from:
      aliasQuery(SVF::PointerAnalysis*, llvm::Value*, llvm::Value*) in svf-ex.cpp.o
  "SVF::LLVMModuleSet::LLVMModuleSet()", referenced from:
      aliasQuery(SVF::PointerAnalysis*, llvm::Value*, llvm::Value*) in svf-ex.cpp.o
ld: symbol(s) not found for architecture arm64
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [bin/svf-ex] Error 1
make[2]: *** [src/CMakeFiles/svf-ex.dir/all] Error 2
make[1]: *** [src/CMakeFiles/svf-ex.dir/rule] Error 2
make: *** [svf-ex] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions