This is a followup from Issue #1830 on Github (don't comment there! comment here! :)--I am on OS X Yosemite 10.10, using Anaconda Python, Boost 1.56, OpenCV 2.4.10 (using Homebrew to install everything) and caffe-dev.
I followed the installation instructions on the website for OS X 10.9, but used the new Makefile found in https://github.com/BVLC/caffe/commit/33a56e08d9a2714c2492bb7999a350636ed142be.I am compiling CPU only version, and I do not have CUDA installed.I am able to compile caffe, albeit with the warning/bin/sh: /usr/local/cuda/bin/nvcc: No such file or directory
(standard_in) 1: parse error
because I do not have CUDA. (As I have uncommented the line CPU_ONLY := 1, it seems like it should not be looking for nvidia cuda at all.)However, when I run make runtest, I get the error:[ RUN ] HDF5OutputLayerTest/1.TestForward
Warning! ***HDF5 library version mismatched error***
The HDF5 header files used to compile this application do not match
the version used by the HDF5 library to which this application is linked.
Data corruption or segmentation faults may occur if the application continues.
This can happen when an application was compiled by one version of HDF5 but
linked with a different version of static or shared HDF5 library.
You should recompile the application or check your shared library related
settings such as 'LD_LIBRARY_PATH'.
You can, at your own risk, disable this warning by setting the environment
variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.
Setting it to 2 or higher will suppress the warning messages totally.
Headers are 1.8.13, library is 1.8.14
SUMMARY OF THE HDF5 CONFIGURATION
=================================
General Information:
-------------------
HDF5 Version: 1.8.14
Configured on: Thu Dec 4 22:14:51 GMT 2014
Configured by: br...@miniyosemite.local
Configure mode: production
Host system: i386-apple-darwin14.0.0
Uname information: Darwin miniyosemite.local 14.0.0 Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Byte sex: little-endian
Libraries: static, shared
Installation point: /usr/local/Cellar/hdf5/1.8.14
Some more info...and then:.build_release/test/test_all.testbin 0 --gtest_shuffle --gtest_filter="-*GPU*" && \
.build_release/test/test_all_dynamic_link.testbin 0 --gtest_shuffle --gtest_filter="-*GPU*"
dyld: Library not loaded: libhdf5_hl.8.dylib
Referenced from: /Users/rakelly/caffe-dev/.build_release/test/test_all.testbin
Reason: image not found
/bin/sh: line 1: 30205 Trace/BPT trap: 5 .build_release/test/test_all.testbin 0 --gtest_shuffle --gtest_filter="-*GPU*"
I have tried reinstalling hdf5, and then recompiling Caffe, with the same result.
You received this message because you are subscribed to the Google Groups "Caffe Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to caffe-users+unsubscribe@googlegroups.com.
To post to this group, send email to caffe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/caffe-users/2d928607-5f18-4810-b656-248afadabb77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
cd python; python -m unittest discover -s caffe/test
/bin/sh: line 1: 28149 Segmentation fault: 11 python -m unittest discover -s caffe/test
make: *** [pytest] Error 139
I suspect this is actually a a failure to link masquerading as a seg fault but I am not sure how to debug this.
Any help would be much appreciated.
Thanks.
otool -L python/caffe/_caffe.so
python/caffe/_caffe.so:To unsubscribe from this group and stop receiving emails from it, send an email to caffe-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/caffe-users/CAL1-wrP3e4-sUnRzU-8PhBvZM%3DEa9HWN-Ks5Lf-AOu58%3DeLEZw%40mail.gmail.com.
This verifies the problem, that it's using system python when everything brew installed (opencv, boost, etc.) is installed against brew python.
Maybe I should uninstall everything again, and install against system python?
python/caffe/_caffe.so:
python/caffe/_caffe.so (compatibility version 0.0.0, current version 0.0.0)
/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0)
/usr/local/lib/libglog.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/lib/libgflags.2.dylib (compatibility version 4.0.0, current version 4.0.0)
/usr/local/opt/protobuf/lib/libprotobuf.9.dylib (compatibility version 10.0.0, current version 10.1.0)
/usr/local/lib/libleveldb.1.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libsnappy.1.dylib (compatibility version 4.0.0, current version 4.0.0)
/usr/local/lib/liblmdb.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_system.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libhdf5_hl.9.dylib (compatibility version 10.0.0, current version 10.0.0)
/usr/local/lib/libhdf5.9.dylib (compatibility version 10.0.0, current version 10.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
/usr/local/lib/libopencv_core.2.4.dylib (compatibility version 2.4.0, current version 2.4.10)
/usr/local/lib/libopencv_highgui.2.4.dylib (compatibility version 2.4.0, current version 2.4.10)
/usr/local/lib/libopencv_imgproc.2.4.dylib (compatibility version 2.4.0, current version 2.4.10)
/usr/local/lib/libboost_thread-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/lib/libboost_python.dylib (compatibility version 0.0.0, current version 0.0.0)
/System/Library/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.6)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
Maybe I should uninstall everything again, and install against system python?
INCLUDE_DIRS := /usr/local/include $(PYTHON_INCLUDE)
LIBRARY_DIRS := /usr/local/lib /usr/lib
This is flipped order from the default file, but I think it makes sense given we want brew python.
These settings won't compile unless I add /usr/include/python2.7 to INCLUDE_DIRS which then causes the whole problem since that is system python.
This is the default settings:
# PYTHON_INCLUDE := /usr/include/python2.7 \
# /usr/local/lib/python2.7/site-packages/numpy/core/include
# PYTHON_LIB := /usr/lib
# INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
# LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib
(Side note, it is weird that in the default file, LIBRARY_DIRS is set to /usr/lib:/usr/local/lib:/usr/lib.)
libboost_python.dylib:
/usr/local/lib/libboost_python.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
To unsubscribe from this group and stop receiving emails from it, send an email to caffe-users...@googlegroups.com.
CUDA_VERSION := $(shell $(CUDA_DIR)/bin/nvcc -V | grep -o 'release \d' | grep -o '\d')
233 ifeq ($(OSX), 1)
234 CXX := /usr/bin/clang++
235 ifneq ($(CPU_ONLY), 1)
236 CUDA_VERSION := $(shell $(CUDA_DIR)/bin/nvcc -V | grep -o 'release \d' | grep -o '\d')
237 ifeq ($(shell echo $(CUDA_VERSION) \< 7.0 | bc), 1)
238 CXXFLAGS += -stdlib=libstdc++
239 LINKFLAGS += -stdlib=libstdc++
240 endif
241 endif
To unsubscribe from this group and stop receiving emails from it, send an email to caffe-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/caffe-users/6c442190-2e2f-4054-86d8-4688bcd19067%40googlegroups.com.