Trouble Linking Blender with(in) Alembic on Arch Linux

I’m having trouble with the linking step of building blender, here’s the error message I get:

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: warning: libImath-2_3.so.24, needed by /opt/lib/alembic/lib/libAlembic.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libIlmThread-2_3.so.24, needed by /opt/lib/alembic/lib/libAlembic.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libIex-2_3.so.24, needed by /opt/lib/alembic/lib/libAlembic.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libIexMath-2_3.so.24, needed by /opt/lib/alembic/lib/libAlembic.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libHalf.so.24, needed by /opt/lib/alembic/lib/libAlembic.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: ../../lib/libbf_alembic.a(abc_transform.cc.o): in function `AbcTransformWriter::do_write()':
abc_transform.cc:(.text+0x91e): undefined reference to `Alembic::AbcGeom::v10::XformSample::setMatrix(Imath_2_4::Matrix44<double> const&)'
/usr/bin/ld: /opt/lib/alembic/lib/libAlembic.so: undefined reference to `typeinfo for Iex_2_3::BaseExc'
/usr/bin/ld: /opt/lib/alembic/lib/libAlembic.so: undefined reference to `Iex_2_3::BaseExc::BaseExc(char const*)'
/usr/bin/ld: /opt/lib/alembic/lib/libAlembic.so: undefined reference to `Iex_2_3::BaseExc::what() const'
/usr/bin/ld: /opt/lib/alembic/lib/libAlembic.so: undefined reference to `Iex_2_3::BaseExc::~BaseExc()'
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [source/creator/CMakeFiles/blender.dir/build.make:442: bin/blender] Error 1
make[2]: *** [CMakeFiles/Makefile2:7439: source/creator/CMakeFiles/blender.dir/all] Error 2
make[1]: *** [Makefile:163: all] Error 2
make: *** [GNUmakefile:313: all] Error 2

Running install_deps.sh is no problem. Apparently, Alembic is trying to link functions from OpenEXR 2.3, while I only have 2.4 installed. As you can see, all parts build correctly but fails while linking.

Any help would be appreciated.

Check what’s in /opt/lib. If you have a library in /opt/lib that’s also installed system-wide (via apt-get or other tools) it may cause such a conflict.

I did remove the system-wide installed libraries, didn’t help :neutral_face:

Old version in /opt/lib ?