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

attempting to build cpu-only on OSX 10.10 #30

Open
cmyr opened this issue Jan 5, 2015 · 1 comment
Open

attempting to build cpu-only on OSX 10.10 #30

cmyr opened this issue Jan 5, 2015 · 1 comment

Comments

@cmyr
Copy link

cmyr commented Jan 5, 2015

Been playing around with this a little bit and wanted to open an issue in case anyone else is doing the same. This assumes you're using homebrew.

current progress:

  • openCV must be version 3.0. by default homebrew installs 2.4.9; this can be fixed by doing brew uninstall opencv && brew install --devel opencv.
  • you apparently need to run make in convnet/eigenmat before convnet/apps/cpu
  • you need to add the following two arguments to your makefile's CPPFlags: -D_XOPEN_SOURCE=600 -D_DARWIN_C_SOURCE
  • as part of the transition away from gcc, OSX now ships with both /usr/bin/gcc and /usr/bin/g++ symlined to clang. You need to download gcc (homebrew, again) and then either specify the correct compiler in your makefile (probably best, but i'm not sure quite how this works) or else modify your path so that you're pointing at the correct gcc/g++.
  • you may need to explicitly add #include <stdlib.h> to the top of CPUMatrix.h
  • you need to manually link in the X11 headers (assumes you have xcode + the command line tools installed) ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers/X11/ /usr/local/include/X11

now however I'm getting a bunch of errors in Cimg:

../..//deps/CImg/CImg.h: In constructor 'cimg_library::cimg::X11_info::X11_info()': ../..//deps/CImg/CImg.h:2527:22: error: 'XInitThreads' was not declared in this scope XInitThreads(); ^ ../..//deps/CImg/CImg.h: In static member function 'static int cimg_library::CImgDisplay::screen_width()': ../..//deps/CImg/CImg.h:7308:45: error: 'XOpenDisplay' was not declared in this scope Display *const _dpy = XOpenDisplay(0); ^ ../..//deps/CImg/CImg.h:7312:27: error: 'XCloseDisplay' was not declared in this scope XCloseDisplay(_dpy);

I'm going to step away for a bit, but if anyone else has gotten this working I'd be happy to hear from you.

@avdmitry
Copy link
Contributor

avdmitry commented Jan 6, 2015

@cmyr,

to avoid errors with X11 & Cimg you can try to use PR: #16 (it has not been merged yet) It completely replace CImg with opencv.

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

No branches or pull requests

2 participants