Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dev-libs/caffe-9999
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Silent-Hunter
Apprentice
Apprentice


Joined: 07 Jul 2013
Posts: 166

PostPosted: Wed Jun 01, 2016 1:22 am    Post subject: dev-libs/caffe-9999 Reply with quote

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
View user's profile Send private message
ffyring
n00b
n00b


Joined: 16 Aug 2005
Posts: 63
Location: Stockholm

PostPosted: Tue Aug 23, 2016 8:12 pm    Post subject: Re: dev-libs/caffe-9999 Reply with quote

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
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30905
Location: here

PostPosted: Tue Aug 23, 2016 9:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
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