[Error Compiling] Error compiling OSL with the install_deps.sh script

Hi, I don’t know if it because the version of ubuntu I have but i receive the

Hi I upgrade to Ubuntu 15.10 and now I can’t compile OSL. When i had ubuntu 14.10 I compiled all the dependences using the “compile_deps.sh” script. Now when I try to use it and when it is compiling OSL I receive the next error, I tried to google but I did not find the issue. In the OSL blog just said that there was a issue with LLVM 3.4 and it sopposed to be fixed but now I still with the same issue. I hope someone can help me.

This is all the log when Cmake starts to build OSL.

  • [ 89%] [ 90%] Building CXX object src/liboslexec/CMakeFiles/accum_test.dir/accum_test.cpp.o

  • Building CXX object src/liboslexec/CMakeFiles/llvmutil_test.dir/llvmutil_test.cpp.o

  • Linking CXX executable llvmutil_test

  • /usr/bin/ld: /usr/lib/llvm-3.4/lib/libLLVMMCJIT.a(MCJIT.o): undefined reference to symbol ‘_ZN4llvm15SmallPtrSetImplD2Ev’

  • /usr/lib/llvm-3.4/lib/libLLVM-3.4.2.so: error adding symbols: DSO missing from command line

  • collect2: error: ld returned 1 exit status

  • src/liboslexec/CMakeFiles/llvmutil_test.dir/build.make:112: recipe for target ‘src/liboslexec/llvmutil_test’ failed

  • make[2]: *** [src/liboslexec/llvmutil_test] Error 1

  • CMakeFiles/Makefile2:216: recipe for target ‘src/liboslexec/CMakeFiles/llvmutil_test.dir/all’ failed

  • make[1]: *** [src/liboslexec/CMakeFiles/llvmutil_test.dir/all] Error 2

  • make[1]: *** Waiting for unfinished jobs…

  • Linking CXX executable accum_test

  • /usr/bin/ld: /usr/lib/llvm-3.4/lib/libLLVMMCJIT.a(MCJIT.o): undefined reference to symbol ‘_ZN4llvm15SmallPtrSetImplD2Ev’

  • /usr/lib/llvm-3.4/lib/libLLVM-3.4.2.so: error adding symbols: DSO missing from command line

  • collect2: error: ld returned 1 exit status

  • src/liboslexec/CMakeFiles/accum_test.dir/build.make:112: recipe for target ‘src/liboslexec/accum_test’ failed

  • make[2]: *** [src/liboslexec/accum_test] Error 1

  • CMakeFiles/Makefile2:180: recipe for target ‘src/liboslexec/CMakeFiles/accum_test.dir/all’ failed

  • make[1]: *** [src/liboslexec/CMakeFiles/accum_test.dir/all] Error 2

  • Makefile:136: recipe for target ‘all’ failed

  • make: *** [all] Error 2

  • ERROR! OpenShadingLanguage-1.6.9 failed to compile, exiting

and this is all the log: Pastebin

Thank you for answer.

I have not built Blender on Linux (only in Windows) so I might not get it right, looks like the built was fine but the linking failed.


/usr/bin/ld: /usr/lib/llvm-3.4/lib/libLLVMMCJIT.a(MCJIT.o): undefined reference to symbol '_ZN4llvm15SmallPtrSetImplD2Ev'

So this means that it’s a bug with LLVM?
You might

Some this to try:

  1. You might try to use a different version of LLVM (exactly that one that worked in Ubuntu 12)
    http://askubuntu.com/questions/309786/llvm-and-clang-installation-on-ubuntu

A user says here that Ubuntu 12 has a much better LLVM version.

My only guess as to your issue is that the LLVM or clang from the PPA you installed might not have worked quite right. It seems it’s actually possible to get LLVM 3.2 from Ubuntu for 12.04, via what is known as the “proposed” archive.

  1. You need to make sure that there is no other OSL library in your system. For example Linux wants to install development libraries into the into the system. Try to remove if there’s any to avoid any conflicts so Blender will have to pick exactly that one needed.
    http://stackoverflow.com/questions/1811795/how-to-uninstall-the-libraries-in-ubuntu

  2. The most plain-easy approach, exclude OSL from your build and simply it won’t compile any OSL. I do not think that it will hurt a lot since OSL is only practical for writing your own custom shaders, which if really essential, you can do it in another build.

Sorry for putting so many notes but I can’t think of anything else… However if anyone knows something better I am very interested to learn as well. :slight_smile: