[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Library issue on AIX 5.2



This thread is no longer discussing OpenLDAP software. If you don't know how to link files on your platform, you should go read your platform's documentation. If that doesn't help, you can probably get relevant answers in news:comp.unix.aix ...

As a side note - it's generally a bad idea to use GNU ld on AIX. Stick with the native AIX linker.

Chapman, Kyle wrote:

heres what ive done in the past...  havent don this on the newer openldap libs on aix...

create export file:
nm -B <static lib>|sed -n -e 's/^.*[     ]\([BCDT]\)[    ][      ]*\(\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p' | sed 's/.* //' | sort | uniq > <output exp file name>.exp
example...
nm -B liblber.a|sed -n -e 's/^.*[     ]\([BCDT]\)[    ][      ]*\(\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p' | sed 's/.* //' | sort | uniq > ../liblber.exp

ar -x <static lib>

create library:
cc -bM:SRE -o <out> *.o -L<library search path> -lc <other libs> -bE:../<exp file name>.exp -bnoentry -bnoquiet
example...
cc -bM:SRE -o libldap.a *.o -L/usr/local/lib -lc -llber -lssl -lcrypto -bE:../libldap.exp -bnoentry -bnoquiet


the formating of the spaces matters!! i also used the ibm c compiler, and this was done for 32 bit builds... i think ive used ibm's ld for this as well (creating the lib), its been a while...

please note that i used this on aix 4.3.3 and 5.1. havent tried this on 5.2, so things may have changed enough that this wont produce anything useful.




--
 -- Howard Chu
 Chief Architect, Symas Corp.       Director, Highland Sun
 http://www.symas.com               http://highlandsun.com/hyc
 Symas: Premier OpenSource Development and Support