Building on the Rpi with cmake
#1
Hi!
I am trying to build Leia Master on the Rpi3. That was no problem in the past with
autotools. But the build documentation is outdated, so I don't know all the cmake
options to build on the Pi. My system is Debian Stretch and the cmake options I
used are these:
cmake -DCORE_SYSTEM_NAME=rbpi -DCORE_PLATFORM_NAME=rbpi -DCMAKE_PREFIX_PATH=/opt/vc -DWITH_CPU=cortex-a7 ..
But I get the following error when linking the Kodi binary:
Code:
[100%] Linking CXX executable kodi.bin
build/cores/omxplayer/omxplayer.a(OMXImage.cpp.o): In function `COMXImage::AllocTextureInternal(void*, void*, COMXImage::textureinfo*)':
OMXImage.cpp:(.text+0x4ca): undefined reference to `eglCreateImageKHR'
build/cores/omxplayer/omxplayer.a(OMXImage.cpp.o): In function `COMXImage::DestroyTextureInternal(void*, void*, COMXImage::textureinfo*)':
OMXImage.cpp:(.text+0x526): undefined reference to `eglDestroyImageKHR'
collect2: error: ld returned 1 exit status
Do I still have to export the include paths from /opt/vc? If I do, or not, I end
up in the same error.
Do you have any idea, where I did wrong?
Reply
#2
Make sure you are linking with libs from /opt/vc/lib (e.g. libEGL.so and libGLESv2.so) and not from /usr/
Kodi uses the firmware GL libraries not arm side mesa libs.

You may need to uninstall (or otherwise hide) the mesa libs when running the cmake step.
Reply
#3
Uninstalling the mesa packages is bad. I would lose a lot of needed packages. I tried some cmake options for the egl and gles includes and libs. I have the correct paths now in CMakeCache.txt. With autotools, that was found automatically in the past. The cmake part of Kodi is not well docunented. I filed a ticket for this
I hope, it will build now...
Reply
#4
-DCMAKE_PREFIX_PATH=/opt/vc should help finding the correct libs.

How about posting a cmake log and CMakeCache.txt?
Reply
#5
Is it still necesarry to export the include paths?
Code:
export C_INCLUDE_PATH=/opt/vc/include:/opt/vc/include/interface/vcos/pthreads:/opt/vc/include/interface/vmcs_host/linux
export CPLUS_INCLUDE_PATH=/opt/vc/include:/opt/vc/include/interface/vcos/pthreads:/opt/vc/include/interface/vmcs_host/linux
export LDFLAGS="-L/opt/vc/lib"
ldconfig
I did so:
Code:
cmake -DCORE_SYSTEM_NAME=rbpi -DCORE_PLATFORM_NAME=rbpi -DCMAKE_PREFIX_PATH=/opt/vc -DWITH_CPU=cortex-a7 -DEGL_INCLUDE_DIR=/opt/vc/include/EGL -DEGL_LIBRARY=/opt/vc/lib/libbrcmEGL.so -DOPENGLES_INCLUDE_DIR=/opt/vc/include/GLES2 -DOPENGLES_gl_LIBRARY=/opt/vc/lib/libbrcmGLESv2.so ..
and it builds now.
Reply

Logout Mark Read Team Forum Stats Members Help
Building on the Rpi with cmake0