hughperkins / DeepCL

OpenCL library to train deep convolutional neural networks
Mozilla Public License 2.0
865 stars 199 forks source link

issues running deepcl_unittests on Mac OSX #111

Closed darksid3r closed 7 years ago

darksid3r commented 7 years ago

I have successfully compiled DeepCL on Mac OSX 10.12 (Sierra). However, when I run deepcl_unittests I get the following error: testjpeghelper.writeread: Wrong JPEG library version: library is 80, caller expects 62 otool reports this: /usr/local/opt/jpeg/lib/libjpeg.8.dylib (compatibility version 13.0.0, current version 13.0.0) I use homebrew to install packages (including libjpeg). Tried 'brew cleanup' and reinstalled libjpeg. Any ideeas?

hughperkins commented 7 years ago

Hmmmm, works for me :-P . And I have Mac Sierra. I have libjpeg in /usr/local/lib:

$ ls /usr/local/lib/*jpeg*
/usr/local/lib/libjpeg.8.dylib  /usr/local/lib/libjpeg.a    /usr/local/lib/libjpeg.dylib

I'm not sure how it got there though. brew doesnt enlighten me:

$ brew list
atk             gsettings-desktop-schemas   mpg123
bazel               gtk+3               mysql
boost               gtk-vnc             nettle
cairo               harfbuzz            openssl
cmake               hicolor-icon-theme      p11-kit
encfs               htop                pango
fontconfig          icu4c               pcre
freetype            isl             pixman
gcc             jpeg                pkg-config
gd              libepoxy            python
gdb             libffi              python3
gdbm                libgcrypt           readline
gdk-pixbuf          libgpg-error            shared-mime-info
gettext             libmpc              sqlite
git             libpng              tcl-tk
glib                libtasn1            webp
gmp             libtiff             wget
gnutls              libtool             xz
gobject-introspection       libunistring
graphviz            mpfr
hughperkins commented 7 years ago

oh wait, jpeg is there, installed via brew. Just jpeg, not libjpeg.

OliverUrbann commented 6 years ago

This usually means that during compilation a jpeglib.h was used that defines a JPEG_LIB_VERSION that does not match the version of the found lib (dylib, .a or whatever). This can happen if you have more than one jpeglib.h on your system. It seems to be a bug in cmake or the configs for cmake that it searches in locations for that header that are not suitable.

In my case it found a jpeglib.h in /Library/Frameworks/Mono.framework and the libjpeg.dylib in /opt/local/lib. So deleting /Library/Frameworks/Mono.framework was a possible solution for me. You can check which jpeglib.h it found in your case by search for jpeglib.h in build/CMakeFiles/DeepCL.dir/CXX.includecache