Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake caffe vecLib not found OS X El Capitan #4637

Open
JulianBlin opened this issue Aug 26, 2016 · 10 comments
Open

cmake caffe vecLib not found OS X El Capitan #4637

JulianBlin opened this issue Aug 26, 2016 · 10 comments
Labels

Comments

@JulianBlin
Copy link

I've been trying to compile caffe on a mac with El Capitan.

git clone https://github.com/BVLC/caffe
mkdir build
cd build
cmake ..

The result was an error vecLib not found

The issue to solve this is to modify the file in cmake/Modules/FindvecLib.cmake

Line 19, replace
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/

by
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/

Don(t know if you can modify this in the master branch ?

Thanks

@shelhamer
Copy link
Member

It sounds like a more general expression is needed that includes the OS X version number in the search path, be it 10.9, 10.11, or whatever.

Pull requests for build improvements are always welcome. Thanks for noting the issue.

@ghost
Copy link

ghost commented Sep 4, 2016

open the CMakeCache.txt file,
find this line:
//vecLib include directory
vecLib_INCLUDE_DIR:PATH=/System/Library/Frameworks/vecLib.framework/Headers

change to:
//vecLib include directory
vecLib_INCLUDE_DIR:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/vecLib.framework/Headers

work fine for me.

@ledjorge
Copy link

ledjorge commented Oct 31, 2016

The general and correct expression is:

//vecLib include directory
vecLib_INCLUDE_DIR:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/

It works if your system is not broken ;)

@Laknath1996
Copy link

I have the same error popping up. And I using 'make all' command to build instead of 'came'. It gives me the following error.

clang: warning: argument unused during compilation: '-pthread'
ld: framework not found vecLib
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [.build_release/lib/libcaffe.so] Error 1

I changed the line 19 (putting MacOSX.sdk) as @JulianBlin had suggested but it still gives the same error. It would be a great help if someone can help me out. Thanks in advance :)

@jackrex
Copy link

jackrex commented Nov 12, 2017

same error @Laknath1996.
But i solve by reinstall xcode command line tools by xcode-select --install

@Dave1991
Copy link

not found CMakeCache.txt

@rockyzhengwu
Copy link

add to FindvecLib.cmake

set(vecLib_INCLUDE_DIR "PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/vecLib.framework/Headers")

@Tomasmule2015
Copy link

I get another method: cmake/Modules/FindvecLib.cmake
find_path(vecLib_INCLUDE_DIR vecLib.h
DOC "vecLib include directory"
PATHS paths1 paths2 ...
NO_DEFAULT_PATH)

add your path where include vecLib.h to PATHS

@edmund-troche
Copy link

edmund-troche commented Sep 21, 2019

In case this helps anyone, for macOS 10.14.6 (Mojave), I added /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Versions/Current/Headers/ to the find_path, like this:

find_path(vecLib_INCLUDE_DIR vecLib.h
          DOC "vecLib include directory"
          PATHS /System/Library/${__veclib_include_suffix}
                /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Versions/Current/Headers/
                /System/Library/Frameworks/Accelerate.framework/Versions/Current/${__veclib_include_suffix}
                /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/)

and it worked for me.

@HasanBank
Copy link

open the CMakeCache.txt file,
find this line:
//vecLib include directory
vecLib_INCLUDE_DIR:PATH=/System/Library/Frameworks/vecLib.framework/Headers

change to:
//vecLib include directory
vecLib_INCLUDE_DIR:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/vecLib.framework/Headers

work fine for me.

I don't have Xcode.app in the Applications folder. Should I install it?
When I write xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
returns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants