tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: FireFox 10.0.1 pkg for testing



On Thu, Mar 01, 2012 at 08:58:52AM +0100, John Marino wrote:
> I was able to recreate this error on tinderbox-dragonfly.
> Would linking libkvm statically solve this?

Could someone describe the problem again, please?
Last error messages I saw had:

> process_util_bsd.cc:(.text+0x859): undefined reference to `kvm_open'
> process_util_bsd.cc:(.text+0x885): undefined reference to `kvm_getprocs' 
> process_util_bsd.cc:(.text+0x9b2): undefined reference to `kvm_close'  

are these gone with libkinfo/libkvm or whatever?

/usr/libexec/binutils221/elf/ld: libxul.so: hidden symbol `kvm_getprocs' isn't 
defined

This might be a missing include or something, please check how kvm_getprocs
is defined when used in process_util_bsd.cc. It could be a wrong extern
declaration, which (due to default visibility hidden) needs an explicit
visibility attribute. An example for this happening is the extern declaration
of "environ" in the same source file:

#ifdef HAVE_POSIX_SPAWN
#include <spawn.h>
extern "C" char **environ __dso_public;
#endif

without the __dso_public, which is defined as:

         __attribute__((__visibility__("default")))

this would cause a reference to an environ variable defined somewhere
in *this* shared library, but not exported from there/imported from
some other shared lib. To make clear this symbol is imported from some
other library, a shared reference is needed, via the PLT, so ld.elf_so
can resolve it (and the linker does not bail).

You can use objdump -T to verify your likvm (or whatever) properly exports
kvm_getprocs as a public symbol, and you can use c++ -save-temps to look at
the expanded (.i) file post preprocessing and check, how/which declaration
for the function is effective when compiling process_util_bsd.cc.

Hope this helps,

Martin


Home | Main Index | Thread Index | Old Index