[Solved] Ran into a problem whilst compiling 2.83 alpha

It compiles all the way to 100% but after it says Linking CSS executable …/…/bin/blender, this here shows up:

Scanning dependencies of target blender
[100%] Building C object source/creator/CMakeFiles/blender.dir/buildinfo.c.o
[100%] Linking CXX executable ../../bin/blender
/usr/bin/ld.gold: error: /home/cet/blender-28-git/lib/linux_x86_64/zlib/lib/libz.a(inflate.o): multiple definition of 'inflateResetKeep'
/usr/bin/ld.gold: /home/cet/blender-28-git/lib/linux_x86_64/blosc/lib/libblosc.a(inflate.c.o): previous definition here
/usr/bin/ld.gold: error: /home/cet/blender-28-git/lib/linux_x86_64/zlib/lib/libz.a(inflate.o): multiple definition of 'inflateReset'
/usr/bin/ld.gold: /home/cet/blender-28-git/lib/linux_x86_64/blosc/lib/libblosc.a(inflate.c.o): previous definition here
/usr/bin/ld.gold: error: /home/cet/blender-28-git/lib/linux_x86_64/zlib/lib/libz.a(inflate.o): multiple definition of 'inflateReset2'
/usr/bin/ld.gold: /home/cet/blender-28-git/lib/linux_x86_64/blosc/lib/libblosc.a(inflate.c.o): previous definition here
/usr/bin/ld.gold: error: /home/cet/blender-28-git/lib/linux_x86_64/zlib/lib/libz.a(inflate.o): multiple definition of 'inflateInit2_'
/usr/bin/ld.gold: /home/cet/blender-28-git/lib/linux_x86_64/blosc/lib/libblosc.a(inflate.c.o): previous definition here
/usr/bin/ld.gold: error: /home/cet/blender-28-git/lib/linux_x86_64/zlib/lib/libz.a(inflate.o): multiple definition of 'inflateInit_'
/usr/bin/ld.gold: /home/cet/blender-28-git/lib/linux_x86_64/blosc/lib/libblosc.a(inflate.c.o): previous definition here
/usr/bin/ld.gold: error: /home/cet/blender-28-git/lib/linux_x86_64/zlib/lib/libz.a(inflate.o): multiple definition of 'inflatePrime'
/usr/bin/ld.gold: /home/cet/blender-28-git/lib/linux_x86_64/blosc/lib/libblosc.a(inflate.c.o): previous definition here
/usr/bin/ld.gold: error: /home/cet/blender-28-git/lib/linux_x86_64/zlib/lib/libz.a(inflate.o): multiple definition of 'inflate'
/usr/bin/ld.gold: /home/cet/blender-28-git/lib/linux_x86_64/blosc/lib/libblosc.a(inflate.c.o): previous definition here
/usr/bin/ld.gold: error: /home/cet/blender-28-git/lib/linux_x86_64/zlib/lib/libz.a(inflate.o): multiple definition of 'inflateEnd'
/usr/bin/ld.gold: /home/cet/blender-28-git/lib/linux_x86_64/blosc/lib/libblosc.a(inflate.c.o): previous definition here
/usr/bin/ld.gold: error: /home/cet/blender-28-git/lib/linux_x86_64/zlib/lib/libz.a(inflate.o): multiple definition of 'inflateGetDictionary'
/usr/bin/ld.gold: /home/cet/blender-28-git/lib/linux_x86_64/blosc/lib/libblosc.a(inflate.c.o): previous definition here
/usr/bin/ld.gold: error: /home/cet/blender-28-git/lib/linux_x86_64/zlib/lib/libz.a(inflate.o): multiple definition of 'inflateSetDictionary'
/usr/bin/ld.gold: /home/cet/blender-28-git/lib/linux_x86_64/blosc/lib/libblosc.a(inflate.c.o): previous definition here
/usr/bin/ld.gold: error: /home/cet/blender-28-git/lib/linux_x86_64/zlib/lib/libz.a(inflate.o): multiple definition of 'inflateGetHeader'
/usr/bin/ld.gold: /home/cet/blender-28-git/lib/linux_x86_64/blosc/lib/libblosc.a(inflate.c.o): previous definition here
/usr/bin/ld.gold: error: /home/cet/blender-28-git/lib/linux_x86_64/zlib/lib/libz.a(inflate.o): multiple definition of 'inflateSync'
/usr/bin/ld.gold: /home/cet/blender-28-git/lib/linux_x86_64/blosc/lib/libblosc.a(inflate.c.o): previous definition here
/usr/bin/ld.gold: error: /home/cet/blender-28-git/lib/linux_x86_64/zlib/lib/libz.a(inflate.o): multiple definition of 'inflateSyncPoint'
/usr/bin/ld.gold: /home/cet/blender-28-git/lib/linux_x86_64/blosc/lib/libblosc.a(inflate.c.o): previous definition here
/usr/bin/ld.gold: error: /home/cet/blender-28-git/lib/linux_x86_64/zlib/lib/libz.a(inflate.o): multiple definition of 'inflateCopy'
/usr/bin/ld.gold: /home/cet/blender-28-git/lib/linux_x86_64/blosc/lib/libblosc.a(inflate.c.o): previous definition here
/usr/bin/ld.gold: error: /home/cet/blender-28-git/lib/linux_x86_64/zlib/lib/libz.a(inflate.o): multiple definition of 'inflateUndermine'
/usr/bin/ld.gold: /home/cet/blender-28-git/lib/linux_x86_64/blosc/lib/libblosc.a(inflate.c.o): previous definition here
/usr/bin/ld.gold: error: /home/cet/blender-28-git/lib/linux_x86_64/zlib/lib/libz.a(inflate.o): multiple definition of 'inflateMark'
/usr/bin/ld.gold: /home/cet/blender-28-git/lib/linux_x86_64/blosc/lib/libblosc.a(inflate.c.o): previous definition here
collect2: error: ld returned 1 exit status
make[3]: *** [source/creator/CMakeFiles/blender.dir/build.make:456: bin/blender] Error 1
make[2]: *** [CMakeFiles/Makefile2:8177: source/creator/CMakeFiles/blender.dir/all] Error 2
make[1]: *** [Makefile:163: all] Error 2
make: *** [GNUmakefile:315: all] Error 2

Has anyone seen this before? The compiling was working for me yesterday, on Friday.

Forgot to mention. Ubuntu 19.10 64bit

Dependencies were updated, so it requires doing another make deps run.

1 Like

In the blender folder? I’m a little bit shaky when it comes to more than just make update && make full… xP

edit: i just tried in the /blender/ folder, and it’s chugging happily along… :slight_smile: Thanks Sybren. :slight_smile:

1 Like

After running the make deps command, it ran through a bunch of stuff. I tried compiling blender again after, and this happened:

[100%] Linking CXX executable ../../bin/blender
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusdec.o):libopusdec.c:function libopus_flush: error: undefined reference to 'opus_multistream_decoder_ctl'
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusdec.o):libopusdec.c:function libopus_decode: error: undefined reference to 'opus_multistream_decode_float'
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusdec.o):libopusdec.c:function libopus_decode: error: undefined reference to 'opus_multistream_decode'
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusdec.o):libopusdec.c:function libopus_decode: error: undefined reference to 'opus_strerror'
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusdec.o):libopusdec.c:function libopus_decode_close: error: undefined reference to 'opus_multistream_decoder_destroy'
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusdec.o):libopusdec.c:function libopus_decode_init: error: undefined reference to 'opus_multistream_decoder_create'
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusdec.o):libopusdec.c:function libopus_decode_init: error: undefined reference to 'opus_strerror'
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusdec.o):libopusdec.c:function libopus_decode_init: error: undefined reference to 'opus_multistream_decoder_ctl'
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusdec.o):libopusdec.c:function libopus_decode_init: error: undefined reference to 'opus_strerror'
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusdec.o):libopusdec.c:function libopus_decode_init: error: undefined reference to 'opus_multistream_decoder_ctl'
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusdec.o):libopusdec.c:function libopus_decode_init: error: undefined reference to 'opus_strerror'
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusenc.o):libopusenc.c:function libopus_encode: error: undefined reference to 'opus_multistream_encode'
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusenc.o):libopusenc.c:function libopus_encode: error: undefined reference to 'opus_multistream_encode_float'
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusenc.o):libopusenc.c:function libopus_encode_close: error: undefined reference to 'opus_multistream_encoder_destroy'
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusenc.o):libopusenc.c:function libopus_encode_init: error: undefined reference to 'opus_multistream_encoder_create'
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusenc.o):libopusenc.c:function libopus_encode_init: error: undefined reference to 'opus_multistream_surround_encoder_create'
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusenc.o):libopusenc.c:function libopus_encode_init: error: undefined reference to 'opus_multistream_encoder_ctl'
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusenc.o):libopusenc.c:function libopus_encode_init: error: undefined reference to 'opus_multistream_encoder_ctl'
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusenc.o):libopusenc.c:function libopus_encode_init: error: undefined reference to 'opus_multistream_encoder_ctl'
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusenc.o):libopusenc.c:function libopus_encode_init: error: undefined reference to 'opus_multistream_encoder_ctl'
/home/cet/blender-28-git/blender/../lib/linux_x86_64/ffmpeg/lib/libavcodec.a(libopusenc.o):libopusenc.c:function libopus_encode_init: error: undefined reference to 'opus_multistream_encoder_destroy'
collect2: error: ld returned 1 exit status
make[3]: *** [source/creator/CMakeFiles/blender.dir/build.make:461: bin/blender] Error 1
make[2]: *** [CMakeFiles/Makefile2:8235: source/creator/CMakeFiles/blender.dir/all] Error 2
make[1]: *** [Makefile:163: all] Error 2
make: *** [GNUmakefile:315: all] Error 2

:slight_smile:

I also ran into a problem when compiling that blender wants the libraries of jack1 when I’m using jack2 on my system… I managed to circumvent that by copying the libraries into the lib-folder in my blender-git from the system lib folder. then installed jack2 again after that. Now I only have a problem with the FFmpeg not working… I’ve run make deps twice, I’ve also run ./installdeps.sh just to make sure that everything is there… .but still no luck…

Help, someone…? :stuck_out_tongue: (I know I’m being a pain here, but I really want to learn more about compiling and programming in general as well… )

Hi @cet77 This came up in blender-builds channel* a few days ago. the shell script fails in some libraries, so get hold of pre compiled libraries(1) using svn(2) and then try make update and make from source code folder.

1: https://developer.blender.org/diffusion/BL/browse/trunk/lib/linux_centos7_x86_64/
2: https://wiki.blender.org/wiki/Building_Blender/Linux/Ubuntu “download libraries” section.

*: If you are logged out, go to https://blender.chat/ first, use sidebar to find blender-builds channel and scroll up to find chat of 27th Jan. Or use search for term “WITH_IMAGE_OPENJPEG”

1 Like

Thanks, I tried deleting the old ffmpeg folder and ran the svn command that was on that page, but still no luck… It downloads the files and restores the ffmpeg folder, but I still get the same errors…

Also, it seems the chat-server is struggling quite a bit right now. If someone has the updated ffmpeg libraries for 64bit linux that they can share with me, that would be awesome. :slight_smile:

Bump… Still in need of getting my ffmpeg libs updated… It still fails for me… :slight_smile:

Check the paths in CMakeCache.txt, they should point to your /home/cet/blender-28-git/lib/linux_x86_64/ directory. If there are any paths in there that point to /opt/lib or /usr/lib, do a cmake -U'*SOMETHING*' . to un-set those and let CMake try and find new paths. For example, when there is an FFMpeg-related path incorrect, just do cmake -U'*FFMPEG*' ., or with Boost do cmake -U'*Boost*' -U'*BOOST*' .

2 Likes

Thanks for all the help. :slight_smile:
I actually ended up removing everything in my git folder and redownloading everything anew. That fixed everything… But I’ll remember these things if something like this happens again.

edit: I actually took a backup of that exact file before deleting everything, and It seems like the ffmpeg was pointing to the /lib/linux_x86_64/ folder whilst the new ffmpeg i had downloaded was located in the /lib/linux_centos7_x86_64/ folder… So I’m pretty sure that your suggestion would have worked for me Sybren… I could have saved myself some download time… :stuck_out_tongue:

You should never have to re-download the Git repository, as you can always use Git itself to go back to the original file contents (barring really nasting corruptions of your local Git repository, of course).

Switching between a self-built lib/linux_x86_64 and lib/linux_centos7_x86_64 is not easily possible. If I’m not mistaken, on your version of Ubuntu your files will have used a more recent C++ standard (or at least a more recent ABI) than the CentOS build. This means that among other things std::string will differ between those builds, and you won’t be able to mix & match libraries.

1 Like

Hmm… Okay. For some reason though, i had both those library folders there, and I can’t remember when that happened… I have usually run the ./install_deps.sh to install the libraries, and I guess that’s where the non-centos libraries come from… Anyways, I just downloaded the centos libraries this time, and it seems to work fine for now… :slight_smile:
btw, what actually happens when i run the make deps command? Does it update the /lib/linux_x86_64 libraries or the centos ones?

  • install_deps.sh: installs as many packages from your Linux distribution as possible, and builds the remaining dependencies into /opt/lib.
  • make deps: builds all the dependencies from source, and installs into ../lib/linux_x86_64

The ../lib/linux_centos7_x86_64 files have been built on CentOS7 with make deps and manually copied ../lib/linux_x86_64../lib/linux_centos7_x86_64. The CMake files have some heuristics to detect which one should be used, based on which directories exist on your system.

Personally I would recommend either:

  • removing /opt/lib altogether, running make deps, and only using ../lib/linux_x86_64/, or
  • removing both /opt/lib and ../lib/linux_x86_64, and only keeping ../lib/linux_centos7_x86_64 around.
1 Like

Okay, that made things clearer to me, thank you so much. At this point in time the only thing I have is /lib/linux_centos7_x86_64 and not the other one… I’ll keep it like that for now I think. :slight_smile: