As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
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
Depends on:
  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:
QA Whiteboard:
Iteration: ---
Points: ---


Description User image Meena Vyas 2009-07-21 02:25:56 PDT
User-Agent:       Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv: 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/ dist/lib/
    * cp dist/lib/ dist/lib/

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

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 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 I wish this one in /usr/ports/net/ldapsdk gets updated to the latest one.
Comment 1 User image Meena Vyas 2009-07-21 23:55:39 PDT
One Patch is attached

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

+ifeq ($(OS_ARCH), FreeBSD)
+EXTRA_LIBS += -L$(dist_libdir) -l$(LBER_LIBNAME) -L/usr/lib -lcompat
 ifeq ($(HAVE_SASL), 1)
Comment 2 User image Meena Vyas 2009-07-22 00:14:30 PDT
for error
======= making ./
/usr/bin/ld -Bshareable     -o ./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 @@

     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
Comment 3 User image 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.