Bug 2733 - PATCH: Incorrect share lib extension for HPUX IA systems
PATCH: Incorrect share lib extension for HPUX IA systems
Product: Samba 3.0
Classification: Unclassified
Component: Build environment
Other HP-UX
: P3 normal
: none
Assigned To: Tim Potter
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2005-05-20 16:34 UTC by Adrian Tam
Modified: 2005-08-24 10:19 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Tam 2005-05-20 16:34:08 UTC
Incorrect SHLIBEXT is set when running configure script on HPUX IA systems. 
This causes share libs to be built with .sl instead of .so extensions.

The following is a patch to fix the problem. The patch also fix a problem in 
detecting libiconv on HPUX IA systems, where the libs are stored under 
lib/hpux32 instead of just lib. 
Diff is against samba 3.0.14a. 
Tested using HP C compiler on both IA and PA systems.

--- configure.in.orig   Tue May 17 17:00:28 2005
+++ configure.in        Fri May 20 16:24:59 2005
@@ -1271,7 +1271,6 @@
                        AC_DEFINE(BROKEN_STRNDUP,1,[Does strndup work 
                *hpux*) AC_DEFINE(HPUX,1,[Whether the host os is HPUX])
-                       SHLIBEXT="so"
                        # Use special PIC flags for the native HP-UX compiler.
                        if test $ac_cv_prog_cc_Ae = yes; then
@@ -1282,7 +1281,13 @@
                        elif test "${GCC}" = "yes"; then
-                       DYNEXP="-Wl,-E"
+                       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])
@@ -1772,7 +1777,8 @@
 dnl succeed when the header is found. To counter this, make sure the
 dnl library directory is there and check the ABI directory first (which
 dnl should be harmless on other systems.
-    for l in "lib32" "lib" ; do
+dnl For IA64 HPUX systems, the libs are located in lib/hpux32 instead of lib.
+    for l in "lib32" "lib" "lib/hpux32"; do
         if test -d "$i/$l" ; then
                 LDFLAGS="$save_LDFLAGS -L$i/$l"
Comment 1 Tim Potter 2005-08-02 13:57:40 UTC
Hi.  I've applied your patch (things have changed a lot though so I basically
retyped it).  Can you please check whether this works as required on your
machines?  I don't have access to any HPUX machines to test this on.
Please re-open the bug if I have mucked anything up.
Comment 2 Gerald (Jerry) Carter 2005-08-24 10:19:59 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.