Subject: Re: Building wget: ssl problems
To: None <>
From: Jan Schaumann <>
List: current-users
Date: 03/24/2003 21:44:10
Hisashi T Fujinaka <> 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...


Wenn ich tot bin, mir soll mal Einer mit Auferstehung oder so
kommen, ich hau ihm eine rein! (Anonym)