|
Error building with Raspberry Pi Debug Build |
Kev Callahan
Member #6,022
July 2005
|
Hi, Seem to have an issue (RPI with 5.2.0.0) whereby linking with 'RelWithDebInfo' Allegro build works fine, Undefined references to `glGetCompressedTexImage' and `glPopClientAttrib' 1/pi/dev/allegro-5.2.0.0/build_rpid/examples && /usr/bin/cmake -E cmake_link_script CMakeFiles/ex_acodec.dir/link.txt --verbose=no
2../lib/liballegro-debug-static.a(ogl_bitmap.c.o): In function `ogl_lock_compressed_region':
3/pi/dev/allegro-5.2.0.0/src/opengl/ogl_bitmap.c:792: undefined reference to `glGetCompressedTexImage'
4/pi/dev/allegro-5.2.0.0/src/opengl/ogl_bitmap.c:836: undefined reference to `glPopClientAttrib'
5collect2: error: ld returned 1 exit status
6examples/CMakeFiles/ex_acodec.dir/build.make:123: recipe for target 'examples/ex_acodec' failed
CMAKE commands used - OKAY: cmake .. -DSHARED=off -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-raspberrypi.cmake Any ideas..? Guess the debug build includes (or excludes) something that causes this issue..? EDIT: EDIT2: include/allegro5/platform/alplatf.h are identical on each build (ie OPENGL(ES) defines). EDIT3: Looks to me that enabling the DEBUG build causes some other compiler switch that means I need these other functions (which I guess aren't available with GLES?). Kev |
SiegeLord
Member #7,827
October 2006
|
This is concerning, but if the only thing you want is allegro.log, you can turn that on even in the release binary. Just do al_set_config_value(al_get_system_config(), "trace", "level", "debug")) somewhere before al_init (or maybe just after, I forget). "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Kev Callahan
Member #6,022
July 2005
|
Ah that's useful, thanks SiegeLord, will investigate that. Yeah a bit concerning, hoped someone else could at least verify the issue.. It may just be one of my libraries has an issue I suppose, but can't see why it would manifest like this... I'm using a yocto build.., would be good if someone who uses raspbian or whatever could check. EDIT: So it looks like enabling Debug is pulling in the OpenGL A5 file ogl_bitmap.c Aarrgghh .. Look..! First one 'normal', second one 'debug' 1[root] 21:31:45 allegro-5.2.0.0 nm ./build_rpi/CMakeFiles/allegro.dir/src/opengl/ogl_bitmap.c.o | grep CompressedTex
2 U glCompressedTexSubImage2D
3[root] 21:31:56 allegro-5.2.0.0 nm ./build_rpid/CMakeFiles/allegro.dir/src/opengl/ogl_bitmap.c.o | grep CompressedTex
4 U glCompressedTexSubImage2D
5 U glGetCompressedTexImage <---!
EDIT2: [root] 21:41:45 allegro-5.2.0.0 diff ./build_rpi/CMakeFiles/allegro.dir/flags.make ./build_rpid/CMakeFiles/allegro.dir/flags.make 5c5 < C_FLAGS = -march=armv6 -mfpu=vfp -mfloat-abi=hard -W -Wall -Wpointer-arith -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -O2 -g -DNDEBUG -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/vend/allegro-5.2.0.0/include -I/vend/allegro-5.2.0.0/build_rpid/include -DALLEGRO_SRC -DALLEGRO_STATICLINK -DALLEGRO_LIB_BUILD --- > C_FLAGS = -W -Wall -Wpointer-arith -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -g -DDEBUGMODE=1 -DD3D_DEBUG_INFO -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -I/vend/allegro-5.2.0.0/include -I/vend/allegro-5.2.0.0/build_rpid/include -DALLEGRO_SRC -DALLEGRO_STATICLINK -DALLEGRO_LIB_BUILD
Starting to look like an issue with the TOOLCHAIN incorrect on the debug build..? ** UPDATE: The flags.make differences are few now (ie -DNDEBUG as opposed to -DDEBUGMODE=1 -DD3D_DEBUG_INFO) - I guess these are sensible (although don't know why RPI needs -DD3D_DEBUG_INFO). So issue not yet resolved. [ Out of interest, the original issue that I was investigating is now not a problem - I was losing major FPS when in portrait mode and it's not A5, but using 'display_rotate=1' in /boot/config.txt kills FPS. Apparently due to the non-GPU way it does it "when the display is portrait, the HVS doesn't composite on-the-fly. It has to write a landscape buffer to memory. It then has to use the transposer hardware to convert the landscape image to a portrait image, involving another memory read and write. It then finally fetches this portrait image and outputs to the display." ] |
SiegeLord
Member #7,827
October 2006
|
Perhaps what's happening is that -O2 removes the unused function call, thus removing the need to link to that function. I filed an issue about it: https://github.com/liballeg/allegro5/issues/677 What you could do in the short term is to add !defined ALLEGRO_RASPBERRY_PI on line 720, so this function isn't compiled in. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Kev Callahan
Member #6,022
July 2005
|
That or when I get the opportunity (more than likely not till end of next week now unfortunately) I'll maybe add the optimisation flag to the debug build and see what effect that has.. Suppose it's a possibility... |
|