Re: MozLDAP C SDK Compiling

Rich Megginson <[email protected]> Mon, 14 Sep 2009 09:52:59 -0600
Newsgroups gmane.comp.mozilla.devel.directory
Message-ID <[email protected]>
Xu, Qiang (FXSGSC) wrote:
> Hi, all: 
> 
> I got a local copy of Mozilla LDAP C SDK, but have difficult in compiling it. 
> 
> Looking at the instruction from Wiki site https://wiki.mozilla.org/LDAP_C_SDK#Building_using_autoconf_.28preferred_method.29, I did my configure as: 
> ======================================================
> qxu@gso-linuxcom-01(pts/5):~/mozldap-6.0.5-1.fc8/SOURCES/mozldap-6.0.5/mozilla/directory/c-sdk[154]> ./configure --host=powerpc-wrs-linux-gnu --build=i686-crosscompile-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=config.cache --enable-ipv6=yes --with-pthreads --prefix=/etc/mozldap --exec-prefix=/usr --with-nss --with-nspr --with-nspr-inc=/opt/windriver1.4/Sorcery08_v2.3/platforms/8548/powerpc-wrs-linux-gnu/include/nspr4 --with-nss-inc=/opt/windriver1.4/Sorcery08_v2.3/platforms/8548/powerpc-wrs-linux-gnu/include/nss3 --w
 ith-sasl-inc=/opt/windriver1.4/Sorcery08_v2.3/platforms/8548/powerpc-wrs-linux-gnu/include/sasl --with-nspr-lib=/opt/windriver1.4/Sorcery08_v2.3/platforms/8548/powerpc-wrs-linux-gnu/lib --wi
th-nss-lib=/opt/windriver1.4/Sorcery08_v2.3/platforms/8548/powerpc-wrs-linux-gnu/lib --with-sasl-lib=/opt/windriver1.4/Sorcery08_v2.3/platforms/8548/powerpc-wrs-linux-gnu/lib
> ======================================================
> It is finished smoothly, and followed by a "make". Note that --with-nss, --with-nss-inc, and --with-nss-lib all defined.
> 
> Yet, lber library can't be found so that ldap library can't be generated: 
> ======================================================
> ...
> 
> ======= making ./liblber60.a
> rm -f liblber60.a; echo cr liblber60.a ./decode.o ./encode.o ./io.o ./bprint.o;
> echo liblber60.a
> cr liblber60.a ./decode.o ./encode.o ./io.o ./bprint.o
> liblber60.a
> ../../../config/./nsinstall -R -m 444 ./liblber60.a ../../../../../dist/lib
> 
> ...
> 
> ======= making ./libldap60.so
> /opt/windriver1.4/Sorcery08_v2.3/gnu/3.4.4-wrlinux-1.4/x86-linux2/bin/powerpc-wr
> s-linux-gnu-e500v2-glibc_std-gcc -shared -Wl,-soname -Wl,libldap60.so     -o lib
> ldap60.so ./abandon.o ./add.o ./authzidctrl.o ./bind.o ./cache.o ./charray.o ./c
> harset.o ./compare.o ./compat.o ./control.o ./countvalues.o ./delete.o ./disptmp
> l.o ./dsparse.o ./error.o ./extendop.o ./free.o ./freevalues.o ./friendly.o ./ge
> tattr.o ./getdn.o ./getdxbyname.o ./geteffectiverightsctrl.o ./getentry.o ./getf
> ilter.o ./getoption.o ./getvalues.o ./memcache.o ./message.o ./modify.o ./open.o
>  ./os-ip.o ./proxyauthctrl.o ./psearch.o ./pwmodext.o ./pwpctrl.o ./referral.o .
> /regex.o ./rename.o ./request.o ./reslist.o ./result.o ./saslbind.o ./sbind.o ./
> search.o ./setoption.o ./sort.o ./sortctrl.o ./srchpref.o ./tmplout.o ./ufn.o ./
> unbind.o ./unescape.o ./url.o ./userstatusctrl.o ./utf8.o ./vlistctrl.o ./whoami
> .o ./saslio.o  -L../../../../../dist/lib -llber60 -L/opt/windriver1.4/Sorcery08_
> v2.3/platforms/8548/powerpc-wrs-linux-gnu/lib -lsasl2
> /export/WindRiver1.4/platforms/WindRiver1.4.Sorcery08.v2.1/gnu/3.4.4-wrlinux-1.4
> /x86-linux2/bin/../lib/gcc/powerpc-wrs-linux-gnu/3.4.4/../../../../powerpc-wrs-l
> inux-gnu/bin/ld: cannot find -llber60
> collect2: ld returned 1 exit status
> make[3]: *** [libldap60.so] Error 1
> ======================================================
> It seems after liblber60.a is generated, it is removed (rm -f liblber60.a), don't know why.
> 
> Anyone can help?

I think there is probably a bug in the cross compilation code in 
configure - will require some debugging with a similar cross compilation 
environment.

> 
> Thanks,
> Xu Qiang