Search code examples
cross-compilingldyocto

Yocto cross compiling, creating symbolic link for "ld-linux-armhf.so.3"


I have pre-compiled libraries that I must include (already cross-compiled for right arch) in my yocto image. The recipe is created, and the libraries are all present.

However, my vendor provided the libraries, which reference "/lib/ld-linux.so.3". My yocto image only has "/lib/ld-linux-armhf.so.3". Because of this, when running bitbake, I get Can't install my-recipe-1.0-r0@cortexa9hf_vfp_neon: no package provides ld-linux.so.3(GLIBC_2.4)

How can I rectify this? Have my vendor provide libs which reference "ld-linux-armhf.so.3"? Create a symbolic link at "/lib/ld-linux.so.3"? If so, how do I do this in Yocto?


Solution

  • If telling the vendor to correct their mistake (which it is) isn't possible (which is also likely the case) then you should be able to do something like create meta-mylayer/recipes-core/glibc/glibc_%.bbappend with:

    do_install_append_tune-cortexa9hf () {
            ln -s /lib/ld-linux-armhf.so.3 ${D}/lib/ld-linux.so.3
    }
    

    And then rebuild glibc. If you're on an older release that is still eglibc not glibc, change as appropriate.