Kha icon indicating copy to clipboard operation
Kha copied to clipboard

pi Support: path to EGL GLES when compiling from commandline

Open gepatto opened this issue 7 years ago • 2 comments

On Raspbian Stretch I'm trying to compile the Empty example from the commandline (not from codeBlocks) but it fails at finding the GLESv2 EGL and bcm_host libaries (not the includes!) ( see issue: 755 )

on Raspbian Stretch the EGL, GLESv2 and bcm_host libraries are in /opt/vc/lib and they are called libbrcmEGL, libbrcmGLESv2 and libbcm_host. On Raspbian Jessie that is NOT up to date they are called libEGL and libGLESv2 and libbcm_host. On Raspbian Jessie that has all updates you have BOTH names ( the files are the same, I guess this was for the transition to Stretch )

From the commandline I see that the LDFLAG is missing -L/opt/vc/lib

So here it's only looking in /usr/lib/arm-linux-gnueabihf/

If I update the librarynames in the Kore/korefile.js file and compile from codeBlocks it works fine and I can see the g++ LDFLAG -L/opt/vc/lib in the build log. So I guess codeBlocks adds this.

Is there a way to add the -L/opt/vc/lib flag from the commandline? Or is building from codeblocks the only way it's supposed to work. I see I need x11 anyway cause you render the EGL-SURFACE on top of an x11-window. I was hoping I could use it without X11 so I could boot into a Kha application without having to start a desktop.

gepatto avatar Jun 12 '18 09:06 gepatto

Let's make X optional then. I usually use Code::Blocks to build but fixing the makefile shouldn't be too hard either.

RobDangerous avatar Jun 12 '18 15:06 RobDangerous

Awesome. If you need me to do some testing let me know.

gepatto avatar Jun 13 '18 08:06 gepatto