Closed edemirkan closed 1 year ago
In your .directfbrc file, can you try commenting out the line module-dir=lib/directfb-2.0-0 or updating it with an absolute path?
I think it should work if you add the --disable-directfb-shared option when running configure.
The failure was caused by the symbols directfb_major_version, directfb_minor_version, directfb_micro_version which are no longer defined in DirectFB2: I will restore them for compatibility with the legacy DirectFB.
Thanks for the reply, Nicolas. This worked when I added --disable-directfb-shared
But in the meantime created a mix of old and new. I guess keeping old and new side-by-side causes them to be linked together when shared param is disabled.
~/code/github/rg35xx/rg35xx-SDL2/rg35xx$ readelf -d build/.libs/libSDL2-2.0.so.0.2600.3
Dynamic section at offset 0x1b2d60 contains 39 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libasound.so.2]
0x00000001 (NEEDED) Shared library: [libm.so.6]
0x00000001 (NEEDED) Shared library: [libdirectfb-2.0.so.0]
0x00000001 (NEEDED) Shared library: [libfusion-1.7.so.7]
0x00000001 (NEEDED) Shared library: [libdirect-2.0.so.0]
0x00000001 (NEEDED) Shared library: [libfusion-2.0.so.0]
0x00000001 (NEEDED) Shared library: [libdirect-1.7.so.7]
0x00000001 (NEEDED) Shared library: [libz.so.1]
0x00000001 (NEEDED) Shared library: [libstdc++.so.6]
0x00000001 (NEEDED) Shared library: [libc.so.6]
0x00000001 (NEEDED) Shared library: [ld-linux-armhf.so.3]
0x0000000e (SONAME) Library soname: [libSDL2-2.0.so.0]
0x0000001d (RUNPATH) Library runpath: [lib/]
0x0000000c (INIT) 0x138b0
0x0000000d (FINI) 0x185a10
0x00000019 (INIT_ARRAY) 0x1c0e30
0x0000001b (INIT_ARRAYSZ) 4 (bytes)
0x0000001a (FINI_ARRAY) 0x1c0e34
0x0000001c (FINI_ARRAYSZ) 4 (bytes)
0x00000004 (HASH) 0xf4
0x6ffffef5 (GNU_HASH) 0x21a4
0x00000005 (STRTAB) 0x7d18
0x00000006 (SYMTAB) 0x3ae8
0x0000000a (STRSZ) 19191 (bytes)
0x0000000b (SYMENT) 16 (bytes)
0x00000003 (PLTGOT) 0x1c2eb8
0x00000002 (PLTRELSZ) 1424 (bytes)
0x00000014 (PLTREL) REL
0x00000017 (JMPREL) 0x13320
0x00000011 (REL) 0xd188
0x00000012 (RELSZ) 24984 (bytes)
0x00000013 (RELENT) 8 (bytes)
0x00000018 (BIND_NOW)
0x6ffffffb (FLAGS_1) Flags: NOW
0x6ffffffe (VERNEED) 0xd058
0x6fffffff (VERNEEDNUM) 4
0x6ffffff0 (VERSYM) 0xc810
0x6ffffffa (RELCOUNT) 3077
0x00000000 (NULL) 0x0
You can check EXTRA_LDFLAGS in the SDL2 Makefile (should contain "-ldirectfb -ldirect -lfusion") and verify that you have the following symbolic links in your lib directory:
libdirectfb.so -> libdirectfb-2.0.so
libdirect.so -> libdirect-2.0.so
libfusion.so -> libfusion-2.0.so
Thanks again. I did something similar, and used a script to replace those symbolic links to /opt/directfb2/
where I installed directfb2
.
So, overall, my steps were;
/opt/directfb2
.libdirectfb.so
, libdirect.so
,libfusion.so
formerly pointing to v1.7.7
to their new locations in /opt/directfb2/lib/
.PKG_CONFIG_PATH
;export PKG_CONFIG_PATH=/opt/directfb2/lib/pkgconfig/
Configure SDL2 params;
../configure --disable-joystick-virtual --disable-sensor --disable-power --disable-diskaudio --disable-video-x11 --disable-video-wayland --disable-video-kmsdrm \
--disable-video-vulkan --disable-dbus --disable-ime --disable-fcitx --disable-hidapi --disable-pulseaudio --disable-sndio --disable-libudev \
--disable-jack --disable-video-opengl --disable-video-opengles --disable-video-opengles2 --disable-oss --disable-dummyaudio --disable-video-dummy \
--enable-alsa --enable-video-directfb --enable-arm-neon --disable-directfb-shared --disable-alsa-shared \
--host=arm-linux CFLAGS="-marm -mtune=cortex-a9 -mfpu=neon-fp16 -mfloat-abi=hard -march=armv7-a -I/opt/directfb2/include/directfb"
libSDL2 is now pointing to proper shared libraries.
~/code/github/rg35xx/rg35xx-SDL2/rg35xx$ readelf -d build/.libs/libSDL2-2.0.so.0.2600.3
Dynamic section at offset 0x1b2d80 contains 35 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libasound.so.2]
0x00000001 (NEEDED) Shared library: [libm.so.6]
0x00000001 (NEEDED) Shared library: [libdirectfb-2.0.so.0]
0x00000001 (NEEDED) Shared library: [libdirect-2.0.so.0]
0x00000001 (NEEDED) Shared library: [libfusion-2.0.so.0]
0x00000001 (NEEDED) Shared library: [libc.so.6]
0x00000001 (NEEDED) Shared library: [ld-linux-armhf.so.3]
0x0000000e (SONAME) Library soname: [libSDL2-2.0.so.0]
0x0000001d (RUNPATH) Library runpath: [lib/]
0x0000000c (INIT) 0x13770
0x0000000d (FINI) 0x1858d0
0x00000019 (INIT_ARRAY) 0x1c0e50
0x0000001b (INIT_ARRAYSZ) 4 (bytes)
0x0000001a (FINI_ARRAY) 0x1c0e54
0x0000001c (FINI_ARRAYSZ) 4 (bytes)
0x00000004 (HASH) 0xf4
0x6ffffef5 (GNU_HASH) 0x21a4
0x00000005 (STRTAB) 0x7d18
0x00000006 (SYMTAB) 0x3ae8
0x0000000a (STRSZ) 18874 (bytes)
0x0000000b (SYMENT) 16 (bytes)
0x00000003 (PLTGOT) 0x1c2eb8
0x00000002 (PLTRELSZ) 1424 (bytes)
0x00000014 (PLTREL) REL
0x00000017 (JMPREL) 0x131e0
0x00000011 (REL) 0xd048
0x00000012 (RELSZ) 24984 (bytes)
0x00000013 (RELENT) 8 (bytes)
0x00000018 (BIND_NOW)
0x6ffffffb (FLAGS_1) Flags: NOW
0x6ffffffe (VERNEED) 0xcf18
0x6fffffff (VERNEEDNUM) 4
0x6ffffff0 (VERSYM) 0xc6d2
0x6ffffffa (RELCOUNT) 3077
0x00000000 (NULL) 0x0
Using the commit https://github.com/directfb2/DirectFB2/commit/185a5fce4aeb8b581c0b42fc040c83c5a1b6943a, SDL2 should now also work without specifying the --disable-directfb-shared option when running configure. Thanks for having reported the issue!
I know this may not be a question directly related to DirectFB2, but any insight is greatly appreciated. I'm cross compiling SDL2 (release-2.26.3) using the latest version of DirectFB2, again I built and installed, but only getting
directfb not available
when I start my SDL2 app.Here's my output from SDL2 configuration,
also can see directfb listed within drivers list.
full configure log
Here's my
.directfbrc
which is set within the $HOME for the app. All the directfb related libs are kept within thelibs
folder, which I set with $LD_LIBRARY_PATH.Interestingly the same setup works for directfb 1.7.7. I also verified my complied directfb2 libs are working correctly, with the provided sample apps. It's just that SDL2 can't find the video driver.