Bug 6281 - configure reports shared_libraries_disabled, and can't compile krb5_locator
configure reports shared_libraries_disabled, and can't compile krb5_locator
Status: NEW
Product: Samba 3.2
Classification: Unclassified
Component: Config Files
3.2.11
IA64 HP-UX
: P3 normal
: ---
Assigned To: Michael Adam
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-21 03:40 UTC by Zhou Weikuan
Modified: 2009-06-11 02:29 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zhou Weikuan 2009-04-21 03:40:18 UTC
Start from about line 1847, it looks like the below, line 1861 is not needed if we use gcc instead of aCC, since gcc doesn't recognize option "+z"

==============================================================================
1847         *hpux*) AC_DEFINE(HPUX,1,[Whether the host os is HPUX])
1848             # Use special PIC flags for the native HP-UX compiler.
1849                 BLDSHARED="true"
1850                 SHLD="cc"
1851                 LDSHFLAGS="-b -Wl,-B,symbolic,-b,-z"
1852                 SONAMEFLAG="-Wl,+h "
1853                 PICFLAG="+z"
1854             if test "${GCC}" = "yes"; then
1855                 PICFLAG="-fPIC"
1856             else
1857                 PICFLAG="+z +ESnolit"
1858             fi
1859             if test "$host_cpu" = "ia64"; then
1860                 SHLIBEXT="so"
1861                   PICFLAG="+z"
1862                 DYNEXP="-Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32"
1863             else
1864                 SHLIBEXT="sl"
1865                 DYNEXP="-Wl,-E,+b/usr/local/lib:/usr/lib"
1866             fi
Comment 1 Zhou Weikuan 2009-04-21 03:40:59 UTC
Oh, the content is from configure.in
Comment 2 Zhou Weikuan 2009-05-31 02:24:16 UTC
The description is not exact for HPUX 11.11 with gcc, the following patch can resolve samba build via gcc for all hpux platform. But if you use hpux's compiler, it may(no test on this) be better to stay as it was:

diff --git a/source3/configure.in b/source3/configure.in
index 408340d..6e11697 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1650,14 +1650,17 @@ DSO_EXPORTS=""
 				SONAMEFLAG="-Wl,+h "
 				PICFLAG="+z"
 			if test "${GCC}" = "yes"; then
+				BLDSHARED="true"
+				SHLD="gcc"
+				LDSHFLAGS="-shared"
+				SONAMEFLAG="-Wl,+h"
 				PICFLAG="-fPIC"
 			else
 				PICFLAG="+z +ESnolit"
 			fi
 			if test "$host_cpu" = "ia64"; then
 				SHLIBEXT="so"
-			      PICFLAG="+z"
-				DYNEXP="-Wl,-E,+b/usr/local/lib/hpux32:/usr/lib/hpux32"
+				DYNEXP=""
 			else
 				SHLIBEXT="sl"
 				DYNEXP="-Wl,-E,+b/usr/local/lib:/usr/lib"