Symbolic link not present in final image file system when using multilib feature in Yocto

43 views Asked by At

I am new to Yocto and face an issue in which the final image that I built does not have a symbolic link.

The situation is as follows: I wish to build the libpam library for both 64 (this is my target architecture) and 32 bit. To do so, I enabled the MULTILIB feature as follows: MULTILIBS = "multilib:lib32"

When I build the image, indeed I see that both libpam and lib32-libpam packages are built. During the do_install of each package, I see that the symbolic link to the libpam.so.X is created and placed under the "desired" location: For the 64 bit, it is placed under /lib64/libpam.so (points to /lib64/libpam.so.X) and for the 32 bit under /lib/libpam.so (points to /lib/libpam.so.X)

However, when examining the final image file system, the /lib/libpam.so is NOT present! Other files under /lib that are related to the 32 bit flavor libpam DO EXIST, for example, the /lib/libpam.so.X IS PRESENT).

I tried to examine all BitBake's different tasks of each on of the libpam packages (i.e. - libpam & lib32-libpam), in particular, I looked at the: do_compile, do_install, do_package, do_populate_sysroot, do_package_write_rpm - but did not find any "difference" in their behaviour.

The ONLY difference I found was in the libpam.spec Vs. lib32-libpam.spec files: In the libpam.spec (which is for the 64 bit flavor), there was the following:

//....
%files -n libpam-dev
%defattr(-,-,-,-)
%dir "/lib64"
%dir "/usr"
"/lib64/libpam.so"
"/lib64/libpam_misc.so"
"/lib64/libpamc.so"
//....

NOTE the "/lib64/libpam.so" presence.

I also tried to look at logs of the final image recipe (i.e. - my-core-image.bb) log files but did not find anything "intersting" about it.

My questions are: Does Yocto/BitBake have some "mechanism" to remove symbolic links with the same name (but that are located under a different folders)? If so - where can I see it "takes place"? Also - is it possible to disable it?

Otherwise - is there anything else I can do/change so that the 32 bit flavor symbolic link (i.e. - /lib/libpam.so) will be included in the final image file system? How do I do that?

0

There are 0 answers