Ubuntu 18.04 Error When Building. [Not first time Building on Ubuntu]

All libs are up-to-date according to “install_deps.sh” script.
But on building process, after 100% indicator, an error (errors) line(s) prompts on terminal concerning Embree Library (if I am not wrong), saying:

  • /opt/lib/embree/lib/libembree3.a(bvh8_factory.cpp.o):bvh8_factory.cpp:function embree::BVH8Factory::selectIntersectors(int): error: undefined reference to 'embree:: … (pointing to some Functions).
    collect2: error: ld returned 1 exit status
    source/creator/CMakeFiles/blender.dir/build.make:508: recipe for target ‘bin/blender’ failed
    make[3]: *** [bin/blender] Error 1
    CMakeFiles/Makefile2:8050: recipe for target ‘source/creator/CMakeFiles/blender.dir/all’ failed
    make[2]: *** [source/creator/CMakeFiles/blender.dir/all] Error 2
    Makefile:162: recipe for target ‘all’ failed
    make[1]: *** [all] Error 2
    GNUmakefile:273: recipe for target ‘all’ failed
    make: *** [all] Error 2

Can someone help me please!
Greetings
Elbox01

Undefined reference is usually a missing library. Or possibly the wrong version.

Thank you for your reply @Stiv!!
Embree’s version that I am using currently is 3.2.4, when I run “Install_deps.sh” script, it said everything is up-to-date!!
Is there a way to know which lib’s versions are currently used in branch master?

BTW here is the whole error:
https://drive.google.com/file/d/1Y_NK_t2nkknYAm3Hy1dnoWVahkLbfl-M/view?usp=sharing

You should use install_deps.sh --with-embree to build Embree. Cycles requires an Embree build with extra options that Embree does not enable by default.

Thank you @StefanW,
This is usually the command that I run when updating libs:
install_deps.sh --with-opencollada --with-embree
To be sure I have forced builbing Embree with this:
install_deps.sh --with-opencollada --with-embree --force-embree
But the error persist !!!

The error you pasted looks like it is maybe picking up a different version of Embree. Where does install_deps.sh place those Embree libraries on your system?

install_deps.sh install the libraries on the default directory: /opt/lib/
this is its content :

  • alembic-1.7.8/
  • blosc-1.14.4/
  • embree-3.2.4/
  • ocio-1.1.0/
  • oiio-1.8.13/
  • opencollada-1.6.68/
  • openvdb-5.1.0/
  • osd-3.3.3/
  • osl-1.9.9/
  • alembic -> /opt/lib/alembic-1.7.8/
  • .alembic-1.7.8-magiccheck-2-true
  • blosc -> /opt/lib/blosc-1.14.4/
  • .blosc-1.14.4-magiccheck-0-true
  • embree -> /opt/lib/embree-3.2.4/
  • .embree-3.2.4-magiccheck-9-true
  • ocio -> /opt/lib/ocio-1.1.0/
  • .ocio-1.1.0-magiccheck-2-true
  • oiio -> /opt/lib/oiio-1.8.13/
  • .oiio-1.8.13-magiccheck-17-true
  • opencollada -> /opt/lib/opencollada-1.6.68/
  • .opencollada-1.6.68-magiccheck-9-true
  • openvdb -> /opt/lib/openvdb-5.1.0/
  • .openvdb-5.1.0-magiccheck-1-true
  • osd -> /opt/lib/osd-3.3.3/
  • .osd-3.3.3-magiccheck-2-true
  • osl -> /opt/lib/osl-1.9.9/
  • .osl-1.9.9-magiccheck-21-true

And weirdly, this error appears only yesterday, everything works fine the day before yesterday!!
This building log of embree :
https://drive.google.com/file/d/1juT2kvkgTV0IIm_uZa-tEJAD6HSkmSfx/view?usp=sharing

One of our build guys suggested on IRC that this might be due to some housekeeping they were doing. It may require professional attention on the build side.

So I need to wait untill they solve the problem?
And the thing that give me nuts, is that this problem only occurs on my side!!!
Anyway Thanks for your replay

Having same problem with same OS and Debian.

So I am not alone here!! @grash, and that’s makes @stiv suggestion the most likely.
Let’s hope that things get better in the upcoming days :slight_smile: .

@StefanW managed to repro on my kubuntu VM

in findembree.cmake i moving embree3 to the top of the list seems to solve the issue for me, however linux is not my platform so please validate this is the right thing to do.

SET(_embree_FIND_COMPONENTS
  embree3 
  embree_avx
  embree_avx2
  embree_sse42
  lexers
  math
  simd
  sys
  tasking
)

Thank you @LazyDodo,
I can confirm that your suggestion solved the problem.
Thanks to the community especially the ones who participate in this post.
Have a nice day :slight_smile:

This is working for me with todays build!!