httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From colin_e <coli...@bigfoot.com>
Subject Re: Re: [users@httpd] configure of 2.0.52 fails to find Berkeley DB
Date Thu, 09 Dec 2004 11:47:51 GMT
Re:

> > 3) Unless i'm doing something wrong, the LDFLAGS option appears not to 
> > work. I.e-
> > 
> >  env CC=gcc LD_LIBRARY_PATH='/local/opt/bdb/lib:/opt/sfw/lib' 
> >  ./configure...
> > 
> >  ...Will work. But-
> > 
> >  env CC=gcc LDFLAGS='-L/local/opt/bdb/lib -L/opt/sfw/lib'
> >  ./configure...

> In what way does that not work?

If I try to use the LDFLAGS version, the configure fails at the BerkeleyDB
step with a "-ldb" error again. This could just be a problem with configure
not using the LDFLAGS correctly when it builds the BerkeleyDB test program,
but I think there is a wider problem with LDFLAGS (or the way i'm using it)
(see below).

> > The latter is a pain, because it means that although I can now compile
> > and install Apache I can't use-
> > 
> >  env CC=gcc LDFLAGS='-L/local/opt/bdb/lib -L/opt/sfw/lib 
> >  -R/local/opt/bdb/lib:/opt/sfw/lib'
> >  ./configure...
> > 
> > to resolve the libs at runtime

> why not?  That or using LD_RUN_PATH is the best solution.

Because as far as I can see LDFLAGS isn't working at all. I can see the
options being passed along to gcc etc. in the log, but they don't appear
to be effective.

Symptoms-

1) As described above, using LDFLAGS='-Lpath' directives does not resolve
   libs at build time, whereas LD_LIBRARY_PATH='path' does.

2) I have libgcc.so in /local/lib. Even though I specified
   LDFLAGS='... -R/local/lib:...' during the build, the httpd binary won't
   run because the loader can't resolve libgcc. If I add /local/lib
   to LD_LIBRARY_PATH then run httpd it's fine.


> Other alternatives which should make all the pain go away:
> 
> 1) add the BDB library path to the global system library search path 
> using crle
> 
> 2) compile BDB statically only, --disable-shared --enable-static

(1) Is a new one on me. I'll look into it. Sounds as if it could have
    security implications if set up incorrectly.

(2) OS gurus have always told me dynamic libs are a "good thing" under
    most circumstances, so that's the way I generally go. My development
    machine is pretty small, so I don't want a big static binary chewing
    up all my memory.

For the moment I have a wrapper round the apache binaries that sets
LD_LBRARY_PATH, and things seem to be running ok, auto-starting apache
on boot now for example. Thanks for the help to get this far.

At this point it's arguably an academic point as to why LDFLAGS doesn't
seem to work. However I always worry that if you don't pin these things
down the first time, they will come back and get you later.

Regards: Colin




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message