make Command
Normally I would do make -j15 but based on a similar problem I found here:
opened 06:50AM - 19 Jul 19 UTC
### Issue summary
After many failed attempts and messed up Linux installations… I've successfully compiled Caffe, Protobuf and DeepDream, just to face an error when running the deepdreaming.py script for the first time. I'm not sure if the Caffe Git is the right place to post this report to, although it looks like an error during import of Caffe - my sincere apologies if I failed to pick the correct Git.
`python deepdreaming.py --help` and other parameters result in the below error message:
> python deepdreaming.py --help
Traceback (most recent call last):
File "deepdreaming.py", line 13, in <module>
import caffe
File "/home/twmlive/deepdream/caffe/python/caffe/__init__.py", line 1, in <module>
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer
File "/home/twmlive/deepdream/caffe/python/caffe/pycaffe.py", line 13, in <module>
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \
ImportError: /lib/x86_64-linux-gnu/librsvg-2.so.2: undefined symbol: cairo_tag_end
### Steps to reproduce
- Open jupyter notebook in DeepDream directory
- Create new terminal
- Run `python deepdreaming.py` with any parameters, eg `--help`
- Also happens outside the notebook
### Steps before steps to reproduce
To be able to run DeepDream with as little interference as possible, I've installed Debian 10 latest from a netinstall USB drive with Debian Desktop Environment, GNOME, MATE and the standard system utilities (in previous attempts I installed MATE only rather than MATE and GNOME and faced the similar issues). After installing and setting up the system with some basic tools (like Timeshift, gparted, gdebi, Handbrake, libdvd-pkg, ffmpeg, Chrome and Opera, ...), I've been following a brief set of instructions found on Knight-of-pi.org to set up DeepDream. Though I had to make a few adjustments that may or may not be related to this:
- ipython notebook doesn't exist anymore, so I had to use jupyter notebook instead
- Makefile.config has been modified
-- Uncomment CPU_Only=1
-- Comment PYTHON_INCLUDE for Python 2.7 (to resolve issue during compilation due to missing numpy)
-- Uncomment ANACONDA_HOME and point to /home/twmlive/anaconda2
-- Uncomment PYTHON_INCLUDE for Anaconda
-- Comment PYTHON_LIB for Python 2.7
-- Uncomment PYTHON_LIB for Anaconda
-- Add the libhdf5-directories mentioned in your common issues section to INCLUDE_DIRS and LIBRARY_DIRS
-- Uncomment USE_PKG_CONFIG := 1 for OpenCV
- libhdf5_hl.so.100 was missing (not sure if it was during `make runtest` or `make pycaffe`, and so was libhdf5.so.103, and a third hdf5-related file I cannot recall the name of anymore. I had to `ln -T` three links in total to the anaconda2-libs in order to solve the issue and get make going.
There was a lot of troubleshooting going on yesterday, so I may have missed one or two details. It was only the compilation process for pycaffe being so difficult, after that everything else worked quite well with barely any trouble. Also, this is probably the 50th attempt (not kidding, since once I mess up I cannot fix it and gotta start over again) in setting up a clean Debian (or other Linux distros) for DeepDream and DeepDreamVideo.
### Tried solutions
- apt reinstall librsvg2-2
- I've also installed a bunch of cairo-related packages, mostly the -dev stuff via atp but cannot recall all the packages
I've also tried to downgrade librsvg2-2 since I read a post about this error popping up a year ago related to some other application on Linux. But I gave up this idea since, according to the forum thread, they figured out it was only happening with a certain version of librsvg and in few environments only, so likely it has nothing to do with the lib but with the environment instead. Anyways, none of the installed packages had an impact on the problem, the error message did not change.
### System configuration
* Operating system: Debian 10 Buster (stable, latest)
* Compiler: gcc (Debian 8.3.0-6) 8.3.0
* CUDA version (if applicable): none
* CUDNN version (if applicable): none
* BLAS: Atlas (default)
* Python version (if using pycaffe): Anaconda 2.7
* MATLAB version (if using matcaffe): none
### Issue checklist
- [x] read the guidelines and removed the first paragraph
- [x] written a short summary and detailed steps to reproduce
- [x] explained how solutions to related problems failed (tick if found none)
- [x] filled system configuration
- [ ] attached relevant logs/config files (tick if not applicable)
I tried using LD_PRELOAD to load in libcairo before the build starts.
I’m not actually sure what I should be passing in here so don’t assume I did this correctly
I assumed that the libcairo2-dev that I installed with apt was the one I should load in.
When I searched I found three libcairo related packages at paths:
/usr/lib/x86_64-linux-gnu/libcairo.so
/usr/lib/x86_64-linux-gnu/libcairo-gobject.so
/usr/lib/x86_64-linux-gnu/libcairo-script-interpreter.so
So I made three separate build attempts with:
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libcairo.so make -j15
LD_PRELOAD=usr/lib/x86_64-linux-gnu/libcairo-gobject.so make -j15
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libcairo-script-interpreter.so make -j15
All of which failed. Again, not even sure if I’m using LD_PRELOAD correctly or if it makes sense for this application.