Skip to contentSkip to conversation

host libs in the SDK link to the host libs

DISCUSSION Aleksandar Nikolic 2 participants 2 messages Sep 12, 2024

lore
Share & tools
lore
#0 lore raw

Hi all,

one thing regarding the libs in the SDK is bugging me and I would like to understand it. In short, I cloned the poky repository, checked out the scarthgap branch and built the SDK with "bitbake -c populate_sdk core-image-weston-sdk". After installing the SDK, I checked what the ldd command is returning:

```bash
# executed from the installed SDK
ldd sysroots/x86_64-pokysdk-linux/lib/libanl.so.1
sysroots/x86_64-pokysdk-linux/lib/libanl.so.1: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.36' not found (required by sysroots/x86_64-pokysdk-linux/lib/libanl.so.1)
sysroots/x86_64-pokysdk-linux/lib/libanl.so.1: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_ABI_DT_RELR' not found (required by sysroots/x86_64-pokysdk-linux/lib/libanl.so.1)
linux-vdso.so.1 (0x00007ffdc31a2000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fade7545000)
/lib64/ld-linux-x86-64.so.2 (0x00007fade7753000)
```

Could someone tell me why is libanl.so.1 linking against the libc.so.6 host library and not the one from the SDK - sysroots/x86_64-pokysdk-linux/lib/libc.so.6? Is it because I used the host ldd?

I am also getting the same error (that the versions do not match), when trying to execute binaries built with the above SDK by using qemu-x86_64.

Cheers,
Aleksandar

#1 lore raw
Quoted 13 lines · Aleksandar Nikolic via lists.openembedded.org

Hi all,

one thing regarding the libs in the SDK is bugging me and I would like to understand it. In short, I cloned the poky repository, checked out the scarthgap branch and built the SDK with "bitbake -c populate_sdk core-image-weston-sdk". After installing the SDK, I checked what the ldd command is returning:

```bash
# executed from the installed SDK
ldd sysroots/x86_64-pokysdk-linux/lib/libanl.so.1
sysroots/x86_64-pokysdk-linux/lib/libanl.so.1: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.36' not found (required by sysroots/x86_64-pokysdk-linux/lib/libanl.so.1)
sysroots/x86_64-pokysdk-linux/lib/libanl.so.1: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_ABI_DT_RELR' not found (required by sysroots/x86_64-pokysdk-linux/lib/libanl.so.1)
        linux-vdso.so.1 (0x00007ffdc31a2000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fade7545000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fade7753000)
```
Quoted 4 lines


Could someone tell me why is libanl.so.1 linking against the libc.so.6 host library and not the one from the SDK - sysroots/x86_64-pokysdk-linux/lib/libc.so.6? Is it because I used the host ldd?
I am also getting the same error (that the versions do not match), when trying to execute binaries built with the above SDK by using qemu-x86_64.

The binaries in the SDK are executed using its own dynamic loader which tweaks the search paths. The output from the host's ldd won't be correct.

qemu probably isn't aware of or accounting for the change to the loader.

Cheers,

Richard