[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: configure level change on arm to build PIC until glibc-2.2?



On Mon, 28 Aug 2000, Adam C Powell IV wrote:
> Why on earth is a shared lib linking against a static lib?

Don't know.  I tried linking against the shared libmysqlclient.so, but got
unresolved symbols when apache tried to load the module.  There was likley
an error on my part in modifying the cc switches.

The original switch was 

-Wl,/<path to>/libmysqlclient.a 

I changed it to 

-Wmysqlclient.so

which, I noticed after rereading the gcc manpage, is not the same.  I
don't know why they are linking against the static library.  This would be
a good question for the maintainer.

The same problem occurs with pgsql, in that mod_auth_pgsql.so is linked
against libpq.a.
> 
> We had this problem before with ORBit, which was building its shared libs from
> static ones.  The solution was a pretty messy edit to configure.in and a
> Makefile.am to recompile all objects -fPIC for the shared libs.  Sounds like this
> may be required here too.
> 
> Scott Bambrough wrote:
> 
> > > 3)  I'm not aware of any problems that will be caused by having all
> > objects
> > > (and hence libraries) made position independent.
> >
> > Poorer code generated for static executables; useless register loads.
> > Results in a performance penalty, larger code size.
> 
> This is why Debian policy requires shared objects to be built with -fPIC, static
> without (section 4.2).  If something is not being built this way, a bug report
> would be in order.
> 
> -Adam P.
I will create one for the maintainer of apache.   It will have to wait a
bit though.
> 
> Welcome to the best software in the world today café!
> 
Chris



Reply to: