FreeBSD problems compiling Mozilla C SDK on Free BSD 7.2

RESOLVED DUPLICATE of bug 449453

Status

Directory
LDAP C SDK
RESOLVED DUPLICATE of bug 449453
8 years ago
7 years ago

People

(Reporter: Meena Vyas, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
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.
(Reporter)

Comment 1

8 years ago
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
(Reporter)

Comment 2

8 years ago
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

7 years ago
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.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
OS: Other → FreeBSD
Hardware: Other → All
Resolution: --- → DUPLICATE
Duplicate of bug: 449453
You need to log in before you can comment on or make changes to this bug.