Closed lzamparo closed 9 years ago
Hi,
I do not have an apple system. But it looks like it was complaining "Undefined symbols for architecture x86_64: "caxpy", " and other blas routines that should be supplied by reference CPU blas library such as ACML. I think the easiest way is to uncheck "BUILD_TEST" from cmake and try again.
thanks, Timmy
On MacOSX systems, you have to have a pre-built version of Accelerate installed to use as reference code. https://github.com/clMathLibraries/clBLAS/blob/master/src/CMakeLists.txt#L125
Yeah, cmake fails to find Accelerate on my system. It also claims not to find boost, though this might just be a bug in the FindBoost cmake routine.
@kknox , I'm new to OSX. Based on this find snippet, it looks as if I do have Accelerate installed
mski1743:/ zamparol$ sudo find . -name Accelerate.h | grep Accelerate.h
Password:
./Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h
./Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h
./Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/Accelerate.framework/Versions/A/Headers/Accelerate.h
./Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Accelerate.framework/Versions/A/Headers/Accelerate.h
./System/Library/Frameworks/Accelerate.framework/Versions/A/Headers/Accelerate.h
^ this last one looks like what I want. How can I make cmake aware of it?
Sometimes, you have to delete the cmakecache.txt file if something changed on your system, like new packages installed. Once the cache is populated, cmake can short-circuit looking anymore.
Other than that, the logic for finding Accelerate is in the find_library call: http://www.cmake.org/cmake/help/v3.2/command/find_library.html
Perhaps you could customize it by providing it a HINTS section.
Another note: as a general rule, for building software from the command line, make sure you have pre-installed the 'apple command line tools': xcode-select --install
It seems cmake wasn't even looking for Accelerate; the block containing this line is not executed. Changing CORR_TEST_WITH_ACML to OFF seemed to work.
IMO, this is a cmake file bug. It's completely un-intuitive for users to have to set this flag on OSX. At the least, there should be an entry in the wiki for building that describes this situation for OSX users. I'm building now, hopefully it succeeds.
Is this issue solved? Can we close it?
I think it is solved, in so far as the build succeeds with CORR_TEST_WITH_ACML set to OFF. I don't think it should be closed until the build docs reflect this for Mac OSX though.
Sorry, I haven't had time to exercise the build much. If it matters, I support closing after a change (or even just a link) in the OSX build docs. If I encounter any other problem I can trace back to this, I'll reopen.
One solution is to add a line of code in cmake to detect if macos then set CORR_TEST_WITH_ACML off. Do you want to take on that and make a pull request?
Submitted.
Can't get a freshly cloned instance to build. The cmake, makefile outputs are here
The problem is unresolved symbols:
Am I not invoking cmake properly for OSX? This same error occurs whether I try cmake with -G "Unix makefiles" or not.