floydhub / dl-docker

An all-in-one Docker image for deep learning. Contains all the popular DL frameworks (TensorFlow, Theano, Torch, Caffe, etc.)
https://www.floydhub.com
3.86k stars 821 forks source link

Unable to build caffee #98

Open aman-subscriptions opened 5 years ago

aman-subscriptions commented 5 years ago

After overcoming initial issues with help from #84 and #86, I'm now stuck at building caffe.

To overcome issue with tornado SSL error, I installed python 2.7.9 as outlined in above mentioned issues. But nwo after fetching caffe source, the make install fails wiht following error:

/usr/bin/ld: /usr/local/lib/libpython2.7.a(object.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libpython2.7.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libcaffe.so.1.0.0] Error 1
make[1]: *** [src/caffe/CMakeFiles/caffe.dir/all] Error 2
make: *** [all] Error 2

The command '/bin/sh -c git clone -b ${CAFFE_VERSION} --depth 1 https://github.com/BVLC/caffe.git /root/caffe && \
 cd /root/caffe && \      
cat python/requirements.txt | xargs -n1 pip install && \
mkdir build && cd build &&  \
cmake -DCPU_ONLY=1 -DBLAS=Open .. && \
make -j"$(nproc)" all &&  \
make install' 
returned a non-zero code: 2

I tried specifying -fPIC flag to cmake as well, but still getting the same error.

OneCodeMonkey commented 5 years ago

just drop it, add some # to some lines. I say if you don't need to install it. This project has long been nobody maintained, so it's hard to solve this...