I have tried building OpenEmbedded core, with bitbake command but build fails for Apalis TK1, with bitbake target angstrom-qt-x11-image : libavahi-common.so.3 cannot open shared object file: No such file or directory
My commands:
cd oe-core
. export
bitbake -k angstrom-qt-x11-image
Error Message:
/home/ubuntu/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/avahi/0.6.32-r0/build/avahi-gobject/tmp-introspect00_sxzsc/.libs/Avahi-0.6: error while loading shared libraries: libavahi-common.so.3: cannot open shared object file: No such file or directory
| If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help.
| (typically like this: GIR_EXTRA_LIBS_PATH="${B}/something/.libs" )
| Command '['/home/ubuntu/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/avahi/0.6.32-r0/recipe-sysroot/usr/bin/g-ir-scanner-qemuwrapper', '/home/ubuntu/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/avahi/0.6.32-r0/build/avahi-gobject/tmp-introspectud1lt63s/.libs/Avahi-0.6', '--introspect-dump=/home/ubuntu/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/avahi/0.6.32-r0/build/avahi-gobject/tmp-introspectud1lt63s/functions.txt,/home/ubuntu/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/avahi/0.6.32-r0/build/avahi-gobject/tmp-introspectud1lt63s/dump.xml']' returned non-zero exit status 1
| /home/ubuntu/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/avahi/0.6.32-r0/recipe-sysroot/usr/share/gobject-introspection-1.0/Makefile.introspection:159: recipe for target 'Avahi-0.6.gir' failed
| make[2]: *** [Avahi-0.6.gir] Error 1
| make[2]: Leaving directory '/home/ubuntu/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/avahi/0.6.32-r0/build/avahi-gobject'
| Makefile:923: recipe for target 'install' failed
| make[1]: *** [install] Error 2
| make[1]: Leaving directory '/home/ubuntu/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/avahi/0.6.32-r0/build/avahi-gobject'
| Makefile:799: recipe for target 'install-recursive' failed
| make: *** [install-recursive] Error 1
| ERROR: oe_runmake failed
| WARNING: /home/ubuntu/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/avahi/0.6.32-r0/temp/run.do_install.3724:1 exit 1 from 'exit 1'
I have a libavahi-common.so.3 symlink in following location which is pointing to libavahi-common.so.3.5.3 in the same location:
Maybe you installed this library recently and didn’t update the linker cache? (Doesn’t make sense tho, otherwise it wouldn’t appear in the -p). Please execute sudo ldconfig and try rebuilding again.
In order to check if it is an environment issue, could you make a quick test making a symlink to /lib/ with the same file name of the file? In a normal scenario, I would heavily not recommend playing with the libs by hand, but if there is no collision libavahi-common.so.3 in /lib/ it should be ok (just for a quick test, delete afterwards for consistency i.e. in future updates!). Remember to update the linker cache with sudo ldconfig. Also, related to this, please double check with file /usr/lib/x86_64-linux-gnu/libavahi-common.so.3 that it is what it should be (and its origin as well: a ELF 64-bit LSB shared object, x86-64)
The output of file command
ubuntu@ubuntu-H81M-S:~$ file /usr/lib/x86_64-linux-gnu/libavahi-common.so.3
/usr/lib/x86_64-linux-gnu/libavahi-common.so.3: symbolic link to libavahi-common.so.3.5.3
I think I do not have libavahi-common.so.3 in /lib/ directory
The output of find command returns empty.
I am relatively new to linux os, I didn’t understand this part of your comment
In order to check if it is an environment issue, could you make a quick test making a symlink to /lib/ with the same file name of the file? In a normal scenario, I would heavily not recommend playing with the libs by hand, but if there is no collision libavahi-common.so.3 in /lib/ it should be ok (just for a quick test, delete afterwards for consistency i.e. in future updates!). Remember to update the linker cache with sudo ldconfig.<
If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help. (typically like this: GIR_EXTRA_LIBS_PATH=“${B}/something/.libs” )
How to set GIR_EXTRA_LIBS_PATH in the recipe, which file I have to modify or I just have to use terminal command export GIR_EXTRA_LIBS_PATH=“${B}/something/.libs” ?
Does ${B} means build path (in my case “/home/ubuntu/oe-core/build/”), am I understanding this correctly ?
Thank you.
Hello alvaro.tx, jaski.tx, I modified in oe-core/export file and inserted path of libavahi-common.so.3 using export command. It didn’t worked.
So I tried inserting this path in local.conf file. Added this as last line
This also failed.
What is the proper way of setting GIR_EXTRA_LIBS_PATH to this address “/home/ubuntu/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/avahi/0.6.32-r0/build/avahi-common/.libs”
@alvaro.tx@akshay OpenEmbedded provides its own build environment, and should only link against libraries within its sysroot. Checking the avahi host libraries or/and pointing GIR_EXTRA_LIBS_PATH to the host libraries is the wrong approach entirely.
I have libavahi-common.so.3.5.3 library in /home/ubuntu/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/avahi/0.6.32-r0/build/avahi-common/.libs
ubuntu@ubuntu-H81M-S:~/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/avahi/0.6.32-r0/build/avahi-common/.libs$ ls -l *so*
lrwxrwxrwx 1 ubuntu ubuntu 24 May 26 13:34 libavahi-common.so -> libavahi-common.so.3.5.3
lrwxrwxrwx 1 ubuntu ubuntu 24 May 26 13:34 libavahi-common.so.3 -> libavahi-common.so.3.5.3
-rwxr-xr-x 1 ubuntu ubuntu 157972 May 26 13:34 libavahi-common.so.3.5.3
ubuntu@ubuntu-H81M-S:~/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/avahi/0.6.32-r0/build/avahi-common/.libs$ file libavahi-common.so.3.5.3
libavahi-common.so.3.5.3: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=48819c1cdb497af6847d3588d999d8e529f801df, not stripped
I think all libraries and their symlinks are present in their respective paths, e.g libavahi-gobject.so is present in ${B}/avahi-gobject/.libs, libavahi-common.so.3.5.3 is present in ${B}/avahi-common/.libs, libavahi-client.so.3.2.9 is present in ${B}/avahi-client/.libs and libavahi-glib.so.1.0.2 is present in ${B}/avahi-glib/.libs.
If I copy libavahi-common.so.3 to ${B}/avahi-gobject/.libs then ‘libavahi-common.so.3 not found error’ disappears but a new error appears ‘libavahi-client.so.3: cannot open shared object file: No such file or directory’
How to set path GIR_EXTRA_LIBS_PATH to above mentioned locations ?
Unfortunately at this point, we cannot reproduce the issue. The best will be if you start from scratch by checking out the git branch in a different folder and do the bitbake compilation again.