Last Comment Bug 505418 - FreeBSD problems compiling Mozilla C SDK on Free BSD 7.2
: FreeBSD problems compiling Mozilla C SDK on Free BSD 7.2
Status: RESOLVED DUPLICATE of bug 449453
:
Product: Directory
Classification: Components
Component: LDAP C SDK (show other bugs)
: other
: All FreeBSD
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-21 02:25 PDT by Meena Vyas
Modified: 2010-10-12 13:43 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description Meena Vyas 2009-07-21 02:25:56 PDT
User-Agent:       Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.9.0.6) Gecko/2009020413 Firefox/3.0.6
Build Identifier: LDAPCSDK_6_0_5_RTM

I tried to build Mozilla LDAP C SDK on FreeBSD 7.2 using steps given in steps to reproduce section. There were a few problems in compiling it.

1) I had to copy two *.so.1.0 to *.so

    * cp dist/lib/libprldap60.so.1.0 dist/lib/libprldap60.so
    * cp dist/lib/libssldap60.so.1.0 dist/lib/libssldap60.so

2) Had to add in directory/c-sdk/ldap/libraries/libldap/Makefile :

    ifeq ($(OS_ARCH), FreeBSD)
    EXTRA_LIBS += -L$(dist_libdir) -l$(LBER_LIBNAME) -L/usr/lib -lcompat
    endif

just above

    ifeq ($(HAVE_SASL), 1)

(If I configure using --enable-clu I had more problems luckily I didn't need it.)

Reproducible: Always

Steps to Reproduce:
* cd /usr/ports/devel/nspr; make install 
* cd /usr/ports/security/nss; make install 
* cd /usr/ports/convertors/libiconv; make install
* cd /usr/ports/convertors/iconv; make install 
* cd /usr/ports/security/cyrus-sasl2; make install 
* cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -P -rLDAPCSDK_6_0_5_RTM DirectorySDKSourceC
* ./configure --with-sasl-inc=/usr/local/include/sasl --with-sasl-lib=/usr/local/lib --with-nspr-lib=/usr/local/lib --with-nspr-inc=/usr/local/include/nspr/ --with-nspr --with-nss-lib=/usr/local/lib/nss --with-nss-inc=/usr/local/include/nss/nss/  --with-nss
* gmake



Note that there is one /usr/ports/net/ldapsdk on FreeBSD 7.2. It downloads and builds ldapsdk_12311998.tar.gz. But I can see it in ancient now from mozilla site http://ftp.mozilla.org/pub/mozilla.org/directory/c-sdk/ancient/. I wish this one in /usr/ports/net/ldapsdk gets updated to the latest one.
Comment 1 Meena Vyas 2009-07-21 23:55:39 PDT
One Patch is attached

Index: directory/c-sdk/ldap/libraries/libldap/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/directory/c-sdk/ldap/libraries/libldap/Makefile.in,v
retrieving revision 5.23
diff -u -r5.23 Makefile.in
--- directory/c-sdk/ldap/libraries/libldap/Makefile.in  20 Jun 2007 17:57:11 -0000      5.23
+++ directory/c-sdk/ldap/libraries/libldap/Makefile.in  22 Jul 2009 06:29:11 -0000
@@ -267,6 +267,10 @@
 EXTRA_LIBS = -L$(dist_libdir) -l$(LBER_LIBNAME) -pthread
 endif

+ifeq ($(OS_ARCH), FreeBSD)
+EXTRA_LIBS += -L$(dist_libdir) -l$(LBER_LIBNAME) -L/usr/lib -lcompat
+endif
+
 ifeq ($(HAVE_SASL), 1)
 EXTRA_LIBS += $(SASL_LINK)
 endif
Comment 2 Meena Vyas 2009-07-22 00:14:30 PDT
for error
======= making ./libssldap60.so.1.0
/usr/bin/ld -Bshareable     -o libssldap60.so.1.0 ./clientinit.o ./ldapsinit.o ./errormap.o  -L../../../../../dist/lib -lldap60 -lprldap60 -L/usr/local/lib/nss/ -lssl3 -lnss3 -lsoftokn3  -L/usr/local/lib/ -lplc4 -lplds4 -lnspr4
/usr/bin/ld: cannot find -lprldap60

configure script patch :
Index: configure
===================================================================
RCS file: /cvsroot/mozilla/directory/c-sdk/configure,v
retrieving revision 5.65
diff -u -r5.65 configure
--- configure   17 Sep 2007 17:46:23 -0000      5.65
+++ configure   22 Jul 2009 07:13:51 -0000
@@ -4362,12 +4362,7 @@
 EOF

     CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
-    MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
-    if test "$MOZ_OBJFORMAT" = "elf"; then
-        DLL_SUFFIX=so
-    else
-        DLL_SUFFIX=so.1.0
-    fi
+    DLL_SUFFIX=so
     DSO_CFLAGS=-fPIC
     DSO_LDOPTS=-Bshareable
     ;;
Comment 3 Marco Perez 2010-10-12 13:43:39 PDT
Adding -lcompat won't work on the amd64 platform. Maybe it would break other
64-bit platforms as well. The current patch for bug 449453 looks promising.

*** This bug has been marked as a duplicate of bug 449453 ***

Note You need to log in before you can comment on or make changes to this bug.