Skip to content

ld: file not found: @rpath/CUDA.framework/Versions/A/CUDA for architecture x86_64 #1496

@schuhschuh

Description

@schuhschuh
  • OS X 10.11.5
  • CMake 3.5.2
  • Xcode 7.3.1
  • CUDA SDK 7.5
Ld Xcode/test/Release/memory_lock_cuda normal x86_64
    cd /Users/as12312/Software/ArrayFire
    export MACOSX_DEPLOYMENT_TARGET=10.11
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -L/Users/as12312/Software/ArrayFire/Xcode/test/Release -F/Users/as12312/Software/ArrayFire/Xcode/test/Release -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks -filelist /Users/as12312/Software/ArrayFire/Xcode/test/ARRAYFIRE.build/Release/memory_lock_cuda.build/Objects-normal/x86_64/memory_lock_cuda.LinkFileList -Xlinker -rpath -Xlinker /Users/as12312/Software/ArrayFire/Xcode/src/backend/cuda/Release -Xlinker -rpath -Xlinker /usr/local/cuda/lib -Xlinker -rpath -Xlinker /usr/local/cuda/nvvm/lib -mmacosx-version-min=10.11 -Wl,-search_paths_first -Wl,-headerpad_max_install_names /Users/as12312/Software/ArrayFire/Xcode/src/backend/cuda/Release/libafcuda.3.4.0.dylib /Users/as12312/Software/ArrayFire/Xcode/third_party/gtest/src/googletest-build/Release/libgtest.a /Users/as12312/Software/ArrayFire/Xcode/third_party/gtest/src/googletest-build/Release/libgtest_main.a /usr/local/cuda/lib/libcublas.dylib /usr/local/cuda/lib/libcudart_static.a -Wl,-rpath,/usr/local/cuda/lib /usr/local/cuda/lib/libcusolver.dylib /usr/local/cuda/lib/libcufft.dylib /usr/local/cuda/nvvm/lib/libnvvm.dylib /usr/local/cuda/lib/libcuda.dylib -Xlinker -dependency_info -Xlinker /Users/as12312/Software/ArrayFire/Xcode/test/ARRAYFIRE.build/Release/memory_lock_cuda.build/Objects-normal/x86_64/memory_lock_cuda_dependency_info.dat -o /Users/as12312/Software/ArrayFire/Xcode/test/Release/memory_lock_cuda

ld: file not found: @rpath/CUDA.framework/Versions/A/CUDA for architecture x86_64

Adding -F/Library/Frameworks -Xlinker -framework -Xlinker CUDA to the linker command fixes the issue. Taken from this SO thread.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions