Bug 3077 - configure[.in] problems on sol8(multiple ld), hpux-11, linx (ld 2.9.5)
Summary: configure[.in] problems on sol8(multiple ld), hpux-11, linx (ld 2.9.5)
Status: RESOLVED WONTFIX
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.20
Hardware: All All
: P3 normal
Target Milestone: none
Assignee: Tim Potter
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-09 03:34 UTC by Alexander Spannagel
Modified: 2019-06-11 21:25 UTC (History)
1 user (show)

See Also:


Attachments
patch for configure in 3.0.20 (6.37 KB, patch)
2005-09-09 03:37 UTC, Alexander Spannagel
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Spannagel 2005-09-09 03:34:29 UTC
I have encountered some problems while building samba 3.0.20 on different platforms:

Solaris:
problem: gnu ld is first in search path, but gcc will take the one from solaris.
solution: if gcc is used "gcc --print-prog-name=ld" will return the ld that will
be used

Linux:
problem: on one older linux servers there is a ld (version 2.9.5) that does not
know the option --default-allow-shlib (it is in gnu ld since version 2.10).
also the version check of ld itself was not working correctly
solution: fix the ld version check and only set
"ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes" for ld 2.10 upto 2.13.

HP-UX:
problem: In the DYNEXP setting for hpux there is a whitespace
("DYNEXP="-Wl,-E,+b /usr/local/..."). This breaks the build.
solution: remove the whitespace ("DYNEXP="-Wl,-E,+b/usr/local/...")

I already made the changes for all these problems (so we could upgrade to the
new version on all platforms) and here is my final patch:

diff -r -c samba-3.0.20/source/configure samba-3.0.20-patched/source/configure
*** samba-3.0.20/source/configure       Fri Aug 19 21:09:01 2005
--- samba-3.0.20-patched/source/configure       Thu Sep  8 11:23:03 2005
***************
*** 4023,4029 ****
  fi
  
  
! LD=ld
  echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
  echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
  if test "${ac_cv_prog_gnu_ld+set}" = set; then
--- 4023,4033 ----
  fi
  
  
! if test "${GCC}" = "yes"; then
!   LD=`${CC-cc} --print-prog-name=ld`
! else
!   LD=ld
! fi
  echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
  echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
  if test "${ac_cv_prog_gnu_ld+set}" = set; then
***************
*** 4054,4060 ****
          else
             echo "$as_me:$LINENO: checking GNU ld release version" >&5
  echo $ECHO_N "checking GNU ld release version... $ECHO_C" >&6
!                       ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | sed -n
's,^.*\([1-9][0-9]*\.[0-9][0-9]*\).*$,\1,p'`
             ac_cv_gnu_ld_vernr_major=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 1`
             ac_cv_gnu_ld_vernr_minor=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 2`
                        echo "$as_me:$LINENO: result: ${ac_cv_gnu_ld_vernr}" >&5
--- 4058,4064 ----
          else
             echo "$as_me:$LINENO: checking GNU ld release version" >&5
  echo $ECHO_N "checking GNU ld release version... $ECHO_C" >&6
!                       ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | sed -n
's,^.*[^0-9.]\([0-9]*\.[0-9]*\).*$,\1,p'`
             ac_cv_gnu_ld_vernr_major=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 1`
             ac_cv_gnu_ld_vernr_minor=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 2`
                        echo "$as_me:$LINENO: result: ${ac_cv_gnu_ld_vernr}" >&5
***************
*** 4067,4074 ****
  echo $ECHO_N "checking GNU ld release version minor... $ECHO_C" >&6
             echo "$as_me:$LINENO: result: ${ac_cv_gnu_ld_vernr_minor}" >&5
  echo "${ECHO_T}${ac_cv_gnu_ld_vernr_minor}" >&6
!            if test "$ac_cv_gnu_ld_vernr_major" -lt 2 || test
"$ac_cv_gnu_ld_vernr_minor" -lt 14; then
!              ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
             fi
          fi
  fi
--- 4071,4080 ----
  echo $ECHO_N "checking GNU ld release version minor... $ECHO_C" >&6
             echo "$as_me:$LINENO: result: ${ac_cv_gnu_ld_vernr_minor}" >&5
  echo "${ECHO_T}${ac_cv_gnu_ld_vernr_minor}" >&6
!            if test "$ac_cv_gnu_ld_vernr_major" -eq 2 ; then
!              if test "$ac_cv_gnu_ld_vernr_minor" -gt 9 && test
"$ac_cv_gnu_ld_vernr_minor" -lt 14 ; then
!                ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
!              fi
             fi
          fi
  fi
***************
*** 23679,23688 ****
                        fi
                        if test "$host_cpu" = "ia64"; then
                                SHLIBEXT="so"
!                               DYNEXP="-Wl,-E,+b
/usr/local/lib/hpux32:/usr/lib/hpux32"
                        else
                                SHLIBEXT="sl"
!                               DYNEXP="-Wl,-E,+b /usr/local/lib:/usr/lib"
                        fi
  
  cat >>confdefs.h <<\_ACEOF
--- 23685,23694 ----
                        fi
                        if test "$host_cpu" = "ia64"; then
                                SHLIBEXT="so"
!                              
DYNEXP="-Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32"
                        else
                                SHLIBEXT="sl"
!                               DYNEXP="-Wl,-E,+b/usr/local/lib:/usr/lib"
                        fi
  
  cat >>confdefs.h <<\_ACEOF
diff -r -c samba-3.0.20/source/configure.in samba-3.0.20-patched/source/configure.in
*** samba-3.0.20/source/configure.in    Fri Aug 19 19:16:29 2005
--- samba-3.0.20-patched/source/configure.in    Thu Sep  8 11:23:12 2005
***************
*** 343,349 ****
  AC_CHECK_TOOL(AR, ar)
  
  dnl Check if we use GNU ld
! LD=ld
  AC_PROG_LD_GNU
  
  dnl Certain versions of GNU ld the default is not to have the 
--- 343,353 ----
  AC_CHECK_TOOL(AR, ar)
  
  dnl Check if we use GNU ld
! if test "${GCC}" = "yes"; then
!   LD=`${CC-cc} --print-prog-name=ld`
! else
!   LD=ld
! fi
  AC_PROG_LD_GNU
  
  dnl Certain versions of GNU ld the default is not to have the 
***************
*** 363,369 ****
          else
             AC_MSG_CHECKING(GNU ld release version)
             changequote(,)dnl
!            ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | sed -n
's,^.*\([1-9][0-9]*\.[0-9][0-9]*\).*$,\1,p'`
             ac_cv_gnu_ld_vernr_major=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 1`
             ac_cv_gnu_ld_vernr_minor=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 2`
             changequote([,])dnl
--- 367,373 ----
          else
             AC_MSG_CHECKING(GNU ld release version)
             changequote(,)dnl
!            ac_cv_gnu_ld_vernr=`echo $ac_cv_gnu_ld_version | sed -n
's,^.*[^0-9.]\([0-9]*\.[0-9]*\).*$,\1,p'`
             ac_cv_gnu_ld_vernr_major=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 1`
             ac_cv_gnu_ld_vernr_minor=`echo $ac_cv_gnu_ld_vernr | cut -d '.' -f 2`
             changequote([,])dnl
***************
*** 372,379 ****
             AC_MSG_RESULT(${ac_cv_gnu_ld_vernr_major})
             AC_MSG_CHECKING(GNU ld release version minor)
             AC_MSG_RESULT(${ac_cv_gnu_ld_vernr_minor})
!            if test "$ac_cv_gnu_ld_vernr_major" -lt 2 || test
"$ac_cv_gnu_ld_vernr_minor" -lt 14; then
!              ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
             fi
          fi
  fi
--- 376,385 ----
             AC_MSG_RESULT(${ac_cv_gnu_ld_vernr_major})
             AC_MSG_CHECKING(GNU ld release version minor)
             AC_MSG_RESULT(${ac_cv_gnu_ld_vernr_minor})
!            if test "$ac_cv_gnu_ld_vernr_major" -eq 2 ; then
!              if test "$ac_cv_gnu_ld_vernr_minor" -gt 9 && test
"$ac_cv_gnu_ld_vernr_minor" -lt 14 ; then
!                ac_cv_gnu_ld_no_default_allow_shlib_undefined=yes
!              fi
             fi
          fi
  fi
***************
*** 1416,1425 ****
                        fi
                        if test "$host_cpu" = "ia64"; then
                                SHLIBEXT="so"
!                               DYNEXP="-Wl,-E,+b
/usr/local/lib/hpux32:/usr/lib/hpux32"
                        else
                                SHLIBEXT="sl"
!                               DYNEXP="-Wl,-E,+b /usr/local/lib:/usr/lib"
                        fi
                        AC_DEFINE(STAT_ST_BLOCKSIZE,8192,[The size of a block])
                        AC_DEFINE(POSIX_ACL_NEEDS_MASK,1,[Does a POSIX ACL need
a mask element])
--- 1422,1431 ----
                        fi
                        if test "$host_cpu" = "ia64"; then
                                SHLIBEXT="so"
!                              
DYNEXP="-Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32"
                        else
                                SHLIBEXT="sl"
!                               DYNEXP="-Wl,-E,+b/usr/local/lib:/usr/lib"
                        fi
                        AC_DEFINE(STAT_ST_BLOCKSIZE,8192,[The size of a block])
                        AC_DEFINE(POSIX_ACL_NEEDS_MASK,1,[Does a POSIX ACL need
a mask element])
Comment 1 Alexander Spannagel 2005-09-09 03:37:47 UTC
Created attachment 1426 [details]
patch for configure in 3.0.20
Comment 2 Andrew Bartlett 2019-06-11 13:07:23 UTC
Samba now uses waf and versions with autoconf are out of support.  Sorry!