httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rasmus Lerdorf <>
Subject Re: apxs problem
Date Thu, 19 Nov 1998 17:48:55 GMT
> > -I/usr/local/apache/include  -c mod_php3.c
> > ld -Bshareable -o mod_php3.o libmodphp3-so.a
> > -rpath,/usr/local/lib/mysql -L/usr/local/lib/mysql -L/usr/local/ldap/lib
> > -lmysqlclient -lldap -llber -lgdbm -lttf -lgd -lm -ldl -lcrypt -lnsl
> > -lresolv 
> >
> > That should have been -rpath not -path
> > ld: unrecognized option `-path,/usr/local/lib/mysql'
> > apxs:Break: Command failed with rc=65536
> You present really interesting things, Rasmus.  Look above in the generated ld
> line. There _IS_ -rpath,xxx. I don't know why your linker hates it. But apxs
> does it correct, as I see it.

Ok, I think I understand the problems.  First of all, it sort of sucks
that I can't do an explicit "regex/libregex.a" as opposed to having to do
it with a -lregex because option parsing stops as soon as it sees that
file.  But I can work around that, I guess.

The bigger problem is that when the -rpath expression gets to ld it needs
to have it in the form:

   ld -rpath /usr/local/lib/mysql

Both gcc and apxs would like to see -Wl,-rpath,/usr/local/lib/mysql
because it needs to be a single arg to both.  If I change it to
"-Wl,-rpath /usr/local/lib/mysql" both gcc and apxs will get confused
because it isn't expecting a directory argument at that point.

So, when I feed apxs -Wl,-rpath,/usr/local/lib/mysql it really should be
converted to just -rpath /usr/local/lib/mysql

However, I can get around it by using "-Wl,-rpath /usr/local/lib/mysql"
(with the quotes).  That appears to work for both gcc and apxs.


View raw message