Hello all,

I was looking for a bug reporter somewhere, but this seemed to be the 
only thing listed on the website. When building authlib 0.60.2 in 
Solaris 9 with Sun Studio, the Makefile attempts to link with the 
required libraries before knowing where to go for them. See below:

/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
generating symbol list for `libauthldap.la'
/usr/ccs/bin/nm -p  .libs/authldap.o .libs/preauthldap.o 
.libs/authldaplib.o  | sed -n -e 's/^.*[       ]\([BDRT][BDRT]*\)[     
][      ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | /usr/local/bin/sed 
's/.* //' | sort | uniq > .libs/libauthldap.exp
/usr/local/gnu/bin/grep -E -e "courier_auth.*_init" 
".libs/libauthldap.exp" > ".libs/libauthldap.expT"
mv -f ".libs/libauthldap.expT" ".libs/libauthldap.exp"
echo "{ global:" > .libs/libauthldap.so.0.0.0.exp
cat .libs/libauthldap.exp | /usr/local/bin/sed -e "s/\(.*\)/\1;/" >> 
.libs/libauthldap.so.0.0.0.exp
echo "local: *; };" >> .libs/libauthldap.so.0.0.0.exp
 /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 -L/-R paths are specified. Initially this is given 
to the libtool argument and then passed on to LD, which chokes. Adding 
$LDFLAGS before the automatically generated libs solves the problem. 
I've attached a patch below that switches the order, but there might be 
a "more correct" way to fix this.

diff -ruN courier-authlib-0.60.2/Makefile.in 
courier-authlib-0.60.2.new/Makefile.in
--- courier-authlib-0.60.2/Makefile.in  2007-10-13 20:20:08.000000000 -0400
+++ courier-authlib-0.60.2.new/Makefile.in      2007-11-08 
15:34:48.537428000 -0500
@@ -92,7 +92,7 @@
 libauthldap_la_OBJECTS = $(am_libauthldap_la_OBJECTS)
 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)

Thanks,
-Dave

-- 
================================
David Halik
Systems Programmer
OSS/NBCS - OIT Rutgers
[EMAIL PROTECTED]
================================

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to