From: Stephen R B. <sbe...@us...> - 2004-08-16 17:26:46
|
In AIX, LIBPATH only affects runtime, shared libraries. To get ld to find the libraries add the -L option to your link. -L/opt/freeware/bin -lssl (you say /opt/freeware/bin, but change it to /opt/freeware/lib or whereever libssl.a can be found.) Regards, Steve Behling __________________ Steve Behling CFD Application Specialist, IBM Deep Computing Phone: 612-626-8926 Cell phone: 651-303-0679 aix...@ww... wrote on 08/16/2004 07:44:46 AM: > Hi All, > > I'm trying to build openldap (with a postgresql backend) and ssl support. > Unfortunately, I seem to be unable to convince ld (which is /usr/ccs/bin/ld) > to look for libssl.a in /opt/freeware/bin, even with a small test-program, > it fails: > > $ env > PATH=/usr/local/bin:/usr/local/pgsql/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb: > /home/remco/bin:/usr/bin/X11:/sbin:. > LDFLAGS=-Wl,-bnoquiet,-blibpath:/opt/freeware/lib:/usr/lib:/lib:/usr/local/lib > CC=gcc > CPPFLAGS=-I/opt/freeware/include -I/usr/local/include > LD_LIBRARY_PATH=/usr/lib:/lib:/opt/freeware/lib:/usr/local/lib > LIBPATH=/usr/lib:/lib:/opt/freeware/lib:/usr/local/lib > <and some more> > > $ gcc $CFLAGS $CPPFLAGS $LDFLAGS -lssl a.c > ld: 0706-006 Cannot find or open library file: -l ssl > ld:open(): A file or directory in the path name does not exist. > > a.c is as simple as: > > char SSL_library_init(); > > int main() { > SSL_library_init() > ; return 0; } > > but if I look in /opt/freeware/lib: > > $ ls /opt/freeware/lib > ethereal libglib-1.2.so.0.0.10 libgtk-1.2.so.0 > libpopt.so.0.0.0 libssl.a > libbz2.a libglib.so libgtk-1.2.so.0.9.1 > librpm.so libz.a > libcrypto-static.a libgmodule-1.2.so.0 libgtk.so > librpm.so.0 rpm > libcrypto.a libgmodule-1.2.so.0.0.10 libintl.a > librpm.so.0.0.0 rpmpopt > libgdk-1.2.so.0 libgmodule.so libltdl.a > librpmbuild.so rpmrc > libgdk-1.2.so.0.9.1 libgthread-1.2.so.0 libltdl.la > librpmbuild.so.0 > libgdk.so libgthread-1.2.so.0.0.10 libpopt.so > librpmbuild.so.0.0.0 > libglib-1.2.so.0 libgthread.so libpopt.so.0 > libssl-static.a > > the same problem occurs if I try to use cc_r as my c-compiler.... > > -- > Met vriendelijke groeten, > > Remco Post > > SARA - Reken- en Netwerkdiensten http://www.sara.nl > High Performance Computing Tel. +31 20 592 3000 Fax. +31 20 668 3167 > > "I really didn't foresee the Internet. But then, neither did the > computer industry. Not that that tells us very much of course - the > computer industry didn't even foresee that the century was going to > end." -- Douglas Adams > _______________________________________________ > aixtoolbox-list mailing list > aix...@ww... > http://www-124.ibm.com/developerworks/oss/mailman/listinfo/aixtoolbox-list |