Libraries not found : buster vs Bullseye


1 1

Recommended Posts



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 :

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


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/ 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 => /usr/lib/ (0xb6f23000) => /lib/ (0xb6eb6000) => /usr/lib/ (0xb6e96000) => /usr/lib/ (0xb6dbe000) => /usr/lib/ (0xb6d1a000) => /usr/lib/ (0xb6d07000) => /lib/ (0xb6b7d000) => /usr/local/lib/ (0xb6abc000) => /usr/local/lib/ (0xb6a1a000) => /lib/ (0xb6a07000) => /lib/ (0xb68bf000)
	/lib/ (0xb6f7c000)


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


laurent@TdB:~/Projets/Selene$ ldd Selene (0xbef14000) => /lib/arm-linux-gnueabihf/ (0xb6f38000) => /home/laurent/Projets/Selene/ (0xb6f16000) => /lib/arm-linux-gnueabihf/ (0xb6e70000) => /lib/arm-linux-gnueabihf/ (0xb6e5d000) => /lib/arm-linux-gnueabihf/ (0xb6d5e000) => /lib/arm-linux-gnueabihf/ (0xb6cf6000)
	/lib/ (0xb6f74000) => /lib/arm-linux-gnueabihf/ (0xb6cd0000)


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





Link to post
Share on other sites

Donate and support the project!

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.

Link to post
Share on other sites



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

Libraries are correctly included :

ldd Selene (0x00007ffdcb866000) => /usr/lib64/ (0x00007fa2a4efc000) => /lib64/ (0x00007fa2a4dc8000) => /usr/lib64/ (0x00007fa2a4db3000) => /usr/lib64/ (0x00007fa2a4c7a000) => /usr/lib64/ (0x00007fa2a4bb1000) => /usr/local/lib/ (0x00007fa2a4b94000) => /usr/local/lib64/ (0x00007fa2a4ada000) => /lib64/ (0x00007fa2a4ad4000) => /lib64/ (0x00007fa2a4ab4000) => /lib64/ (0x00007fa2a48fb000)
	/lib64/ (0x00007fa2a4f5b000) => /usr/lib64/ (0x00007fa2a4857000) => /usr/lib64/ (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.






Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


1 1