Testing cameraLensOffsetExample fails, cairo.h not found on Manjaro LInux

trying to test the examples, I get the following error (on Manjaro linux):

Compiling cameraLensOffsetExample for Debug
make[1]: Entering directory ‘/home/gust/Software/openFrameworks/examples/3d/cameraLensOffsetExample’
HOST_OS=Linux
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal libcurl glfw3 rtaudio libpulse-simple alsa gl glu glew gtk±3.0 libmpg123
with PKG_CONFIG_LIBDIR=
Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing opencv.pc' to the PKG_CONFIG_PATH environment variable Package 'opencv', required by 'virtual:world', not found Package opencv was not found in the pkg-config search path. Perhaps you should add the directory containingopencv.pc’
to the PKG_CONFIG_PATH environment variable
Package ‘opencv’, required by ‘virtual:world’, not found
Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing opencv.pc' to the PKG_CONFIG_PATH environment variable Package 'opencv', required by 'virtual:world', not found Package opencv was not found in the pkg-config search path. Perhaps you should add the directory containingopencv.pc’
to the PKG_CONFIG_PATH environment variable
Package ‘opencv’, required by ‘virtual:world’, not found
Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing opencv.pc' to the PKG_CONFIG_PATH environment variable Package 'opencv', required by 'virtual:world', not found cat: obj/linux64/Debug/.compiler_flags: No such file or directory Package opencv was not found in the pkg-config search path. Perhaps you should add the directory containingopencv.pc’
to the PKG_CONFIG_PATH environment variable
Package ‘opencv’, required by ‘virtual:world’, not found
Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc’
to the PKG_CONFIG_PATH environment variable
Package ‘opencv’, required by ‘virtual:world’, not found
Compiling /home/gust/Software/openFrameworks/examples/3d/cameraLensOffsetExample/src/ofApp.cpp
g++ -c -g3 -DDEBUG -Wall -Werror=return-type -std=c++14 -DGCC_HAS_REGEX -DOF_USING_GTK -DOF_USING_GTK -DOF_USING_MPG123 -I/home/gust/Software/openFrameworks/libs/fmodex/include -I/home/gust/Software/openFrameworks/libs/glm/include -I/home/gust/Software/openFrameworks/libs/glm/include/glm -I/home/gust/Software/openFrameworks/libs/glm/include/glm/simd -I/home/gust/Software/openFrameworks/libs/glm/include/glm/detail -I/home/gust/Software/openFrameworks/libs/glm/include/glm/gtx -I/home/gust/Software/openFrameworks/libs/glm/include/glm/gtc -I/home/gust/Software/openFrameworks/libs/json/include -I/home/gust/Software/openFrameworks/libs/kiss/include -I/home/gust/Software/openFrameworks/libs/tess2/include -I/home/gust/Software/openFrameworks/libs/utf8/include -I/home/gust/Software/openFrameworks/libs/utf8/include/utf8 -I/home/gust/Software/openFrameworks/libs/openFrameworks -I/home/gust/Software/openFrameworks/libs/openFrameworks/types -I/home/gust/Software/openFrameworks/libs/openFrameworks/events -I/home/gust/Software/openFrameworks/libs/openFrameworks/utils -I/home/gust/Software/openFrameworks/libs/openFrameworks/math -I/home/gust/Software/openFrameworks/libs/openFrameworks/3d -I/home/gust/Software/openFrameworks/libs/openFrameworks/video -I/home/gust/Software/openFrameworks/libs/openFrameworks/gl -I/home/gust/Software/openFrameworks/libs/openFrameworks/app -I/home/gust/Software/openFrameworks/libs/openFrameworks/graphics -I/home/gust/Software/openFrameworks/libs/openFrameworks/communication -I/home/gust/Software/openFrameworks/libs/openFrameworks/sound -I/home/gust/Software/openFrameworks/examples/3d/cameraLensOffsetExample/src -I/home/gust/Software/openFrameworks/addons/ofxOpenCv/src -MMD -MP -MF obj/linux64/Debug/src/ofApp.d -MT obj/linux64/Debug/src/ofApp.o -o obj/linux64/Debug/src/ofApp.o -c /home/gust/Software/openFrameworks/examples/3d/cameraLensOffsetExample/src/ofApp.cpp
In file included from /home/gust/Software/openFrameworks/libs/openFrameworks/ofMain.h:65,
from /home/gust/Software/openFrameworks/examples/3d/cameraLensOffsetExample/src/ofApp.h:3,
from /home/gust/Software/openFrameworks/examples/3d/cameraLensOffsetExample/src/ofApp.cpp:1:
/home/gust/Software/openFrameworks/libs/openFrameworks/graphics/ofCairoRenderer.h:4:10: fatal error: cairo.h: No such file or directory
#include “cairo.h”
^~~~~~~~~
compilation terminated.
make[1]: *** [/home/gust/Software/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:223: obj/linux64/Debug/src/ofApp.o] Error 1
make[1]: Leaving directory ‘/home/gust/Software/openFrameworks/examples/3d/cameraLensOffsetExample’
make: *** [/home/gust/Software/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:146: Debug] Error 2
error compiling cameraLensOffsetExample

Also, not sure if this is relevant, but I have ardour installed on my system as well (requires a customized version of cairo), but I don’t fully understand this error.

Do you manaje to fix this error im having the same one

I’m also getting a cairo.h not found, using latest OF on Ubuntu Mate 18.10

Can you try using the nightly builds? This should be solved there

I’m also seeing this error in Ubuntu 18.10 today with oF nightly (20190324 linux64 gcc6).
cairo itself seems installed like below by scripts.

sudo apt list --installed
...
libcairo-gobject-perl/cosmic,now 1.004-2build3 amd64 [installed,automatic]
libcairo-gobject2/cosmic-updates,now 1.15.12-1ubuntu0.1 amd64 [installed,automatic]
libcairo-perl/cosmic,now 1.106-2build2 amd64 [installed,automatic]
libcairo-script-interpreter2/cosmic-updates,now 1.15.12-1ubuntu0.1 amd64 [installed,automatic]
libcairo2-dev/cosmic-updates,now 1.15.12-1ubuntu0.1 amd64 [installed]
libcairo2/cosmic-updates,now 1.15.12-1ubuntu0.1 amd64 [installed,automatic]
...

But make cannot find header file.

are you sure you are using the nightly builds? this is fixed there. try posting more of the error otherwise

I found this is more like specific addon problem(probably ofxDlib).
I will investigate little more, thanks for reply!

i see, it probably needs you to install some library in the system. the cairo error happens when any package is missing.

1 Like

Exactly, it is!
I just forgot to execute install.sh & build.sh which come with ofxDlib. Nice to know that cairo.h error happen when I missed package.
Thanks!

Thank you for this. My issue was also resolved by running an install script inside the OMXPlayer addons folder. I didn’t realize!

1 Like