"libbrcmEGL.so: error adding symbols: DSO missing from command line" linker error when trying to use pi camera

I get this when trying to compile either my camera depender project or the ofxOMXCamera example-wrapper

Linking bin/example-wrapper for linuxarmv6l
g++ -o bin/example-wrapper obj/linuxarmv6l/Release/src/main.o obj/linuxarmv6l/Release/src/ofApp.o …/…/…/addons/obj/linuxarmv6l/Release/ofxOMXCamera/src/OMXCameraController.o …/…/…/addons/obj/linuxarmv6l/Release/ofxOMXCamera/src/VideoEngine.o …/…/…/addons/obj/linuxarmv6l/Release/ofxOMXCamera/src/RPiVideoGrabber.o …/…/…/addons/obj/linuxarmv6l/Release/ofxOMXCamera/src/PhotoEngine.o …/…/…/addons/obj/linuxarmv6l/Release/ofxOMXCamera/src/VideoRecorder.o …/…/…/addons/obj/linuxarmv6l/Release/ofxOMXCamera/src/ofxOMXPhotoGrabber.o …/…/…/addons/obj/linuxarmv6l/Release/ofxOMXCamera/src/ofxOMXVideoGrabber.o …/…/…/libs/openFrameworksCompiled/lib/linuxarmv6l/libopenFrameworks.a -Wl,-rpath=./libs:./bin/libs -Wl,–as-needed -Wl,–gc-sections -pthread -latomic -L/opt/vc/lib …/…/…/libs/kiss/lib/linuxarmv6l/libkiss.a …/…/…/libs/tess2/lib/linuxarmv6l/libtess2.a -lz -lgstapp-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstreamer-1.0 -ludev -lfontconfig -lfreetype -lsndfile -lopenal -lcurl -lglfw -lrtaudio -lasound -lpulse-simple -lpulse -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lmpg123 -lGLEW -lGLU -lGL -lfreeimage -lboost_filesystem -lboost_system -lpugixml -luriparser -lXinerama -lglfw -lGLESv2 -lGLESv1_CM -lEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpcre -lrt -lX11 -ldl
/usr/bin/ld: …/…/…/addons/obj/linuxarmv6l/Release/ofxOMXCamera/src/ofxOMXPhotoGrabber.o: undefined reference to symbol ‘eglCreateImageKHR’
/usr/bin/ld: //opt/vc/lib/libbrcmEGL.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: *** […/…/…/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:405: bin/example-wrapper] Error 1
make[1]: Leaving directory ‘/home/pi/of_v20191209/addons/ofxOMXCamera/example-wrapper’
make: *** […/…/…/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:129: Release] Error 2

“undefined reference to symbol ‘eglCreateImageKHR’” seems significant and has cropped up before here OF v20180313 armv6l on Raspberry Pi 3 + ofxPiMapper + ofxKinect

If I follow the advice there and in “config.linuxarmv6l.default.mk” force

PLATFORM_LIBRARIES += brcmGLESv2
PLATFORM_LIBRARIES += brcmEGL

then I get

Linking bin/example-wrapper for linuxarmv6l

g++ -o bin/example-wrapper obj/linuxarmv6l/Release/src/main.o obj/linuxarmv6l/Release/src/ofApp.o …/…/…/addons/obj/linuxarmv6l/Release/ofxOMXCamera/src/OMXCameraController.o …/…/…/addons/obj/linuxarmv6l/Release/ofxOMXCamera/src/VideoEngine.o …/…/…/addons/obj/linuxarmv6l/Release/ofxOMXCamera/src/RPiVideoGrabber.o …/…/…/addons/obj/linuxarmv6l/Release/ofxOMXCamera/src/PhotoEngine.o …/…/…/addons/obj/linuxarmv6l/Release/ofxOMXCamera/src/VideoRecorder.o …/…/…/addons/obj/linuxarmv6l/Release/ofxOMXCamera/src/ofxOMXPhotoGrabber.o …/…/…/addons/obj/linuxarmv6l/Release/ofxOMXCamera/src/ofxOMXVideoGrabber.o …/…/…/libs/openFrameworksCompiled/lib/linuxarmv6l/libopenFrameworks.a -Wl,-rpath=./libs:./bin/libs -Wl,–as-needed -Wl,–gc-sections -pthread -latomic -L/opt/vc/lib …/…/…/libs/kiss/lib/linuxarmv6l/libkiss.a …/…/…/libs/tess2/lib/linuxarmv6l/libtess2.a -lz -lgstapp-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstreamer-1.0 -ludev -lfontconfig -lfreetype -lsndfile -lopenal -lcurl -lglfw -lrtaudio -lasound -lpulse-simple -lpulse -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lmpg123 -lGLEW -lGLU -lGL -lfreeimage -lboost_filesystem -lboost_system -lpugixml -luriparser -lXinerama -lglfw -lbrcmGLESv2 -lbrcmEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpcre -lrt -lX11 -ldl

/usr/bin/ld: …/…/…/addons/obj/linuxarmv6l/Release/ofxOMXCamera/src/ofxOMXPhotoGrabber.o: in function `DisplayController::generateEGLImage(int, int)’:

ofxOMXPhotoGrabber.cpp:(.text._ZN17DisplayController16generateEGLImageEii[_ZN17DisplayController16generateEGLImageEii]+0x614): undefined reference to `ofAppEGLWindow::getEglDisplay() const’

/usr/bin/ld: ofxOMXPhotoGrabber.cpp:(.text._ZN17DisplayController16generateEGLImageEii[_ZN17DisplayController16generateEGLImageEii]+0x688): undefined reference to `ofAppEGLWindow::getEglContext() const’

/usr/bin/ld: …/…/…/addons/obj/linuxarmv6l/Release/ofxOMXCamera/src/OMXCameraController.o: in function `DisplayController::destroyEGLImage()’:

OMXCameraController.cpp:(.text._ZN17DisplayController15destroyEGLImageEv[_ZN17DisplayController15destroyEGLImageEv]+0x124): undefined reference to `ofAppEGLWindow::getEglDisplay() const’

collect2: error: ld returned 1 exit status

make[1]: *** […/…/…/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:405: bin/example-wrapper] Error 1

make[1]: Leaving directory ‘/home/pi/of_v20191209/addons/ofxOMXCamera/example-wrapper’

make: *** […/…/…/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:129: Release] Error 2

similar errors here https://github.com/jvcleave/ofxOMXPlayer/issues/119 point towards something about -lbrcmEGL

I have posted error on GitHub here https://github.com/jvcleave/ofxOMXCamera/issues/10

1 Like