DO NOT REPLY [Bug 7015] New: Build problems on HP-UX, Tru64 -- alloca, -Wno-unused-parameter

samba-bugs at samba.org samba-bugs at samba.org
Wed Dec 30 16:58:17 MST 2009


https://bugzilla.samba.org/show_bug.cgi?id=7015

           Summary: Build problems on HP-UX, Tru64 -- alloca, -Wno-unused-
                    parameter
           Product: rsync
           Version: 3.0.6
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: normal
          Priority: P3
         Component: core
        AssignedTo: wayned at samba.org
        ReportedBy: sms at antinode.info
         QAContact: rsync-qa at samba.org


Build problem with alloca()

Using GCC on Tru64 and HP-UX causes complaints like this (HP-UX shown):

        gcc -std=gnu99 -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt
-Wno-unu
sed-parameter  -c popt/findme.c -o popt/findme.o
popt/findme.c: In function 'findProgramPath':
popt/findme.c:28: warning: implicit declaration of function 'alloca'
popt/findme.c:28: warning: incompatible implicit declaration of built-in
functio
n 'alloca'

   Suggestion:

dyi # gdiff -u ./popt/system.h_orig ./popt/system.h
--- ./popt/system.h_orig        2006-11-08 20:37:38.000000000 -0600
+++ ./popt/system.h     2009-12-30 05:03:15.000000000 -0600
@@ -87,6 +87,8 @@
 # endif
 #elif defined(__GNUC__) && defined(__STRICT_ANSI__)
 #define alloca __builtin_alloca
+#elif HAVE_ALLOCA_H
+# include <alloca.h>
 #endif

 #ifndef HAVE_STRLCPY

   Rationale:

The use of GCC should not preclude the use of <alloca.h>.

I haven't looked at what happens with __STRICT_ANSI__ defined,
so even broader use of <alloca.h> may make more sense
("#if"+"#endif", instead of "#elif"?).


      Build problem with -Wno-unused-parameter

On Tru64 using DEC/Compaq/HP C, the "configure" test for the safety
of the -Wno-unused-parameter is too tolerant.  This compiler
apparently hates this option, but is willing to pass it along to
"ld", who doesn't like it either.  Thus, the compile-only test
in "configure.sh" looks successful, but the actual build fails:

urtx# gmake
[...]
ld: Invalid flag usage: Wno-unused-parameter, -Wx,-option must appear after
-_SYSTYPE_SVR4
ld: Usage: ld [options] file [...]
Failed to create rounding.h!
gmake: *** [rounding.h] Error 1


   Versions:

Rsync 3.0.5, 3.0.6, 3.0.7pre2

dyi # uname -a
HP-UX dyi B.11.31 U ia64 4235313755 unlimited-user license
dyi # gcc --version
gcc (GCC) 4.3.3
[...]

urtx# sizer -v
HP Tru64 UNIX V5.1B (Rev. 2650); Fri Mar 20 20:19:48 CDT 2009
urtx# cc -V
Compaq C V6.5-303 (dtk) on HP Tru64 UNIX V5.1B (Rev. 2650)
Compiler Driver V6.5-302 (dtk) cc Driver


   The complaint form here seems to have no accommodation for
multiple platforms other than "All", so I chose "Other".


-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.


More information about the rsync mailing list