Install Boost.Compute on Mac OS - boost

I'm following this link and trying to install Boost Compute on Mac OS. It says it can be installed with make install but I cannot find a Makefile.
I added the path to the boost-compute folder to the header search path in the Xcode project. But now boost-compute is dependent on boost in my computer, and cannot link to the boost already installed.
Thanks in advance.

No it doesn't, it says it's a header-only library that requires no compilation. It also says that :
Boost.Compute is a header-only library, so no linking is required. To use the library just add the include directory to the compilation flags and link with the system's OpenCL library.

Related

What is a .framework file and how can I get it?

I'm attempting to use OpenCV in Xcode. I've installed OpenCV 2.4.12 using Homebrew. The associated files are located in /usr/local/Cellar/opencv.
In the documentation I am instructed to add "opencv2.framework" to my project as a binary library. There is no opencv2.framework file anywhere in my opencv directory.
Do I have to make the .framework file or something?
Explore /System/Library/Frameworks for examples on your OS X system. These are bundles containing headers and the compiled framework binaries. If you don't have a .framework directory in the OpenCV resources that you installed, perhaps you installed the source code and you have to build the framework.

How link OpenSSL's libcrypto.a to Firebreath plugin in XCode

I am newbie. I have compiled OpenSSL's libcrypto.a in shell, but could not link it to my Firebreath plugin.
I have added in CMakeLists.txt:
target_link_libraries(${CURPROJECT} /path/to/libcrypto.a)
But CMake gives error:
Cannot specify link libraries for target
"/path/to/libcrypto.a" which is not build by this project
I am using MacOSX 10.9, XCode 5.1.1, FireBreath 1.7, OpenSSL 1.0.1i.
Please explain to me, how could I link libcrypto.a to my plugin?
Have you already tested the "experimental" built-in openssl support described here:
Firebreath libraries
The error message you're getting indicates that it thinks you're trying to add a link library for the project /path/to/libcrypto.a, not that you are trying to add the link library /path/to/libcrypto.a to the project $(CURPROJECT).
This might be because you need to do ${CURPROJECT} (cmake variables use {} not ()). It could also be that the variable CURPROJECT isn't defined.
Your command is correct, but the parameters you are passing into it are not. You might also consider using find_library to find libcrypto.a.
Of course, with Mac OS you should already have openssl available, so you shouldn't need to specify the path. Also, as #hasa mentioned, you are probably better off just using the firebreath openssl stuff, which is experimental but really just on windows -- mac OS it just uses the existing ones. It's only marked experimental because I'm not willing to provide support for the windows binaries.

Clear CMake's internal cache

I am sure there is a simple command for this.
I had installed opencv 2.4.3 manually in /usr/local.
Then I removed it and installed OpenCV 2.4.5 from the arch community(I am using Arch linux) which gets installed in /usr
Now when I try to use OpenCV in a cmake project, cmake returns the old paths from /usr/local.
I did some digging around and found that if remove "CACHE" from the line:
get_filename_component(OpenCV_CONFIG_PATH ="${CMAKE_CURRENT_LIST_FILE}" PATCH CACHE)
in /usr/share/opencv/OpenCVConfig.cmake I get the correct path.
This points to my question. How do I clear the cmake cache?I am talking about cmake's internal cache not the application's cache which can be deleted by removing CMakeCache.txt. Is there a command? Or where is the cmake cache directory/file located? I am sure there's a simple answer for this.
I know how to set/unset a CACHE variable, but don't know how to clear the complete cache.
The problem was with pkg-config settings. I hadn't removed the old .pc file and adjusted the PKG_CONFIG_PATH. pkg-config was using the opencv.pc file present in /usr/local/lib/pkgconfig rather than the one present in /usr/lib/pkgconfig. There isn't any cache that cmake uses internally, i think.
Recompiling the dependency library solved my problem.
I have a project that depends on Opencv. When I still using Xcode 7.2beta, the path of SDK of MacOSX is "/Applications/xcode7.2beta.app/Content/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk". So, the cmake generated and compiled opencv libraries with MacOSX10.11.sdk under "/Applications/xcode7.2beta.app/".
A few days ago, I upgraded my xcode to 8.0, the new path of xcode and its SDK is "/Applications/xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk". But anyway, when cmake generates my project, the reference to opencv always points to the old xcode.
Later I realized that opencv was generated using the old Xcode, so I re-compiled the opencv with the new Xcode, and my project was compiled correctly.

Building Boost 1.53.0 Boost Log 2.0r862 on OSX 10.8.3

I am working at building Boost 1.53.0 with Boost Log 2.0r862 on Mac OSX 10.8.2 and installed it to a fake root to keep the /usr/lib* and /opt/lib* clean. I built and installed Boost with./bootstrap --prefix=/path/to/myfakerootdirand installed the library with./b2 install
This built and installed successfully; when running cmake on my project it properly detects the library include and lib directory. Yet after it completes building and attempts to run the executable I get
dyld: Library not loaded: libboost_system.dylib
Referenced from: /Users/brad/dev/strata/strataextract/build/Debug/StrataExtractUnitTests
Reason: image not found
Some the possible issues I've researched include:
1.Using otool to change the executable manually (Though it seems like a very "hacky" solution)
2.Use a modified portfile at Github Macports Overlay (Though the current version offered is too old for my project.
3.Multiple build tutorials on Boost, unfortunately most referencing Bjam which from what I
understand is no longer good practice.
I seem to remember of a similar situation requiring me to set relative path to false, but I am unsure how I would do this with Boost + bjam.

Compiling cvblob on OSX does not correctly locate OpenCV libs

I'm having issues with CVBlob locating the OpenCV installation on OSX 10.6. I have patch for the osx install as described in an earlier message on the cvblob wiki. When I run make, the build process immediately complains that it cannot find cv.h or highgui.h and then subsequently fails to locate additional symbols and vars declared in those headers.
The cmake command I am using is :
cmake -DOpenCV_DIR=/usr/local/Cellar/opencv/2.3.1a/ .
I can see that cv.h is contained in the includes directory in that location. I also tried the following cmake command where I specify the location of the OpenCV Cmake info:
cmake -DOpenCV_DIR=/usr/local/share/OpenCV/ .
Neither seems to correctly tell the cvblob installation where OpenCV is located.
Please help!
SR
In later versions of cvBlob, openCV is automatically located. But version 0.10.4 and before expects the openCV directory to be located next to the cvblob directory. Specifically, version 0.10.4 seems to expect the opencv-2.4.9 directory to be next to cvblob. In this version of cvBlob, the -DOpenCV_DIR parameter seems to have no effect on OS X, and this was the only way I could get it working.
Are you working with Xcode?
If so, just add the OpenCV-path to your header search path in your Xcode project.

Resources