I had to reinstall ubuntu again, and I can't get my blender 2.8 to build properly again

I think I have some libraries messed up, or not installed.
I’ve run the install_deps.sh script, and i believe it says that everything is okay, but when i build blender i get this message in the end, almost at 100%

Scanning dependencies of target blender
make[3]: *** No rule to make target ‘/usr/lib/llvm-6.0/lib/libLLVM-6.0.0.so’, needed by ‘bin/blender’. Stop.
make[3]: *** Waiting for unfinished jobs…
[100%] Building C object source/creator/CMakeFiles/blender.dir/buildinfo.c.o
make[2]: *** [CMakeFiles/Makefile2:7908: source/creator/CMakeFiles/blender.dir/all] Error 2
make[1]: *** [Makefile:163: all] Error 2
make: *** [GNUmakefile:149: all] Error 2

I get that it’s having problems with the libLLVM, but i have no idea about how to fix it…
I also have a problem running the previous build i made before i reinstalled ubuntu, something about jemalloc.so.1 not being there even though i had the latest one installed… I’m on Ubuntu 18.04.

Is there someone that has a little time to help me out? I would be most happy.

It actually does seem like i have libLLVM installed, but i have a different version… How do i make it use the updated version when I compile? I have libLLVM-6.0.1.so instead of libLLVM-6.0.0.so

Hello,

I already had a similar problem few time ago. I resolved it by manually modifying the “CMakeCache.txt” file in the “build_linux” directory.
Take a look at this file. Check if all the paths relative to the LLVM lib are present and correct.

Here are the paths from my “CMakeCache.txt” file relative to the LLVM lib if that can help you. I’m on Ubuntu 18.04.

//Path to a program.
LLVM_CONFIG:FILEPATH=/usr/bin/llvm-config-6.0

//Path to the LLVM library path
LLVM_LIBPATH:PATH=/usr/lib/llvm-6.0/lib

//Path to a library.
LLVM_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libLLVM-6.0.so

//Path to the LLVM installation
LLVM_ROOT_DIR:PATH=/usr/lib/llvm-6.0

//Link with LLVM static libraries
LLVM_STATIC:BOOL=OFF

//No help, variable specified on the command line.
LLVM_VERSION:UNINITIALIZED=6.0

Hope it can help you.

3 Likes

Are you perhaps using an existing target build directory from before the Ubuntu re-install/upgrade? You might just try renaming the target build directory temporarily and thus the build will have to re-create it and re-configure the build environment and it may automagically adapt to your current environment.

Did you run the install_deps.sh script after reinstalling Ubuntu?

Actually, this worked. :slight_smile: When i checked the file, it said that it couldn’t find those, so i pasted in the exact thing you have written here… worked like a charm! Thank you very much.

Thanks for the other suggestions too. :slight_smile:

I was actually doing that as well… I reainstalled ubuntu again after last time, and the error i got when trying to start blender after compile went away.

@RainerTrummer, yup I did that too… :slight_smile: but all is good now.

I am making a docker image for easier compilation!


@Helo thank you for your help, I found that passing in CMAKE args is more reliable than editing text files.

2 Likes

Does anyone have an example of build instructions that the nightly is built with?

If you refer to similar features and do not mean that it is portable build, run “./install_deps.sh --with-all” script and you read instructions at the end of the terminal when it finishes. You copy and paste the penultimate paragraph in terminal in your “blender” location, the paragraph that begins with make -j , and ends in quotation marks ".
I think that it builds with similar features, except Ocean Modifier, which I really do not understand why it is not included. If you want to build with Ocean modifier, you must enable WITH_FFTW3=ON and WITH_MOD_OCEANSIM=ON

1 Like

@YAFU my challenge now, is that I am using ubuntu as the compilation base, and I am trying to produce a statically linked blender.
But my build still fails, here is the branch with the changes:

@YAFU what distro are you compiling in? would you mind sharing your setup ?

This is the make command:

To get a build most similar to the buildbot, see:

1 Like

Here I can not help much, I have failed in every attempt to achieve portable builds in Linux for many years.
To make builds for my system, as I mentioned I simply use the instruction that “./install_deps.sh --with-all” script shows in terminal at the end, with the addition of what is necessary to compile Ocean Modifier.

make -j8 BUILD_CMAKE_ARGS="-U *FFTW3* -U *OCEANSIM* -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_FFTW3=ON -D WITH_MOD_OCEANSIM=ON -D WITH_CODEC_SNDFILE=ON -D PYTHON_VERSION=3.7 -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=6.0 -D OSL_ROOT_DIR=/opt/lib/osl -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_CYCLES_EMBREE=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;openjp2'"

“make -j16” in your case.
This may change over time according to new dependencies devs add.

Edit:
System is Kubuntu 18.04