samba_3_0 build problems on hp-ux 11.00

Michael Adam ma at sernet.de
Thu Dec 28 16:05:34 GMT 2006


Hi Metze and list!

I am having trouble building current SAMBA_3_0 on our HP-UX 11.00
machine (hape) at SerNet. I could build with release 16439, for 
instance (in the pre lib/replace/ days). What caught my eye most
notably is the appearance of the "-AC99" option. Without
specifying "CPPFLAGS=-Ae" explicitly, I could not even pass
configure, but even then the build breaks. But "-AC99" did not 
seem to be the culprit. I am lost - and I am not sure if our
system is messed up somehow or if the samba-build mechanism
needs tweaking. At least I did not get it to build completely.

Metze, I am writing to you especially as the one svn blames for 
lib/replace. And furthermore, you do have access to hape... :-)

Here is what I tried and what I noticed:

attempts to build with cc:
==========================

1) configure with CC=cc fails at "checking for memset" with 
   message "configure: error: Required function not found"
   but the cause is: 
   ---------------
   configure:15849: checking for memset
   configure:15906: cc -o conftest -O -D_SAMBA_BUILD_=3 -AC99 -AC99  \
      -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE \
      -D_ALIGNMENT_REQUIRED=1 -D_MAX_ALIGNMENT=4 \
      -DMAX_POSITIVE_LOCK_OFFSET=0x1ffffffffffLL  conftest.c  >&5
   cpp: "/usr/include/sys/stdsyms.h", line 293: error 4062: \
      "Large File interfaces no t supported in strict ANSI mode."
   ---------------
   the somehow autodetected parameter -AC99 seems to be the culprit
   solution: override it with "-Ae" paramter (extended ansi c).

2) With "CFLAGS=-Ae CPPFLAGS=-Ae", configure runs ok, but
   make fails at "compiling dynconfig.c" with message 
   "inconsistent parameter declaration for rep_dlopen"
   second parameter is "unsigned int" in /usr/include/dlfcn.h
   but "int" in lib/replace/replace.h

   Because according to the documentation, dlopen is only available 
   for the PA-RISC 2.0 64 bit architecture, I tried using the "+DA2.0W" 
   compiler switch even though the error above does apparently not have 
   to do with that directly. (Actually, this should be the default 
   since the system is 64bit -- see system info below -- but it is
   not: the compiler generates PA-RISC 2.0 32 bit binaries.)

3) Strangely, with the additional compiler "+DA2.0W" 
   (PA-RISC 2.0 64 bit binary format) make runs on until 
   "Compiling lib/talloc/talloc.c":
   --------------------------------------------------------
   cc: "lib/talloc/talloc.c", line 281: error 1588: "__inline_func__talloc_set_name_const_param_2_name__" undefined.
   cc: "lib/talloc/talloc.c", line 281: error 1531: Invalid member of struct or union.
   cc: <<<NULL_SYMBOL>>>: error 1592: Redefinition of label "__inline_func_talloc_chunk_from_ptr_exit_label_1__".
   cc: <<<NULL_SYMBOL>>>: error 1592: Redefinition of label "__inline_func_talloc_chunk_from_ptr_exit_label_1__".
   cc: "lib/talloc/talloc.c", line 281: error 1588: "__inline_func__talloc_set_name_const_param_2_name__" undefined.
   cc: "lib/talloc/talloc.c", line 281: error 1531: Invalid member of struct or union.
   cc: "lib/talloc/talloc.c", line 281: error 1588: "__inline_func__talloc_set_name_const_param_2_name__" undefined.
   cc: "lib/talloc/talloc.c", line 281: error 1531: Invalid member of struct or union.
   cc: "lib/talloc/talloc.c", line 281: error 1588: "__inline_func__talloc_set_name_const_param_2_name__" undefined.
   cc: "lib/talloc/talloc.c", line 281: error 1531: Invalid member of struct or union.
   cc: "lib/talloc/talloc.c", line 281: error 1588: "__inline_func__talloc_set_name_const_param_2_name__" undefined.
   cc: "lib/talloc/talloc.c", line 281: error 1531: Invalid member of struct or union.
   cc: "lib/talloc/talloc.c", line 281: error 1588: "__inline_func__talloc_set_name_const_param_2_name__" undefined.
   cc: "lib/talloc/talloc.c", line 281: error 1531: Invalid member of struct or union.
   cc: "lib/talloc/talloc.c", line 281: error 1588: "__inline_func__talloc_set_name_const_param_2_name__" undefined.
   cc: "lib/talloc/talloc.c", line 281: error 1531: Invalid member of struct or union.
   cc: "lib/talloc/talloc.c", line 122: error 1588: "ptr" undefined.
   cc: "lib/talloc/talloc.c", line 122: error 1527: Incompatible types in cast: Must cast from scalar to scalar or to void type.
   cc: "lib/talloc/talloc.c", line 281: error 1588: "__inline_func__talloc_set_name_const_param_2_name__" undefined.
   cc: "lib/talloc/talloc.c", line 281: error 1531: Invalid member of struct or union.
   cc: "lib/talloc/talloc.c", line 122: error 1588: "ptr" undefined.
   cc: "lib/talloc/talloc.c", line 122: error 1527: Incompatible types in cast: Must cast from scalar to scalar or to void type.
   cc: "lib/talloc/talloc.c", line 122: error 1588: "ptr" undefined.
   cc: "lib/talloc/talloc.c", line 122: error 1527: Incompatible types in cast: Must cast from scalar to scalar or to void type.
   cc: "lib/talloc/talloc.c", line 122: error 1588: "ptr" undefined.
   cc: "lib/talloc/talloc.c", line 122: error 1527: Incompatible types in cast: Must cast from scalar to scalar or to void type.
   The following command failed:
   cc -I. -I/data/build/samba/samba_3_0/source  -Ae +DA2.0W \
     -D_SAMBA_BUILD_=3 -AC99 -AC99 \
     -I/data/build/samba/samba_3_0/source/popt \
     -I/data/build/samba/samba_3_0/source/iniparser/src \
     -Iinclude -I./include  -I. -I. -I./lib/replace -I./lib/talloc \
     -I./tdb/include -I./libaddns -I./librpc \
     -DHAVE_CONFIG_H  -Ae +DA2.0W -D_HPUX_SOURCE -D_POSIX_SOURCE \
     -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 \
     -D_MAX_ALIGNMENT=4 \
     -DMAX_POSITIVE_LOCK_OFFSET=0x1ffffffffffLL \
     -I/data/build/samba/samba_3_0/source/lib \
     -D_SAMBA_BUILD_=3 -fPIE \
     -c lib/talloc/talloc.c -o lib/talloc/talloc.o
   *** Error exit code 1

   Stop.
   ---------------------
   Something seems to be strange with inline functions. 
   configure got "__inline" as keyword for inline functions.
   (actually cc with option +DA2.0W also knows "inline").
   Compiling and running small test programs with inline functions 
   works ("__inline" as well as "inline"). 
   
   The same effect is achieved by removing the (double)
   "-AC99" from Makefile instead of adding "+DA2.0W"

4) Disabling the use of inline functions by setting "#define inline" 
   in include/config.h results in successful compilation of talloc.c,
   but then make fails at 
   "Compiling lib/ldb/common/attrib_handlers.c" with:
   -------------------------
   cc: panic 5172: Backend Assert ** Cause of inconsistency unknown.  (5172)
   The following command failed:
   cc -I. -I/data/build/samba/samba_3_0/source  -Ae +DA2.0W \
     -D_SAMBA_BUILD_=3 -AC99 -AC99 \
     -I/data/build/samba/samba_3_0/source/popt \
     -I/data/build/samba/samba_3_0/source/iniparser/src -Iinclude \
     -I./include  -I. -I. -I./lib/replace -I./lib/talloc \
     -I./tdb/include -I./libaddns -I./librpc \
     -DHAVE_CONFIG_H  -Ae +DA2.0W -D_HPUX_SOURCE -D_POSIX_SOURCE \
     -D_LARGEFILE64_SOURCE -D_ALIGNMENT_REQUIRED=1 \
     -D_MAX_ALIGNMENT=4 -DMAX_POSITIVE_LOCK_OFFSET=0x1ffffffffffLL \
     -I/data/build/samba/samba_3_0/source/lib -D_SAMBA_BUILD_=3 \
     -fPIE  -c lib/ldb/common/attrib_handlers.c \
     -o lib/ldb/common/attrib_handlers.o
   *** Error exit code 1

   Stop.
   ----------------------------
   there is an attrib_handlers.o afterwards, but it contains junk.
   I am lost here.

   Again, the same effect is achieved by removing "-AC99" from 
   Makefile instead of adding "+DA2.0W".


other cc problems/warnings:
===========================

1) "checking for -pie and -fPIE"  succeeds but compiler prints warnings:
   ---------------------
   cc: warning 422: Unknown option "-pie" ignored.
   cc: warning 422: Unknown option "fPIE" ignored.
   ----------------------
   then we always get warnings during make.
 
2) redefinition of "TCP_NODELAY" and TCP_MAXSEG warnings although
   we have "#define HPUX 1"
   ----------
   cpp: "/usr/include/sys/xti.h", line 488: warning 2001: \
     Redefinition of macro TCP_NODELAY.
   cpp: "/usr/include/sys/xti.h", line 489: warning 2001: \
     Redefinition of macro TCP_MAXSEG.
   ----------
   mechanism in include/includes.h (lines 118--154) does not seem to work.


attempt to build with gcc:
==========================

 - configure with "CC=gcc"is ok.
   make fails at "compiling dynconfig.c" with:
   ------------------
   In file included from lib/replace/replace.h:276,
                    from include/includes.h:29,
                    from /data/build/samba/samba_3_0/source/dynconfig.c:21:
   /usr/include/dlfcn.h:83: error: conflicting types for `rep_dlopen'
   lib/replace/replace.h:199: error: previous declaration of `rep_dlopen'
   ------------------
   (2nd param is unsigned int as opposed to int)


system information:
===================

uname -a : HP-UX hape B.11.00 U 9000/785 2000580480 unlimited-user license
model: 9000/785/C3600
/opt/langtools/lib/sched.modles says it is a PA-RISC-2.0 machine:
  785     2.0     PA8500
getconf KERNEL_BITS: 64
getconf LIBC_VERSION: 1100000002 
  (second lowest digit says it is a 32 bit PA-RISC library)


Cheers, Michael



More information about the samba-technical mailing list