Issue 6306 - Problems compiling OpenLDAP in 64 bit due to old libtool version included
Summary: Problems compiling OpenLDAP in 64 bit due to old libtool version included
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: build (show other issues)
Version: 2.4.18
Hardware: All All
: --- normal
Target Milestone: 2.5.0
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks: 6269
  Show dependency treegraph
 
Reported: 2009-09-24 19:26 UTC by dam@opencsw.org
Modified: 2020-10-14 21:01 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description dam@opencsw.org 2009-09-24 19:26:10 UTC
Full_Name: Dagobert Michelsen
Version: 2.4.18
OS: Solaris
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (86.103.225.254)


There is a problem compiling the current OpenLDAP (2.4.18) in 64 bit
on Solaris. The problem occurs when building with modules and
enabling 64 bit in CFLAGS rather than setting CC to the compiler
including flags. The source of the problem is the old libtool
version 1.5.x included in OpenLDAP. The libtool maintainers
recommended upgrading libtool to at least 2.2 where the
problem was fixed.

The corresponding libtool thread is available at
  <http://lists.gnu.org/archive/html/bug-libtool/2009-09/msg00017.html>

This is the excerpt of my tests:

This works fine:
./configure CC='/opt/studio/SOS11/SUNWspro/bin/cc -xarch=v9'
CPPFLAGS='-I/opt/csw/include' LDFLAGS='-L/opt/csw/lib/64 -R/opt/csw/ lib/64' &&
gmake

And it also works with modules:
./configure CC='/opt/studio/SOS11/SUNWspro/bin/cc -xarch=v9'
CPPFLAGS='-I/opt/csw/include' LDFLAGS='-L/opt/csw/lib/64 -R/opt/csw/ lib/64'
--enable-modules && gmake

Without modules this works also:
./configure CC='/opt/studio/SOS11/SUNWspro/bin/cc' CFLAGS='-xarch=v9'
CPPFLAGS='-I/opt/csw/include' LDFLAGS='-L/opt/csw/lib/64 -R/opt/csw/ lib/64' &&
gmake

This does not work:
./configure CC='/opt/studio/SOS11/SUNWspro/bin/cc' CFLAGS='-xarch=v9'
CPPFLAGS='-I/opt/csw/include' LDFLAGS='-L/opt/csw/lib/64 -R/opt/csw/ lib/64'
--enable-modules && gmake


For now this tiny patch fixed my problem, but it needs to be worked on for
general usage:

diff -Naur openldap-2.4.17.orig/build/ltmain.sh
openldap-2.4.17.patched/build/ltmain.sh
--- openldap-2.4.17.orig/build/ltmain.sh        2009-01-22 01:00:41.000000000
+0100
+++ openldap-2.4.17.patched/build/ltmain.sh     2009-09-11 14:26:06.136891084
+0200
@@ -4745,7 +4745,10 @@
            case "$compile_command " in
            *" -static "*) ;;
            *) pic_flag_for_symtable=" $pic_flag";;
-           esac
+           esac;;
+          *-*-solaris*)
+            LTCFLAGS="$compiler_flags"
+            ;;
          esac
 
          # Now compile the dynamic symbol file.
Comment 1 Howard Chu 2009-09-29 01:34:07 UTC
changed notes
Comment 2 Hallvard Furuseth 2009-11-23 21:11:26 UTC
moved from Incoming to Build
Comment 3 OpenLDAP project 2014-08-01 21:04:05 UTC
see also #6269
Comment 4 Quanah Gibson-Mount 2020-04-10 18:13:25 UTC
Commits: 
  • 1a55a5c6 
by Quanah Gibson-Mount at 2020-04-10T17:44:56+00:00 
ITS#9177 - Finish updating migration to latest autoconf and related build tools