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

RE: Library issue on AIX 5.2



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.

-----Original Message-----
From: Lam, Eric [mailto:Eric.Lam@fmr.com]
Sent: Tuesday, October 12, 2004 3:16 PM
To: Chapman, Kyle
Cc: openldap-software@OpenLDAP.org
Subject: RE: Library issue on AIX 5.2 


Could you tell me how to create the shared lib by hand ? I need the
shared lib for NSS_LDAP.

Thanks a million.

Eric

-----Original Message-----
From: Chapman, Kyle [mailto:Kyle_Chapman@G1.com] 
Sent: Tuesday, October 12, 2004 1:57 PM
To: Lam, Eric; Remco Post
Cc: openldap-software@OpenLDAP.org
Subject: RE: Library issue on AIX 5.2 


if you check the archives, youll see that libtool doesnt work well on
aix.  another poster also mentioned this.  i create the shared libs by
hand (if i need them shared)...

-----Original Message-----
From: owner-openldap-software@OpenLDAP.org
[mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Lam, Eric
Sent: Tuesday, October 12, 2004 1:44 PM
To: Remco Post
Cc: openldap-software@OpenLDAP.org
Subject: RE: Library issue on AIX 5.2 


The --disable-dynamic flag does not work. It still did not link in the
lib. 

But I do find the answer. 

I am now using GNU ld, ar, and gcc in the search path. It fixed the
library issue on ldapsearch binary but it does not create shared
libraries. It said I am using GNU ld 2.9.1 or lower, but actually I am
using 2.14. I may need to change the configure script to fix this issue.
The "--without-gnu-ld" and "--with-gnu-ld=no" do not fix this issue. It
stills say my ld is below 2.9.1 !!

Eric

-----Original Message-----
From: Remco Post [mailto:r.post@sara.nl] 
Sent: Monday, October 11, 2004 5:49 PM
To: Lam, Eric
Cc: openldap-software@OpenLDAP.org
Subject: Re: Library issue on AIX 5.2 



On Oct 11, 2004, at 23:24, Lam, Eric wrote:

> Hi
>
>  I just compiled OpenLDAP 2.2.17 on AIX 5.2 with ML03. There is no 
> issue to compile it. However, when I execute ldapsearch, I got the 
> following:
>
> root@aixha1:/opt/openldap-2.2.17/bin # ./ldapsearch
> exec(): 0509-036 Cannot load program ./ldapsearch because of the 
> following errors:
>          0509-150   Dependent module 
> ../../libraries/libldap/.libs/libldap.a(libldap-   2.2.so.7) could not

> be loaded.
>          0509-022 Cannot load module 
> ../../libraries/libldap/.libs/libldap.a(libldap-2.2.so.7).
>          0509-026 System error: A file or directory in the path name 
> does not exist.
>
>
>
> Those lib files are in /opt/openldap-2.2.17/lib but it is looking at 
> the wrong place.
>
>  Could someone tell me how to compile these lib files INTO the 
> binaries so it does not look for them at all?
>
>  I have no issue on Linux and Solaris compile, the problem is only on 
> AIX 5.1 and AIX 5.2.
>
> I have tried both GNU ld, ar and gcc. I also have tried the AIX's ld, 
> ar, and gcc. All gave me the same problem.
>
> Also have tried many settings on LDFLAGS and CFLAGS.
>
> Any help is very appreciated.
>

there is a flag that disables dynamic linking for the configure script. 
For some reason libtool is generally broken for AIX.

> Thanks
>
> Eric
>
-- 
Met vriendelijke groeten,

Remco Post

SARA - Reken- en Netwerkdiensten                      http://www.sara.nl
High Performance Computing  Tel. +31 20 592 8008    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 
  
NOTICE: This E-mail may contain confidential information. If you are not

the addressee or the intended recipient please do not read this E-mail 
and please immediately delete this e-mail message and any attachments 
from your workstation or network mail system. If you are the addressee 
or the intended recipient and you save or print a copy of this E-mail, 
please place it in an appropriate file, depending on whether 
confidential information is contained in the message.