Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Libraries not found : buster vs Bullseye

Featured Replies

Hello,

 

I migrated my dashboard project from a BananaPro under "Buster" to a BananaPI under "Bullseye", image took from the website, verified and up to date as per Armbian-config.

 

The source code of my project is exactly the same as well a the compilation procedure, and the used Makefile is :

cc=cc
opts=-Wall -fPIC   $(shell pkg-config --cflags lua5.1 ) $(shell pkg-config --libs lua5.1 ) 	-DDRMC_WITH_FB -DUSE_DRMCAIRO $(shell pkg-config --cflags libdrm cairo freetype2 ) -DKMS_MISSING $(shell pkg-config --libs libdrm cairo freetype2 ) 	  	  	  	 	-DPLUGIN_DIR='"/home/laurent/Projets/Selene"' -L/home/laurent/Projets/Selene 	-L/home/laurent/Projets/Selene -lSelene -lpaho-mqtt3c $(shell pkg-config --cflags lua5.1 ) -lm -ldl -Wl,--export-dynamic -lpthread

selene.o : selene.c SeleneLibrary/libSelene.h version.h Makefile 
	$(cc) -c -o selene.o selene.c $(opts) 

../Selene : selene.o Makefile 
	 $(cc) -o ../Selene selene.o $(opts) 

all: ../Selene 

 

Note : DRM, Cairo and Freetype libraries are not used in  selene.c itself but in .so which are dynamically loaded (full source code can be found on https://github.com/destroyedlolo/Selene

 

The problem : my projet is perfectly working on my Gentoo development box, as well on BananaPro/Buster but on the BananaPI/Bullseye, it's falling complaining about missing libraries :

laurent@TdB:~/Projets/Selene$ ./Selene SelenitesDRMCairo/Gfx.sel
./Selene: symbol lookup error: /home/laurent/Projets/Selene/SelDRMCairo.so: undefined symbol: FT_Init_FreeType

 

The root cause can be found with ldd

On working boxes (here gentoo one) :

laurent@torchwood ~ $ ldd /usr/local/bin/Selene 
	liblua.so.5 => /usr/lib/liblua.so.5 (0xb6f23000)
	libm.so.6 => /lib/libm.so.6 (0xb6eb6000)
	libdrm.so.2 => /usr/lib/libdrm.so.2 (0xb6e96000)
	libcairo.so.2 => /usr/lib/libcairo.so.2 (0xb6dbe000)
	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb6d1a000)
	libkms.so.1 => /usr/lib/libkms.so.1 (0xb6d07000)
	libpthread.so.0 => /lib/libpthread.so.0 (0xb6b7d000)
	libSelene.so => /usr/local/lib/libSelene.so (0xb6abc000)
	libpaho-mqtt3c.so.1 => /usr/local/lib/libpaho-mqtt3c.so.1 (0xb6a1a000)
	libdl.so.2 => /lib/libdl.so.2 (0xb6a07000)
	libc.so.6 => /lib/libc.so.6 (0xb68bf000)
	/lib/ld-linux-armhf.so.3 (0xb6f7c000)
...

 

whereas drm cairo freetype2 and dependancies are missing on the Bullseye box

 

laurent@TdB:~/Projets/Selene$ ldd Selene 
	linux-vdso.so.1 (0xbef14000)
	liblua5.1.so.0 => /lib/arm-linux-gnueabihf/liblua5.1.so.0 (0xb6f38000)
	libSelene.so => /home/laurent/Projets/Selene/libSelene.so (0xb6f16000)
	libpaho-mqtt3c.so.1 => /lib/arm-linux-gnueabihf/libpaho-mqtt3c.so.1 (0xb6e70000)
	libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0xb6e5d000)
	libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0xb6d5e000)
	libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0xb6cf6000)
	/lib/ld-linux-armhf.so.3 (0xb6f74000)
	libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0xb6cd0000)

 

Does someone having any tips why libraries are not referenced under Bullseye ?

 

Thanks

 

Laurent

  • Author

I'm suspecting a change/optimisation within GCC 10.

I tried to use -rdynamic which is supposed to add all symbols, including not used ones ... but it doesn't change anything.

 

I don't find a solution and it's blocking : I'm return back to Buster for my dashboard but I'm still investigating on other board.

 

  • Author

Hi, thanks for your reply.

 

The only package missing in Buster is libpaho-mqtt-dev so I installed it from source.

Anyway, I'll investigate about this issue as one day or another, my Gentoo boxes will move to GCC 10 (and in case someone will use my tool on recent distribs).

On 10/31/2021 at 12:12 PM, destroyedlolo said:

I'm suspecting a change/optimisation within GCC 10.

I tried to use -rdynamic which is supposed to add all symbols, including not used ones ... but it doesn't change anything.

 

I don't find a solution and it's blocking : I'm return back to Buster for my dashboard but I'm still investigating on other board.

 

odd that works, I would link:

cc -o .. ... -L<path-to-so> -lSelDRMCairo -l<other-sel-so>-lcairo .....

 

as a shared object is not linked to any library but simply a position independent object file.

  • Author

Hello,

 

I did a try on my Gentoo PC using GCC 10.3.0 (same code, same Makefile, ...).

Libraries are correctly included :

ldd Selene 
	linux-vdso.so.1 (0x00007ffdcb866000)
	liblua5.3.so.0 => /usr/lib64/liblua5.3.so.0 (0x00007fa2a4efc000)
	libm.so.6 => /lib64/libm.so.6 (0x00007fa2a4dc8000)
	libdrm.so.2 => /usr/lib64/libdrm.so.2 (0x00007fa2a4db3000)
	libcairo.so.2 => /usr/lib64/libcairo.so.2 (0x00007fa2a4c7a000)
	libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007fa2a4bb1000)
	libSelene.so => /usr/local/lib/libSelene.so (0x00007fa2a4b94000)
	libpaho-mqtt3c.so.1 => /usr/local/lib64/libpaho-mqtt3c.so.1 (0x00007fa2a4ada000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007fa2a4ad4000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa2a4ab4000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fa2a48fb000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fa2a4f5b000)
	libpixman-1.so.0 => /usr/lib64/libpixman-1.so.0 (0x00007fa2a4857000)
	libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007fa2a4810000)
...

 

So the problem is with the way  Bullseye is configured (Gcc or the linker or whatever).

 

Note : GCC is compiled with the default options, no trick, no cheat, only optimized for my processor.

 

Bye

 

Laurent

 

  • Author

Hi,

 

a test as been done on Raspbian Bullseye and it's not working as well with the same error.

Options suggested by xwiggen are already included :unsure:

 

It seems the problem is related to something upstream.

 

Any idea ?

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.