View previous topic :: View next topic |
Author |
Message |
Silent-Hunter Apprentice
Joined: 07 Jul 2013 Posts: 166
|
Posted: Wed Jun 01, 2016 1:22 am Post subject: dev-libs/caffe-9999 |
|
|
I'm trying to play with Google's DeepDream thing, but I am having trouble installing the neural network part.
I found an overlay called maksbotan that has it, but it fails to build.
Code: | >>> Source compiled.
>>> Test phase [not enabled]: dev-libs/caffe-9999
>>> Install caffe-9999 into /var/tmp/portage/dev-libs/caffe-9999/image/ category dev-libs
make -j9 distribute
touch python/caffe/proto/__init__.py
CXX/LD -o python/caffe/_caffe.so python/caffe/_caffe.cpp
x86_64-pc-linux-gnu-g++ -shared -o python/caffe/_caffe.so python/caffe/_caffe.cpp \
-o python/caffe/_caffe.so -pthread -fPIC -DCAFFE_VERSION=0.14.5 -DNDEBUG -DUSE_OPENCV -DUSE_LEVELDB -DUSE_LMDB -DCPU_ONLY -I/var/tmp/portage/dev-libs/caffe-9999/work/caffe-9999/.build_release/src -I./src -I./include -I/var/tmp/portage/dev-libs/caffe-9999/work/caffe-9999/3rdparty -Wall -Wno-sign-compare -L/var/tmp/portage/dev-libs/caffe-9999/work/caffe-9999/.build_release/lib -lcaffe-nv -Wl,-O1 -Wl,--as-needed -L/var/tmp/portage/dev-libs/caffe-9999/work/caffe-9999/.build_release/lib -lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_core -lopencv_hal -lglog -lgflags -lprotobuf -lboost_system -lm -lhdf5_hl -lhdf5 -lleveldb -lsnappy -llmdb -lopencv_core -lopencv_highgui -lopencv_imgproc -lboost_thread -lstdc++ -lcblas -lboost_python -lpython2.7 \
-Wl,-rpath,\$ORIGIN/../../build/lib
PROTOC (python) src/caffe/proto/caffe.proto
protoc --proto_path=src/caffe/proto --python_out=python/caffe/proto src/caffe/proto/caffe.proto
python/caffe/_caffe.cpp:1:52: fatal error: Python.h: No such file or directory
#include <Python.h> // NOLINT(build/include_alpha)
^
compilation terminated.
Makefile:505: recipe for target 'python/caffe/_caffe.so' failed
make: *** [python/caffe/_caffe.so] Error 1
make: *** Waiting for unfinished jobs....
* ERROR: dev-libs/caffe-9999::maksbotan failed (install phase):
* emake failed |
Not sure what to do about this, as I definitely have Python installed. |
|
Back to top |
|
|
ffyring n00b
Joined: 16 Aug 2005 Posts: 63 Location: Stockholm
|
Posted: Tue Aug 23, 2016 8:12 pm Post subject: Re: dev-libs/caffe-9999 |
|
|
Silent-Hunter wrote: | I'm trying to play with Google's DeepDream thing, but I am having trouble installing the neural network part.
I found an overlay called maksbotan that has it, but it fails to build.
Code: | >>> Source compiled.
>>> Test phase [not enabled]: dev-libs/caffe-9999
>>> Install caffe-9999 into /var/tmp/portage/dev-libs/caffe-9999/image/ category dev-libs
make -j9 distribute
touch python/caffe/proto/__init__.py
CXX/LD -o python/caffe/_caffe.so python/caffe/_caffe.cpp
x86_64-pc-linux-gnu-g++ -shared -o python/caffe/_caffe.so python/caffe/_caffe.cpp \
-o python/caffe/_caffe.so -pthread -fPIC -DCAFFE_VERSION=0.14.5 -DNDEBUG -DUSE_OPENCV -DUSE_LEVELDB -DUSE_LMDB -DCPU_ONLY -I/var/tmp/portage/dev-libs/caffe-9999/work/caffe-9999/.build_release/src -I./src -I./include -I/var/tmp/portage/dev-libs/caffe-9999/work/caffe-9999/3rdparty -Wall -Wno-sign-compare -L/var/tmp/portage/dev-libs/caffe-9999/work/caffe-9999/.build_release/lib -lcaffe-nv -Wl,-O1 -Wl,--as-needed -L/var/tmp/portage/dev-libs/caffe-9999/work/caffe-9999/.build_release/lib -lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_core -lopencv_hal -lglog -lgflags -lprotobuf -lboost_system -lm -lhdf5_hl -lhdf5 -lleveldb -lsnappy -llmdb -lopencv_core -lopencv_highgui -lopencv_imgproc -lboost_thread -lstdc++ -lcblas -lboost_python -lpython2.7 \
-Wl,-rpath,\$ORIGIN/../../build/lib
PROTOC (python) src/caffe/proto/caffe.proto
protoc --proto_path=src/caffe/proto --python_out=python/caffe/proto src/caffe/proto/caffe.proto
python/caffe/_caffe.cpp:1:52: fatal error: Python.h: No such file or directory
#include <Python.h> // NOLINT(build/include_alpha)
^
compilation terminated.
Makefile:505: recipe for target 'python/caffe/_caffe.so' failed
make: *** [python/caffe/_caffe.so] Error 1
make: *** Waiting for unfinished jobs....
* ERROR: dev-libs/caffe-9999::maksbotan failed (install phase):
* emake failed |
Not sure what to do about this, as I definitely have Python installed. |
Just want to confirm I have same error as you. |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30905 Location: here
|
Posted: Tue Aug 23, 2016 9:06 pm Post subject: |
|
|
A dirty workaround is to change, in ebuild, this code:
Code: | if use python; then
python_export PYTHON_INCLUDEDIR PYTHON_SITEDIR PYTHON_LIBPATH
cat >> Makefile.config << EOF
PYTHON_INCLUDE := "${PYTHON_INCLUDEDIR}" "${PYTHON_SITEDIR}/numpy/core/include"
PYTHON_LIB := "$(dirname ${PYTHON_LIBPATH})"
WITH_PYTHON_LAYER := 1
INCLUDE_DIRS += \$(PYTHON_INCLUDE)
LIBRARY_DIRS += \$(PYTHON_LIB)
EOF
local py_version=${EPYTHON#python}
sed -e "/PYTHON_LIBRARIES/s/python\s/python-${py_version} /g" \
-i Makefile || die "sed failed"
fi |
with
Code: | python_export PYTHON_INCLUDEDIR PYTHON_SITEDIR PYTHON_LIBPATH
cat >> Makefile.config << EOF
PYTHON_INCLUDE := "${PYTHON_INCLUDEDIR}" "${PYTHON_SITEDIR}/numpy/core/include"
PYTHON_LIB := "$(dirname ${PYTHON_LIBPATH})"
WITH_PYTHON_LAYER := 1
INCLUDE_DIRS += \$(PYTHON_INCLUDE)
LIBRARY_DIRS += \$(PYTHON_LIB)
EOF
local py_version=${EPYTHON#python}
sed -e "/PYTHON_LIBRARIES/s/python\s/python-${py_version} /g" \
-i Makefile || die "sed failed"
|
(remove if) _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|