When is it ok to link to host libraries?


Scott Garman <scott.a.garman@...>
 

Hello,

I'd like to get some better clarity about what constitutes host contamination when it comes to building packages. Could someone with deeper knowledge of these issues clarify or comment on the following?

My understanding is that when building non -native recipes, there should be absolutely no linking to the libraries on the host system - meaning that autotols configure scripts and so on should not be determining which features are available based on what packages are installed on the host OS. The only exceptions to this are the use of some core system utilities (cp, mv, etc).

However, when it comes to -native recipes, is it acceptable to link to the host libraries? Since the package is intended to run on the same host, I would think this would be acceptable, but I'm not certain.

The problem I'm working on which prompted this inquiry is a segfault that is occurring with QEMU in certain circumstances. The latest Ubuntu (10.10, Maverick) with the proprietary NVIDIA Xorg driver also installs its own version of libGL, which is linked by qemu-native. If I uninstall the proprietary NVIDIA driver and rebuild qemu-native from scratch, the segfault does not occur.

Thanks,

Scott

--
Scott Garman
Embedded Linux Distro Engineer - Yocto Project

Join yocto@lists.yoctoproject.org to automatically receive all group messages.