libtool
[Top][All Lists]
Advanced

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

Re: Sun Studio linking issues in Solaris 9


From: Ralf Wildenhues
Subject: Re: Sun Studio linking issues in Solaris 9
Date: Sun, 11 Nov 2007 19:12:32 +0100
User-agent: Mutt/1.5.17 (2007-11-08)

Hello David,

Thanks for the report.

* David Halik wrote on Sun, Nov 11, 2007 at 07:03:21PM CET:
>
> /bin/bash ./libtool --tag=CC   --mode=link cc  -I.. -I./.. -module -rpath 
> /usr/local/lib/courier-authlib -export-symbols-regex 'courier_auth.*_init' 
> -lldap -llber -lresolv  -lsocket -lnsl -L/usr/local/ssl/lib 
> -R/usr/local/ssl/lib -L/usr/local/lib -R/usr/local/lib 
> -L/usr/local/lib/courier-authlib -R/usr/local/lib/courier-authlib -o 
> libauthldap.la  authldap.lo preauthldap.lo authldaplib.lo 
> libcourierauthcommon.la
[...]
> /usr/ccs/bin/ld -G -M .libs/libauthldap.so.0.0.0.exp -h libauthldap.so.0 -o 
> .libs/libauthldap.so.0.0.0  .libs/authldap.o .libs/preauthldap.o 
> .libs/authldaplib.o  
> -R/usr/local/src/rpm-packages/BUILD/courier-authlib-0.60.2/.libs 
> -R/usr/local/lib/courier-authlib -R/usr/local/ssl/lib -R/usr/local/lib 
> -L/usr/local/src/rpm-packages/BUILD/courier-authlib-0.60.2/.libs -lldap 
> -llber -lresolv -lsocket -lnsl -L/usr/local/ssl/lib -L/usr/local/lib 
> -L/usr/local/lib/courier-authlib ./.libs/libcourierauthcommon.so -lc
> ld: fatal: library -llber: not found
> ld: fatal: File processing errors. No output written to 
> .libs/libauthldap.so.0.0.0
>
> The problem lies in the fact that the autoresolved -l dependencies are put 
> down before the user added -L/-R paths are specified.

Yes. But:

[...]
> libauthldap_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
>       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
> -       $(libauthldap_la_LDFLAGS) $(LDFLAGS) -o $@
> +       $(LDFLAGS) $(libauthldap_la_LDFLAGS) -o $@
> am_libauthmysql_la_OBJECTS = authmysql.lo preauthmysql.lo \
>       authmysqllib.lo
> libauthmysql_la_OBJECTS = $(am_libauthmysql_la_OBJECTS)

This suggests that -l flags are ut in libauthldap_la_LDFLAGS.
This isn't right.  Put them in libauthldap_la_LIBADD, or in LIBS,
then they appear after LDFLAGS and everything will work as intended.

Hope that helps.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]