Having difficulties with install_deps.sh on Kubuntu 18.04

Hello,

I am following the building Blender guide and am trying to use the install_deps.sh script to gather/build some missing dependencies. Currently, I am running into an issue when using the --with-all flag where it runs into an error when trying to build osl. If I use the --skip-osl flag, it will go through, but I would like be able to build with all dependencies properly. I have also tried the --build-all flag, but that fails when trying to build openexr for some reason.

My system is a very fresh install of Kubuntu 18.04, and I have run into similar issues in the past on Solus and Arch. The only time I have had success with the install_deps.sh script was when using KDE Neon (based on Ubuntu 16.04) - that managed to correctly install all deps, but then I ran into an issue with the only available versions of cuda being unsupported, so when I compiled Blender with everything enabled, I ran into a cuda version issue and could not use my GPU for rendering.

I was hoping that someone might be able help me figure out a list of the proper packages on Ubuntu 18.04 (some of the dependency package names are different from what is listed in the guide), and also, give some pointers on how to get osl to compile properly.

Thanks!

Hi. I am here on Kubuntu 18.04 too. About two weeks ago I had some problem with install_deps.sh when it tried to build some dependency, I can not remember which of them.
Currently running “install_deps.sh --with-all” completes the task successfully. About OSL i get:

Own OpenShadingLanguage-1.7.5 is up to date, nothing to do!
If you want to force rebuild of this lib, use the --force-osl option.
Running ldconfig for osl

If I run “./install_deps.sh --force-osl”, it recompiles OSL without errors. So my builds have OSL support.

Could you try again?

1 Like

I’ve also problem with install_deps.sh on arch, I’ve posted it here: LLVM-3.4 failed to compile on Arch

Hey @YAFU ,

Using “./install_deps.sh --force-osl” worked! I think that maybe there is something wrong with the version of some dependent library it uses by default without being forced to build the dependencies for osl manually, since “install_deps.sh” failed by itself and when using the “–with-all” flag initially.

Thanks for your help!

Actually, I may have spoken too soon. Even though osl compiled successfully, I now get a CMake error complaining about not being able to find LLVM when I attempt a “make full.” I also ran “install_deps.sh --force-llvm,” which compiled successfully but the error still persists.

Even so, the output from “install_deps.sh --with-all” does give a make command that works, but I would still like to figure out why “make full” no longer works (it actually worked before when osl would not compile, which seems odd to me…).

Edit: Here is a pastebin link with the output from “make full:” https://pastebin.com/Lr2aWSVc

my personal recipe to end installing dependencies and run own compiled blender

I assume that the library folders are used in the standard path

to avoid strange errors, it is better to start with a clean environment
i delete folder libraries partially compiled in ‘/opt’ by executing this command: sudo -c rm -r /opt/lib/*

after i delete source file in ‘myhome/src/blender-deps’ running this command: rm -r ~/src/blender-deps/*

execute several time ./install_deps.sh with these parameter --with-all --force-all

until you can see an text similar to this before your terminal prompt:

make -j4 BUILD_CMAKE_ARGS="-U SNDFILE -U PYTHON -U BOOST -U Boost -U OPENCOLORIO -U OPENEXR -U OPENIMAGEIO -U LLVM -U CYCLES -U OPENSUBDIV -U OPENVDB -U COLLADA -U FFMPEG -U ALEMBIC -D WITH_CXX11=ON -D WITH_CODEC_SNDFILE=ON -D PYTHON_VERSION=3.6 -D PYTHON_ROOT_DIR=/opt/lib/python-3.6 -D BOOST_ROOT=/opt/lib/boost -D Boost_NO_SYSTEM_PATHS=ON -D WITH_OPENCOLORIO=ON -D OPENCOLORIO_ROOT_DIR=/opt/lib/ocio -D OPENEXR_ROOT_DIR=/opt/lib/openexr -D WITH_OPENIMAGEIO=ON -D OPENIMAGEIO_ROOT_DIR=/opt/lib/oiio -D WITH_CYCLES_OSL=ON -D WITH_LLVM=ON -D LLVM_VERSION=3.4 -D OSL_ROOT_DIR=/opt/lib/osl -D LLVM_ROOT_DIR=/opt/lib/llvm -D LLVM_STATIC=ON -D WITH_OPENSUBDIV=ON -D OPENSUBDIV_ROOT_DIR=/opt/lib/osd -D WITH_OPENVDB=ON -D WITH_OPENVDB_BLOSC=ON -D OPENVDB_ROOT_DIR=/opt/lib/openvdb -D WITH_OPENCOLLADA=ON -D WITH_JACK=ON -D WITH_JACK_DYNLOAD=ON -D WITH_ALEMBIC=ON -D ALEMBIC_ROOT_DIR=/opt/lib/alembic -D WITH_CODEC_FFMPEG=ON -D FFMPEG_LIBRARIES=‘avformat;avcodec;avutil;avdevice;swscale;swresample;lzma;rt;theora;theoradec;theoraenc;vorbis;vorbisenc;vorbisfile;ogg;xvidcore;vpx;mp3lame;x264;openjpeg’ -D FFMPEG=/opt/lib/ffmpeg"

copy and paste your command to compile blender without STATIC LIBRARY linked library, is not needed to add ‘FULL’ as parameter to ‘make’ command

at the end we have blender working on developer workstation, but is not usable to run it on others pc. in my case compiled library take ~1.2 GB in /opt/lib folder and ~1.5 GB of space is occupied in ~/src/blender-deps folder

i hope this working in your case. my apologize for any error and for my poor english
you are free to make constructive comments and correct mistakes

I’m not sure why this is working well for me on Kubuntu 18.04.
Maybe I also had that problem with old LLVM before, and that’s why I installed version from repository. These are the installed packages from repos that I have:

$ sudo dpkg -l | grep -i llvm
ii libc++1:amd64 6.0-2 amd64 LLVM C++ Standard library
ii libc++abi1:amd64 6.0-2 amd64 LLVM low level support for a standard C++ library
ii libllvm5.0:amd64 1:5.0.1-4 amd64 Modular compiler and toolchain technologies, runtime library
ii libllvm6.0:amd64 1:6.0-1ubuntu2 amd64 Modular compiler and toolchain technologies, runtime library
ii libllvm6.0:i386 1:6.0-1ubuntu2 i386 Modular compiler and toolchain technologies, runtime library
ii llvm-5.0 1:5.0.1-4 amd64 Modular compiler and toolchain technologies
ii llvm-5.0-dev 1:5.0.1-4 amd64 Modular compiler and toolchain technologies, libraries and headers
ii llvm-5.0-runtime 1:5.0.1-4 amd64 Modular compiler and toolchain technologies, IR interpreter
ii llvm-6.0 1:6.0-1ubuntu2 amd64 Modular compiler and toolchain technologies
ii llvm-6.0-dev 1:6.0-1ubuntu2 amd64 Modular compiler and toolchain technologies, libraries and headers
ii llvm-6.0-runtime 1:6.0-1ubuntu2 amd64 Modular compiler and toolchain technologies, IR interpreter

on OpenSuse Leap 42.3 i avoid to use default source package from official repositories, i had try to compile blender for several month until i had try to use source library from blender batch file, now it work

I’ve been hoping distros a bit recently (had a catastrophic kwin issue on Kubuntu, so I decided to try plain old Ubuntu 18.04). Still running into the same exact issue on a completely clean install, although, this time I am unable to get osl to compile at all (even when using the “–force-osl” flag that worked on Kubuntu)…

If you happen to have time, could you try 18.04 in a VM to see if running “install_deps.sh --with-all” gives you an error when it gets to osl?

i already try to compile blender on 18.04 ubuntu family and i had find too many issue to complete compilation. ubuntu 17.10 family is more blender friendly, but still a bit issue. i am not a big fan of ubuntu distros, IMHO is better linux mint to play with linux and blender and mantain same package repositories of ubuntu, opensuse is to difficult to play in it for newer-basic linux user, always IMHO

I have tried from clean installation of 18.04 and I get the error when install_deps tries to build OSL:
http://pasteall.org/1042902

I really do not remember what I could have done to make it work in my current Kubuntu 18.04 installation.
Maybe some Blender developer could try on Ubuntu 18.04 to see what the problem could be.

good luck YAFU, untill 2-3 day ago, when developers have discuss to update blender libs used to compile it, blender was compiled on linux distro old 2.5-3 year or more

Brecht has made some changes:
https://developer.blender.org/rB885cc4cf9a1d5c167e4cbd26c3294d8b1ad400d8
Sorry, but I do not understand what I should do to compile it satisfactorily now with the new changes.

I’ve updated 2.8 branch with “git pull” and run “./install_deps.sh --with-all” just in case. it finishes without errors but apparently does not install anything new. If I try to compile with Blender make script “make full” I get the following error:

– The C compiler identification is GNU 7.3.0
– The CXX compiler identification is GNU 7.3.0
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
CMake Error at CMakeLists.txt:606 (message):
WITH_AUDASPACE requires WITH_CXX11

– Configuring incomplete, errors occurred!

The same thing happens if I try to install with the output that new install_deps.sh gives me:

make -j8 BUILD_CMAKE_ARGS="-U *SNDFILE* -U *PYTHON* -U *BOOST* -U *Boost* -U *OPENCOLORIO* -U *OPENEXR* -U *OPENIMAGEIO* -U *LLVM* -U *CYCLES* -U *OPENSUBDIV* -U *OPENVDB* -U *COLLADA* -U *FFMPEG* -U *ALEMBIC* -D WITH_CODEC_SNDFILE=ON -D PYTHON_VERSION=3.6 -D WITH_OPENCOLORIO=ON -D OPENCOLORIO_ROOT_DIR=/opt/lib/ocio -D WITH_OPENIMAGEIO=ON -D OPENIMAGEIO_ROOT_DIR=/opt/lib/oiio -D WITH_CYCLES_OSL=ON -D WITH_LLVM=ON -D LLVM_VERSION=3.4 -D OSL_ROOT_DIR=/opt/lib/osl -D LLVM_ROOT_DIR=/opt/lib/llvm -D LLVM_STATIC=ON -D WITH_OPENSUBDIV=ON -D OPENSUBDIV_ROOT_DIR=/opt/lib/osd -D WITH_OPENVDB=ON -D WITH_OPENVDB_BLOSC=ON -D WITH_OPENCOLLADA=ON -D WITH_JACK=ON -D WITH_JACK_DYNLOAD=ON -D WITH_ALEMBIC=ON -D ALEMBIC_ROOT_DIR=/opt/lib/alembic -D WITH_CODEC_FFMPEG=ON -D FFMPEG_LIBRARIES='avformat;avcodec;avutil;avdevice;swscale;swresample;lzma;rt;theora;theoradec;theoraenc;vorbis;vorbisenc;vorbisfile;ogg;xvidcore;vpx;mp3lame;x264'"

I can successfully build with old output from old instal_deps that included “-D WITH_CXX11=ON”.

By the way, output from “./install_deps.sh --with-all” does not include Ocean Modifier (I have added manually “-D WITH_MOD_OCEANSIM=ON -D WITH_FFTW3=ON”)

Thanks for the fix, Brecht. Now I can compile with make.

Regarding this thread and OSL. If I run “make full” I get:

– Could NOT find OpenJPEG (missing: OPENJPEG_LIBRARY OPENJPEG_INCLUDE_DIR)
– Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR)
– Boost version: 1.65.1
– Found the following Boost libraries:
– filesystem
– regex
– thread
– date_time
– wave
– locale
– iostreams
– system
– chrono
– atomic
– serialization
runningllvm-config-
– Could NOT find LLVM (missing: LLVM_LIBRARY)
– LLVM not found
CMake Error at CMakeLists.txt:902 (message):
Cycles OSL requires WITH_LLVM, the library may not have been found.
Configure LLVM or disable WITH_CYCLES_OSL

– Configuring incomplete, errors occurred!

But if I run what install_deps shows at the end I can compile Blender with OSL support.

make -j8 BUILD_CMAKE_ARGS="-U *SNDFILE* -U *PYTHON* -U *BOOST* -U *Boost* -U *OPENCOLORIO* -U *OPENEXR* -U *OPENIMAGEIO* -U *LLVM* -U *CYCLES* -U *OPENSUBDIV* -U *OPENVDB* -U *COLLADA* -U *FFMPEG* -U *ALEMBIC* -D WITH_CODEC_SNDFILE=ON -D PYTHON_VERSION=3.6 -D WITH_OPENCOLORIO=ON -D OPENCOLORIO_ROOT_DIR=/opt/lib/ocio -D WITH_OPENIMAGEIO=ON -D OPENIMAGEIO_ROOT_DIR=/opt/lib/oiio -D WITH_CYCLES_OSL=ON -D WITH_LLVM=ON -D LLVM_VERSION=3.4 -D OSL_ROOT_DIR=/opt/lib/osl -D LLVM_ROOT_DIR=/opt/lib/llvm -D LLVM_STATIC=ON -D WITH_OPENSUBDIV=ON -D OPENSUBDIV_ROOT_DIR=/opt/lib/osd -D WITH_OPENVDB=ON -D WITH_OPENVDB_BLOSC=ON -D WITH_OPENCOLLADA=ON -D WITH_JACK=ON -D WITH_JACK_DYNLOAD=ON -D WITH_ALEMBIC=ON -D ALEMBIC_ROOT_DIR=/opt/lib/alembic -D WITH_CODEC_FFMPEG=ON -D FFMPEG_LIBRARIES='avformat;avcodec;avutil;avdevice;swscale;swresample;lzma;rt;theora;theoradec;theoraenc;vorbis;vorbisenc;vorbisfile;ogg;xvidcore;vpx;mp3lame;x264'"

For those who read, “make -j8”, you must replace that number with the number of threads you want to use in your CPU.

I really can not remember what I had done to be able to compile with OSL support in my current installation of Kubuntu 18.04. I have not tried yet new install_deps in fresh 18.04 installation.

I have run the new install_deps.sh (./install_deps.sh --with-all) in Kubuntu 18.04 fresh installation in VirtualBox. First I have enabled all the repositories in sources.list (including sources repos) just in case. This finished successfully and I was able to build blender with OSL support with the instruction that install_deps.sh gives at the end.

Anyway, “make full” keeps giving me the error that I posted in previous message.

I did docker build system to build blender for linux. go ahead and check what that entrypoint.sh does when you ask it to build libraries, and run that to build all libs, and you should install them into lib dir that is next to blender source dir.