Error While Building OpenCV on Ubuntu

make Command

Normally I would do make -j15 but based on a similar problem I found here:

I tried using LD_PRELOAD to load in libcairo before the build starts.

  • I’m not actually sure what I should be passing in here so don’t assume I did this correctly
  • I assumed that the libcairo2-dev that I installed with apt was the one I should load in.

When I searched I found three libcairo related packages at paths:

/usr/lib/x86_64-linux-gnu/libcairo.so
/usr/lib/x86_64-linux-gnu/libcairo-gobject.so
/usr/lib/x86_64-linux-gnu/libcairo-script-interpreter.so

So I made three separate build attempts with:

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libcairo.so make -j15
LD_PRELOAD=usr/lib/x86_64-linux-gnu/libcairo-gobject.so make -j15
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libcairo-script-interpreter.so make -j15

All of which failed. Again, not even sure if I’m using LD_PRELOAD correctly or if it makes sense for this application.