uname(1) on UnixWare (Solaris)
ovehk at ping.uio.no
Wed Jun 6 14:35:45 CDT 2001
On Wed, 6 Jun 2001, Francois Gouget wrote:
> On Thu, 7 Jun 2001, Bang Jun-Young wrote:
> > Oops, I'm sorry. It wasn't a compilation error. I got number of
> > linking errors with winetest:
> > perl.o(.text+0xc7f): undefined reference to `environ'
> > perl.o(.text+0x4077): undefined reference to `environ'
> > ...
> > util.o(.text+0x794): undefined reference to `environ'
> > ...
> > All of above object s are in lib/libperl.a.
Exactly *which* link command fails like this?
Also, state the binutils version. For example, I know there was a
-Bsymbolic bug introduced in 188.8.131.52.5 (a snapshot release?) that hit
some debian-unstable users before it was fixed in 184.108.40.206.7, according
to the changelog.Debian file.
> Hmm, linking with libperl.a to get 'environ' seems
> wrong. 'environ' is a C library thing, it should be in a C library
> too. What does 'nm /usr/lib/libperl.a | grep -w environ' print? Here I
> get a number of
> U environ
> Which means environ is not defined in libperl (U=Undefined, i.e. get
> it elsewhere).
This is hardly interesting. It's obvious (and natural) that libperl
doesn't define it, otherwise the reference would probably not be
undefined... it's a libc symbol.
> Maybe the command that is issued for the link is wrong. Part of it is
> provided by perl itself which is supposed to know best. But here I had
> to create a symbolic link from '/usr/lib/libperl.so' to
> '/usr/lib/libperl.so.5.6.0' so I don't trust it entirely.
Did you install libperl-dev?
> > Without -Bsymbolic, I had no problem.
> Maybe but '-Bsymbolic' is very important for Wine and I doubt you
> will get a working Wine without it. But Alexandre is the real
> specialist who can explain why '-Bsymbolic' is needed.
I'd think he has better things to spend his time on than to explain this
again. Summary: -Bsymbolic is necessary for the DLL import mechanism to
work; it is imperative that when the .so is created, the imported symbols
are immediately linked to the import stubs (which winebuild generates)
when linking the .so. Without -Bsymbolic, this doesn't happen during link,
and the imports will be handled by ld.so instead. And that... can get BAD.
More information about the wine-devel