Linking errors with prebuild libs on Linux

Please rename to .txt

CMakeCache.txt.xml (143.2 KB)

Cheers, mib

So the problem is that it is picking up OpenEXR from the system libraries, other libraries seem to be ok.

Can you try this patch and a clean build?

diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index ac570f1..a1076ed 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -57,6 +57,7 @@ if(EXISTS ${LIBDIR})
   set(BOOST_ROOT ${LIBDIR}/boost)
   set(BOOST_LIBRARYDIR ${LIBDIR}/boost/lib)
   set(Boost_NO_SYSTEM_PATHS ON)
+  set(OPENEXR_ROOT_DIR ${LIBDIR}/openexr)

I’m having some serious dejavu on this one, i dealt with this not too long ago but can’t find a chatlog or devtalk post to refresh my memories.

It got to the point where @sergey started a patch hard-coding all the libs paths (like windows does) but opted out of that because he found a different solution, but i have no idea if that ever got implemented.

@brecht probably easiest if you just walk by his office and ask whatever happened to that.

Hi, thank you for looking into.
make clean
patch -p1 < patch.diff

make clean will not suffice here, the bad lib is already Cached in your CMakeCache.txt, you need to try this patch with a new build folder (or toss the cache file)

Hi, I delete the build folder.
Still the same errors.
Checked CMakeCache.txt and the path for openexr is still /usr
I tried to change the path manually but got build error.
Will try tomorrow on workstation as clean builds on my laptop are really boring. :slight_smile:

What is the possibility that you can uninstall openexr development package? Just to test if you can finally build, or to see if any other error appears.

Oh, you say you manually set the path. I guess to openexr folder in downloaded precompiled libraries.

I have a working build system but it is with mixed libraries some from deps script, some from system and some are build by myself.
So I am never on par with the release builds and for reporting bugs I have to DL buildbot to make sure it is not my helter skelter build.
Idea was checkout prebuild libs, make > Ready.
But as usual with computer work, it is not as easy as all would like to have.
Therefor I cant follow your advice you posted above.

Cheers, mib

Hello, i tried to compile Blender on VM with fresh installed CentOS 7 1810, after a lot of work i have my Blender compiled with static libraries using Blender prebuild libs. Running Blender master on my primary OpenSUSE Tumbleweed workstation i have this error running it from terminal:
“./blender: error while loading shared libraries: cannot open shared object file: No such file or directory”
my sequence of operations to compile Blender with previously written error
centos7_command_sequence.txt.xml (890 Bytes)
Sergey script i used to prepare my buildbox (1.8 KB)
final CmakeCache build_linux_full-CMakeCache.txt.xml (167.4 KB)
and all compiling log makefull_centos7-A01.txt.xml (2.0 MB) and
makefull_centos7-B01.txt.xml (1.6 MB)
makefull_centos7-B02.txt.xml (420.7 KB)
makefull_centos7-B03.txt.xml (57.5 KB)

Thanks in advance for any help to solve my problem

p.s. to all upload file must be deleted .xml extension

All these errors can probably be fixed by manually editing the CMakeCache to use the precompiled libraries where it incorrectly uses the system libraries.

For @NiCapp, at least this one:


A fix to make this all work automatic is being worked on here:

@brecht thank you for faster reply, this differential / solution is already landed on master?
if not, when can I try use it

p.s. i saw that blender use libpng.16 after i make my post here and libpng version on CentOS is 15

It will show it’s landed on the differential he linked to.

Hi, I tried to patch Blender with this patch:

Delete build_linux, than patch, make.
Building stop at:

[ 13%] Built target extern_quadriflow
make[3]: *** Keine Regel vorhanden, um das Ziel „/home/pepo/blender-git/blender/../lib/linux_centos7_x86_64/png/lib/libpng.a“, 
  benötigt von „bin/datatoc_icon“, zu erstellen.  Schluss.
make[2]: *** [CMakeFiles/Makefile2:4488: source/blender/datatoc/CMakeFiles/datatoc_icon.dir/all] Fehler 2
make[2]: *** Es wird auf noch nicht beendete Prozesse gewartet....
[ 14%] Built target bf_editor_mask
[ 14%] Built target bf_editor_metaball
Scanning dependencies of target bf_editor_space_buttons
[ 14%] Building C object source/blender/editors/space_buttons/CMakeFiles/bf_editor_space_buttons.dir/buttons_ops.c.o
[ 14%] Building C object source/blender/editors/space_buttons/CMakeFiles/bf_editor_space_buttons.dir/buttons_texture.c.o
[ 14%] Building C object source/blender/editors/space_buttons/CMakeFiles/bf_editor_space_buttons.dir/buttons_context.c.o
[ 14%] Building C object source/blender/editors/space_buttons/CMakeFiles/bf_editor_space_buttons.dir/space_buttons.c.o
[ 14%] Linking C static library ../../../../lib/libbf_editor_space_buttons.a
[ 14%] Built target bf_editor_space_buttons
make[1]: *** [Makefile:163: all] Fehler 2
make: *** [GNUmakefile:315: all] Fehler 2

No rule to make target libpng.a

Thank you all for the help

Add patch from @LazyDodo and build find but again linking errors:


EDIT: It seams WITH_STATIC_LIBS=Off is default.
Set it to ON
Disable FFmpeg (first error)
Than Openjpeg and SNDfile
This settings build and linking work, too!

I applied the patch but I’m still getting these errors:

Something to do with Imf_2_4 I assume?
Strange, because I’m sure I have ilmbase 2.4 and devel on my system or do I need something else on top of it?

Also my CMakeCache:

Hi, do you apply both patches?
The main patch D6888 and on top of it the patch from Lazydodo included in the tracker?
With D6888 alone I got huge list of linking errors, with the second patch only the 3 errors I mention in my post.

Cheers, mib

I’ve only attempted to use brecht’s patch. I guess I’ll try out Lazydodo’s later. Or I suppose I could just be patient and wait for the official patch to master.

You are right, I wait until this is sorted out.
There are enough information for the developer I guess.

Cheers, mib

All problems in this topic should be fixed now when building in latest master (perhaps with a clean build that removes the build folder).

1 Like

Hi, building/linking work now on Opensuse Tumbleweed with latest master and clean/new build directory.
Thank you all for working on the patches, it make building very easy now.

Cheers, mib