Subject: pkg/33911: wm/fvwm-devel build fails on i386-current w/GCC4
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 07/04/2006 04:05:00
>Number:         33911
>Category:       pkg
>Synopsis:       wm/fvwm-devel build fails on i386-current w/GCC4
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 04 04:05:00 +0000 2006
>Originator:     John D. Baker
>Release:        i386-3.99.21 (GCC4), pkgsrc-2006Q2
NetBSD 3.99.21 NetBSD 3.99.21 (JDB-TEST) #3: Mon Jul  3 17:11:47 CDT 2006 i386

building fvwm-devel on NetBSD/i386-current with GCC4 fails as follows:

Making all in libs
if cc -DHAVE_CONFIG_H -I. -I. -I.. -I..  -I/usr/pkg/include -I/usr/pkg/include/freetype2 -I/usr/pkg/include -I/usr/pkg/include -DXTHREADS -I/usr/pkg/include -I/usr/X11R6/include -I/usr/X11R6/include          -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2 -I/usr/X11R6/include  -Wall -Wno-implicit-int -O2 -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2 -I/usr/X11R6/include -MT gravity.o -MD -MP -MF ".deps/gravity.Tpo" -c -o gravity.o gravity.c;  then mv -f ".deps/gravity.Tpo" ".deps/gravity.Po"; else rm -f ".deps/gravity.Tpo"; exit 1; fi
In file included from gravity.c:19:
../config.h:565: warning: conflicting types for built-in function 'alloca'
In file included from ../config.h:571,
                 from gravity.c:19:
/usr/include/stdlib.h:241: error: conflicting types for 'alloca'
../config.h:565: error: previous declaration of 'alloca' was here
*** Error code 1

make: stopped in /space/tmp/pkgsrc/wm/fvwm-devel/work/fvwm-2.5.14/libs
Attempt to build wm/fvwm-devel from pkgsrc-2006Q2 on a
NetBSD/i386-current (GCC4) system (possibly other architectures using
GCC4 as well).

make patch

Apply the following:

--- work/fvwm-2.5.14/   2006-07-03 22:28:44.000000000 -0500
+++ work/fvwm-2.5.14/        2006-07-03 22:29:06.000000000 -0500
@@ -561,7 +561,7 @@
        #pragma alloca
 #  else
 #    ifndef alloca /* predefined by HP cc +Olibcalls */
-        char *alloca ();
+        void *alloca ();
 #    endif
 #  endif

make install