Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not build to Raspberry Pi 4 #2223

Open
jlgangwisch opened this issue Jan 31, 2021 · 1 comment
Open

Could not build to Raspberry Pi 4 #2223

jlgangwisch opened this issue Jan 31, 2021 · 1 comment

Comments

@jlgangwisch
Copy link

this is all on a fresh install of Raspberry Pi OS version 5.4 (with recommended software) on a Pi4 4GB. I am following the guide and using clang.

following the advice in the link, I followed the Pi 3 guide, installing additional X dependencies and built for targe_gl=es3: https://discourse.libcinder.org/t/running-on-a-rapberry-pi-4-solved/1595

I had to install a few more dependencies than what were listed there. I would google the error each time and find an additional needed library in an unrelated forum. Eventually it stopped giving me dependency-based errors.

I then ran into "fatal error: use of undeclared identifier 'GL_R16'"

I eventually figured out that cinder/include/glad/glad_es.h did not include definitions for:

GL_R16
GL_RG16
GL_RGB16
GL_RGBA16
GL_R16_SNORM
GL_RG16_SNORM
GL_RGB16_SNORM
GL_RGBA16_SNORM

I googled similar header documents and put in definitions that may or may not be accurate. Most came from glext.h from the khronos group opengl registry, but a few were also not included there. When I found them in other header files around the internet they seemed to be duplicates of the hexadecimals for the GL_xxx16_EXT definitions.

After adding those definitions, I was able to build the library, but not the BasicApp project.

When I try to build the BasicApp project I get "error: linker command failed with exit code 1 (use -v to see invocation). I've been trying for a while to figure this one out and haven't been able to, so I'm giving up and posting all this information here.

Thank you for all that you do.

@claybudin
Copy link

claybudin commented Mar 9, 2022

I have build Cinder on the Raspberry Pi 4B and been able to build and run the BasicApp and many more (but not all) of the samples. I was following these instructions:

https://www.libcinder.org/docs/guides/linux-notes/rpi3.html

It is true that there are additional dependencies not listed there:

sudo apt-get install libxrandr-dev libxinerama-dev libxi-dev

and that the correct target is es3-rpi, not es2-rpi

cmake .. -DCINDER_TARGET_GL=es3-rpi

for both Cinder and the samples.

But with those changes BasicApp will build and run. I did not see any errors about 'GL_R16'.

When I went to build the other samples, there were other adjustments necessary, including
changing the #version 150 in shaders to #version 310 es, and adding the line:

precision mediump float;

Changing many references to Font to ci::Font, stuff like that.

i would suggest closing this issue.

Clay Budin
NYC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants