On 19 Jun 2001, at 13:36, Sinisa Milivojevic <[EMAIL PROTECTED]> wrote:

> Dave FitzPatrick writes:
> > I recently set about upgrading our MySQL install on a Compaq Tru64 4.0f 
> > Alpha box from 3.22.25 to 3.23.38.
> >
[snip] 
>  I edited sql/Makefile and replaced the two occurrences of:
> > 
> >     -L$(top_builddir)/bdb/build_unix -ldb
> > 
> > with
> > 
> >     $(top_builddir)/bdb/build_unix/libdb.a
> > 
> > and the make proceded without further incident.
> > 
> > I'm not sure if this is a problem with Compaq's ld or something else, 
> > but I found it curious.
> 
> Definitely looks like Compaq linker bug. Some GNU linker versions have
> a similar bug.
> 
> Contact Compaq and submit the info. We have had good experience with a
> software engineer from Compaq that is maintaining their linker.

It looks like the issue is that the linker looks for the shared version 
of a library in all library directories first, so it's finding 
/usr/shlib/libdb.so and linking against that.

It seems you can pass a parameter of -oldstyle_liblookup to ld that 
forces it to look for shared libraries and then archives in each 
directory before moving on to the next.

I tried adding

        --with-mysqld-ldflags='-Xlinker -oldstyle_liblookup'

but this ended up putting it in the wrong order on the resultant 
command to ld so that it sees it as an additional -o parameter and 
causes an error.

Similar problems with defining CXXLDFLAGS.

The workaround I finally used successfully was to create a shell script 
named ld in a directory that is in my path before /usr/bin which 
contains:

        #!/bin/sh
        /usr/bin/ld -oldstyle_liblookup $*

D=
-- 
 Dave FitzPatrick                       [EMAIL PROTECTED]
 Webmaster                              978-681-1599
 Quantic Communications An MHI Company  http://www.quantic.com/

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to