openFrameworks icon indicating copy to clipboard operation
openFrameworks copied to clipboard

[libs] - Install from git on linux errors

Open dimitre opened this issue 9 months ago • 16 comments

I'm testing now on linux, following the guide https://github.com/openframeworks/openFrameworks/blob/master/INSTALL_FROM_GITHUB.md

so the install script now changed to

scripts/dev/download_libs.sh -p linux64

but it doesnt work. it points to a 404 path: ideas? @ofTheo @danoli3

https://github.com/openframeworks/apothecary/releases/download/latest/openFrameworksLibs_latest_linux64.tar.bz2

dimitre avatar Apr 03 '25 15:04 dimitre

the difference is gcc6 in the name. so it seems to work if we instead use: scripts/dev/download_libs.sh -p linux64gcc6 Apothecary or the guide should change to avoid 404

dimitre avatar Apr 03 '25 15:04 dimitre

installing libs on RPI still uncompressing on wrong folder. $of/libs/openFrameworksLibs_bleeding_linuxaarch64

dimitre avatar Apr 03 '25 15:04 dimitre

thanks @dimitre I'll see if I can track down both of these issues and fix.

for RPI - can you test with the nightly builds?

ofTheo avatar Apr 03 '25 17:04 ofTheo

Yes I'll be testing this afternoon. Other than this observations I would suggest moving aside openFrameworks/of script until after the release

dimitre avatar Apr 03 '25 17:04 dimitre

Finally it compiled latest nightly on RPI (took a while and freeze once) First test failed:

🔗 Linking bin/assimp3DModelLoaderExample for linuxaarch64
g++ -o bin/assimp3DModelLoaderExample  obj/linuxaarch64/Release/src/ofApp.o obj/linuxaarch64/Release/src/main.o  ../../../addons/obj/linuxaarch64/Release/ofxAssimpModelLoader/src/ofxAssimpTexture.o ../../../addons/obj/linuxaarch64/Release/ofxAssimpModelLoader/src/ofxAssimpAnimation.o ../../../addons/obj/linuxaarch64/Release/ofxAssimpModelLoader/src/ofxAssimpModelLoader.o ../../../addons/obj/linuxaarch64/Release/ofxAssimpModelLoader/src/ofxAssimpMeshHelper.o  ../../../libs/openFrameworksCompiled/lib/linuxaarch64/libopenFrameworks.a  -Wl,-rpath=./libs:./bin/libs:./ -Wl,--as-needed -Wl,--gc-sections -no-pie ../../../libs/kiss/lib/linuxaarch64/libkiss.a ../../../libs/tess2/lib/linuxaarch64/libtess2.a -lgstapp-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstreamer-1.0 -ludev -lfontconfig -lfreetype -lsndfile -lopenal -lssl -lcrypto -lcurl -lglfw -lrtaudio -lpulse-simple -lpulse -pthread -lasound -lGLEW -lGL -lX11 -lGLU -lgtk-3 -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lmpg123 -lGLESv1_CM -lGLESv2 -lEGL -lassimp  -lglut -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -ldl -lpthread -lfreeimage -lpugixml -luriparser -lXinerama
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/12/../../../aarch64-linux-gnu/crt1.o: in function `__wrap_main':
(.text+0x38): undefined reference to `main'
collect2: error: ld returned 1 exit status
make[1]: *** [../../../libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:411: bin/assimp3DModelLoaderExample] Error 1
make[1]: Leaving directory '/home/pi/of_v20250403_linuxaarch64_release/examples/3d/assimp3DModelLoaderExample'
make: *** [../../../libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:131: Release] Error 2

dimitre avatar Apr 03 '25 19:04 dimitre

RPI - emptyExample compiles ok 3d/3DPrimitives.. compiles ok runs ok (visually different, no wireframe)

dimitre avatar Apr 03 '25 19:04 dimitre

That error with assimp3DModelLoaderExample is really weird as main.o is being linked. Do the ofxAssimp examples work?

ofTheo avatar Apr 03 '25 20:04 ofTheo

ofxAssimpExample compiled ok running it returns this error:

[ error ] ofAppGLFWWindow: 65543: GLX: Failed to create context: GLXBadFBConfig
[ error ] ofAppGLFWWindow: couldn't create GLFW window
Segmentation fault

dimitre avatar Apr 03 '25 21:04 dimitre

I'll remove obj folder and try to compile again as main.o has zero bytes -rw-r--r-- 1 pi pi 0 Apr 3 15:19 main.o -rw-r--r-- 1 pi pi 0 Apr 3 15:19 ofApp.o

dimitre avatar Apr 03 '25 21:04 dimitre

Ok, now compiled ok, running gives the same error

[ error ] ofAppGLFWWindow: 65543: GLX: Failed to create context: GLXBadFBConfig
[ error ] ofAppGLFWWindow: couldn't create GLFW window
[verbose] ofxAssimpModelLoader: load(): loading "Fox/Fox_05.fbx"
[verbose] ofxAssimpModelLoader: loadGLResources(): starting
[verbose] ofxAssimpModelLoader: loadGLResources(): loading mesh 0
[verbose] ofxAssimpModelLoader::loadGLResources: : mesh is one sided
[verbose] ofxAssimpModelLoader: loadGLResource(): loading Diffuse image from "../../_savedTextures/ANIMALS/fox_00Surface_Color.png"
[verbose] ofxAssimpModelLoader: loadGLResource() texture "fox_00Surface_Color.png" is embedded 
[verbose] ofxAssimpModelLoader: loadGLResource() texture size is 1024x1024
[verbose] ofxAssimpModelLoader: loadGLResource(): texture Diffuse loaded, dimensions: 1024x1024
Segmentation fault
make: *** [../../../libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:195: RunRelease] Error 139

there is a proposed fix here https://askubuntu.com/questions/1369900/x-error-of-failed-request-glxbadfbconfig

if I export this before

export MESA_GL_VERSION_OVERRIDE=4.5

it opens a blank window and throw some errors:

[verbose] ofMaterial:  fragment2DHeader------------------- 
[verbose] #version 150

#define IN in
#define OUT out
#define TEXTURE texture
#define FRAG_COLOR fragColor
out vec4 fragColor;
#define SAMPLER sampler2D

[verbose] ofMaterial:  fragment2DHeader 
[verbose] ofShader: checkAndCreateProgram(): creating GLSL program
[verbose] ofShader: setupShaderFromSource(): OpenGL error after checkAndCreateProgram() (probably harmless): error 1282
[ error ] ofShader: setupShaderFromSource(): GL_VERTEX_SHADER shader failed to compile
[ error ] ofShader: GL_VERTEX_SHADER shader reports:
0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, and 1.00 ES

[ error ] ofShader: GL_VERTEX_SHADER, offending line 10:
	    8	#define HAS_TEXTURE 0
	    9	#define HAS_COLOR 0
	   10	
	   11	OUT vec2 v_texcoord; // phong pass the texCoord if needed
	   12	OUT vec3 v_transformedNormal;

and a lot of other errors all related to GLSL versions.

I've tried also

export MESA_GL_VERSION_OVERRIDE=3.2

with the same results.

dimitre avatar Apr 03 '25 21:04 dimitre

This seems to make it run, but very slow. Maybe there is a better fix.

export LIBGL_ALWAYS_INDIRECT=0
export MESA_GL_VERSION_OVERRIDE=4.5
export MESA_GLSL_VERSION_OVERRIDE=450
export LIBGL_ALWAYS_SOFTWARE=1

dimitre avatar Apr 03 '25 21:04 dimitre

ofxAssimpExample compiled ok running it returns this error:

[ error ] ofAppGLFWWindow: 65543: GLX: Failed to create context: GLXBadFBConfig
[ error ] ofAppGLFWWindow: couldn't create GLFW window
Segmentation fault

I bet its the GL version in main.cpp Can you try commenting out this line ( and not doing any of the MESA / Export stuff ) ? https://github.com/openframeworks/openFrameworks/blob/master/examples/3d/ofxAssimpExample/src/main.cpp#L11

99% sure that will fix it :D

ofTheo avatar Apr 03 '25 22:04 ofTheo

@ofTheo in fact the one that I'm testing is 3DPrimitivesExample, but it fixed by commenting out setGLVersion. much better. 15fps vs 2fps on RPI 3B+

dimitre avatar Apr 03 '25 22:04 dimitre

Nice @dimitre

I wonder if we should comment out all the settings.setGLVersion calls for the RPI release as part of the Create Package script?

Or wrap in an Ifndef ?

ofTheo avatar Apr 04 '25 15:04 ofTheo

Wrapping in ifndef will be easier now. if we have a better idea after the release we can change again

dimitre avatar Apr 04 '25 15:04 dimitre