Subject: Re: Building wget: ssl problems
To: Jan Schaumann <jschauma@netmeister.org>
From: Hisashi T Fujinaka <htodd@twofifty.com>
List: current-users
Date: 03/24/2003 18:56:37
On Mon, 24 Mar 2003, Jan Schaumann wrote:

> Hisashi T Fujinaka <htodd@twofifty.com> wrote:
> > On Thu, 20 Mar 2003, Frederick Bruckman wrote:
> >
> > > On Thu, 20 Mar 2003, Hisashi T Fujinaka wrote:
> > >
> > > > I guess finals really have fried my brain. I'm unable to figure out why
> > > > wget isn't finding the ssl libraries. It fails with:
> > >
> > > > In config.log I also see:
> > > >
> > > > int main() { RSA_new() ; return 0; } configure:7382: checking for
> > > > SSL_new in -lssl configure:7401: cc -o conftest -O2
> > > >     -I/usr/pkg/include -I/usr/include -I/usr/pkg/include -L/usr/lib
> > > >     /usr/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib conftest.c -lssl -lintl
> > > > 1>&5 ld:/usr/lib: file format not recognized; treating as linker
> > > > script ld:/usr/lib:1: parse error
> > >
> > > There's a naked "/usr/lib" in there. (I added whitespace to make it
> > > easier to see.) If you can figure out where that's coming from, your
> > > problem is solved.
> >
> > That's what I thought it was, so I started defining SSLBASE, deleting
> > /etc/mk.conf, etc.
> >
> > I'm kind of at a loss now. I suppose this is, once again, just my system. :)
>
> No, it's not.  I'm seeing the same problem on Linux and Irix, but not on
> NetBSD.  On NetBSD, that line is
>
> configure:7353: cc -o conftest -O2 -march=pentium -mcpu=pentiumpro
> -I/usr/pkg/include -I/usr/include   -I/usr/pkg/include -L/usr/lib -R/usr/lib
> -Wl,-R/usr/pkg/lib -L/usr/pkg/lib conftest.c -lcrypto   -lintl 1>&5
>
> Note the second line: "[...] -I/usr/pkg/include -L/usr/lib -R/usr/lib"
>
> On Linux and NetBSD, that becomes:
> configure:7353: cc -o conftest -O2 -O2 -mcpu=pentiumpro -march=pentium
> -I/usr/pkg/include -I/usr/pkg/include
> -I/usr/pkg/include -L/usr/pkg/lib /usr/pkg/lib  -Wl,-R/usr/pkg/lib
> -L/usr/pkg/lib conftest.c -lcrypto  -ldl  1>&5
>
> Here, the important part is the third line:
> "[...] -L/usr/pkg/lib /usr/pkg/lib  -Wl,-R/usr/pkg/lib"
>                    ^^^^^
>
> I believe that somewhere along the way there was a flag that *should*
> pass RPATH_FLAG in there, but doesn't.  It seems as if it's passing "-R"
> under NetBSD, but I couldn't find where that is set.  I suspect some
> buildlink2 magic...

This was fixed for me when Julio Marino checked in a change that merged
patch-ah and patch-ai on March 22.

-- 
Hisashi T Fujinaka - htodd@twofifty.com
BSEE (6/86) + BSChem (3/95) + BAEnglish (8/95) + $2.50 = mocha latte