Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 73022

Summary: emerge xscreensaver fails because of flurry.h flurry.c
Product: Gentoo Linux Reporter: Alessandro Ronchi <alessandro.ronchi>
Component: Current packagesAssignee: PPC Porters <ppc>
Status: RESOLVED FIXED    
Severity: normal CC: desktop-misc, niv
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: This patch solves the problem, but eliminate some altivec code: is that a problem?
This is the correct patch, sorry.

Description Alessandro Ronchi 2004-12-01 05:38:50 UTC
When I try to emerge xscreensaver, I get this error:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from flurry.c:101:
flurry.h:72: error: parse error before "vector"
flurry.h:72: warning: no semicolon at end of struct or union
flurry.h:74: warning: type defaults to `int' in declaration of `floatToVector'
flurry.h:74: error: ISO C forbids data definition with no type or storage class
flurry.h:79: error: parse error before "vector"
flurry.h:79: warning: no semicolon at end of struct or union
flurry.h:81: warning: type defaults to `int' in declaration of `intToVector'
flurry.h:81: error: ISO C forbids data definition with no type or storage class
flurry.h:85: error: parse error before "floatToVector"
flurry.h:85: warning: no semicolon at end of struct or union
flurry.h:86: warning: type defaults to `int' in declaration of `position'
flurry.h:86: error: ISO C forbids data definition with no type or storage class
flurry.h:87: error: parse error before "oldposition"
flurry.h:87: warning: type defaults to `int' in declaration of `oldposition'
flurry.h:87: error: ISO C forbids data definition with no type or storage class
flurry.h:88: error: parse error before "delta"
flurry.h:88: warning: type defaults to `int' in declaration of `delta'
flurry.h:88: error: ISO C forbids data definition with no type or storage class
flurry.h:89: error: parse error before "dead"
flurry.h:89: warning: type defaults to `int' in declaration of `dead'
flurry.h:89: error: ISO C forbids data definition with no type or storage class
flurry.h:90: error: parse error before "time"
flurry.h:90: warning: type defaults to `int' in declaration of `time'
flurry.h:90: error: 'time' redeclared as different kind of symbol
/usr/include/time.h:184: error: previous declaration of 'time' was here
flurry.h:90: error: 'time' redeclared as different kind of symbol
/usr/include/time.h:184: error: previous declaration of 'time' was here
flurry.h:90: error: ISO C forbids data definition with no type or storage class
flurry.h:91: error: parse error before "animFrame"
flurry.h:91: warning: type defaults to `int' in declaration of `animFrame'
flurry.h:91: error: ISO C forbids data definition with no type or storage class
flurry.h:92: warning: type defaults to `int' in declaration of `SmokeParticleV'
flurry.h:92: error: ISO C forbids data definition with no type or storage class
flurry.h:98: error: parse error before "SmokeParticleV"
flurry.h:98: warning: no semicolon at end of struct or union
flurry.h:105: error: parse error before "seraphimVertices"
flurry.h:105: warning: type defaults to `int' in declaration of `seraphimVertices'
flurry.h:105: error: ISO C forbids data definition with no type or storage classflurry.h:106: error: parse error before "seraphimColors"
flurry.h:106: warning: type defaults to `int' in declaration of `seraphimColors'flurry.h:106: error: ISO C forbids data definition with no type or storage classflurry.h:108: error: parse error before '}' token
flurry.h:108: warning: type defaults to `int' in declaration of `SmokeV'
flurry.h:108: error: ISO C forbids data definition with no type or storage classflurry.h:110: error: parse error before '*' token
flurry.h:110: warning: function declaration isn't a prototype
flurry.h:112: error: parse error before "SmokeV"
flurry.h:112: warning: function declaration isn't a prototype
flurry.h:117: error: parse error before "SmokeV"
flurry.h:117: warning: function declaration isn't a prototype
flurry.h:118: error: parse error before "SmokeV"
flurry.h:118: warning: function declaration isn't a prototype
flurry.h:121: error: parse error before "SmokeV"
flurry.h:121: warning: function declaration isn't a prototype
flurry.h:122: error: parse error before "SmokeV"
flurry.h:122: warning: function declaration isn't a prototype
flurry.h:176: error: syntax error before "float"
flurry.h:176: error: parse error before "float"
flurry.h:176: warning: function declaration isn't a prototype
flurry.h: In function `FastDistance2DV':
flurry.h:177: error: `vector' undeclared (first use in this function)
flurry.h:177: error: (Each undeclared identifier is reported only once
flurry.h:177: error: for each function it appears in.)
flurry.h:177: error: parse error before "float"
flurry.h:179: error: `x' undeclared (first use in this function)
flurry.h:179: warning: implicit declaration of function `vec_abs'
flurry.h:179: warning: nested extern declaration of `vec_abs'
flurry.h:180: error: `y' undeclared (first use in this function)
flurry.h:181: error: `mn' undeclared (first use in this function)
flurry.h:181: warning: implicit declaration of function `vec_min'
flurry.h:181: warning: nested extern declaration of `vec_min'
flurry.h:182: error: `temp' undeclared (first use in this function)
flurry.h:182: warning: implicit declaration of function `vec_add'
flurry.h:182: warning: nested extern declaration of `vec_add'
flurry.h:183: warning: implicit declaration of function `vec_madd'
flurry.h:183: warning: nested extern declaration of `vec_madd'
flurry.h:183: error: parse error before "float"
flurry.h: At top level:
flurry.h:244: error: parse error before "SmokeV"
flurry.h:244: warning: no semicolon at end of struct or union
flurry.h:256: error: parse error before '}' token
flurry.h:256: warning: ISO C does not allow extra `;' outside of a function
flurry.c: In function `delete_flurry_info':
flurry.c:142: error: dereferencing pointer to incomplete type
flurry.c:143: error: dereferencing pointer to incomplete type
flurry.c:146: error: dereferencing pointer to incomplete type
flurry.c: In function `new_flurry_info':
flurry.c:154: error: invalid application of `sizeof' to incomplete type `flurry.h'
flurry.c:158: error: dereferencing pointer to incomplete type
flurry.c:160: error: dereferencing pointer to incomplete type
flurry.c:161: error: dereferencing pointer to incomplete type
flurry.c:161: error: dereferencing pointer to incomplete type
flurry.c:162: error: dereferencing pointer to incomplete type
flurry.c:162: error: dereferencing pointer to incomplete type
flurry.c:162: error: dereferencing pointer to incomplete type
flurry.c:164: error: dereferencing pointer to incomplete type
flurry.c:165: error: dereferencing pointer to incomplete type
flurry.c:166: error: dereferencing pointer to incomplete type
flurry.c:167: error: dereferencing pointer to incomplete type
flurry.c:169: error: dereferencing pointer to incomplete type
flurry.c:170: error: dereferencing pointer to incomplete type
flurry.c:172: error: dereferencing pointer to incomplete type
flurry.c:173: error: dereferencing pointer to incomplete type
flurry.c:174: error: dereferencing pointer to incomplete type
flurry.c:178: error: dereferencing pointer to incomplete type
flurry.c:179: error: dereferencing pointer to incomplete type
flurry.c:180: error: dereferencing pointer to incomplete type
flurry.c:181: error: dereferencing pointer to incomplete type
flurry.c:186: error: dereferencing pointer to incomplete type
flurry.c:190: error: dereferencing pointer to incomplete type
flurry.c: In function `GLRenderScene':
flurry.c:238: error: dereferencing pointer to incomplete type
flurry.c:240: error: dereferencing pointer to incomplete type
flurry.c:240: error: dereferencing pointer to incomplete type
flurry.c:241: error: dereferencing pointer to incomplete type
flurry.c:241: error: dereferencing pointer to incomplete type
flurry.c:242: error: dereferencing pointer to incomplete type
flurry.c:242: error: dereferencing pointer to incomplete type
flurry.c:242: error: dereferencing pointer to incomplete type
flurry.c:244: error: dereferencing pointer to incomplete type
flurry.c:244: error: dereferencing pointer to incomplete type
flurry.c:246: error: dereferencing pointer to incomplete type
flurry.c:254: error: dereferencing pointer to incomplete type
flurry.c:255: error: dereferencing pointer to incomplete type
flurry.c:256: error: dereferencing pointer to incomplete type
flurry.c:257: error: dereferencing pointer to incomplete type
flurry.c:258: error: dereferencing pointer to incomplete type
flurry.c:259: error: dereferencing pointer to incomplete type
flurry.c:267: error: dereferencing pointer to incomplete type
flurry.c:301: error: dereferencing pointer to incomplete type
flurry.c: In function `init_flurry':
flurry.c:403: error: dereferencing pointer to incomplete type
flurry.c:412: error: dereferencing pointer to incomplete type
flurry.c:420: error: dereferencing pointer to incomplete type
flurry.c:428: error: dereferencing pointer to incomplete type
flurry.c:432: error: dereferencing pointer to incomplete type
flurry.c:436: error: dereferencing pointer to incomplete type
flurry.c:444: error: dereferencing pointer to incomplete type
flurry.c:448: error: dereferencing pointer to incomplete type
flurry.c:456: error: dereferencing pointer to incomplete type
flurry.c:464: error: dereferencing pointer to incomplete type
flurry.c: In function `draw_flurry':
flurry.c:541: error: dereferencing pointer to incomplete type
flurry.c:542: error: dereferencing pointer to incomplete type
flurry.c: In function `release_flurry':
flurry.c:565: error: dereferencing pointer to incomplete type
make[1]: *** [flurry.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/xscreensaver-4.16/work/xscreensaver-4.16/hacks/glx'
make: *** [default] Error 5

!!! ERROR: x11-misc/xscreensaver-4.16 failed.
!!! Function src_compile, Line 147, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reproducible: Always
Steps to Reproduce:
1. emerge xscreensaver

Actual Results:  
In file included from flurry.c:101:
flurry.h:72: error: parse error before "vector"
flurry.h:72: warning: no semicolon at end of struct or union
flurry.h:74: warning: type defaults to `int' in declaration of `floatToVector'
flurry.h:74: error: ISO C forbids data definition with no type or storage class
flurry.h:79: error: parse error before "vector"
flurry.h:79: warning: no semicolon at end of struct or union
flurry.h:81: warning: type defaults to `int' in declaration of `intToVector'
flurry.h:81: error: ISO C forbids data definition with no type or storage class
flurry.h:85: error: parse error before "floatToVector"
flurry.h:85: warning: no semicolon at end of struct or union
flurry.h:86: warning: type defaults to `int' in declaration of `position'
flurry.h:86: error: ISO C forbids data definition with no type or storage class
flurry.h:87: error: parse error before "oldposition"
flurry.h:87: warning: type defaults to `int' in declaration of `oldposition'
flurry.h:87: error: ISO C forbids data definition with no type or storage class
flurry.h:88: error: parse error before "delta"
flurry.h:88: warning: type defaults to `int' in declaration of `delta'
flurry.h:88: error: ISO C forbids data definition with no type or storage class
flurry.h:89: error: parse error before "dead"
flurry.h:89: warning: type defaults to `int' in declaration of `dead'
flurry.h:89: error: ISO C forbids data definition with no type or storage class
flurry.h:90: error: parse error before "time"
flurry.h:90: warning: type defaults to `int' in declaration of `time'
flurry.h:90: error: 'time' redeclared as different kind of symbol
/usr/include/time.h:184: error: previous declaration of 'time' was here
flurry.h:90: error: 'time' redeclared as different kind of symbol
/usr/include/time.h:184: error: previous declaration of 'time' was here
flurry.h:90: error: ISO C forbids data definition with no type or storage class
flurry.h:91: error: parse error before "animFrame"
flurry.h:91: warning: type defaults to `int' in declaration of `animFrame'
flurry.h:91: error: ISO C forbids data definition with no type or storage class
flurry.h:92: warning: type defaults to `int' in declaration of `SmokeParticleV'
flurry.h:92: error: ISO C forbids data definition with no type or storage class
flurry.h:98: error: parse error before "SmokeParticleV"
flurry.h:98: warning: no semicolon at end of struct or union
flurry.h:105: error: parse error before "seraphimVertices"
flurry.h:105: warning: type defaults to `int' in declaration of `seraphimVertices'
flurry.h:105: error: ISO C forbids data definition with no type or storage
classflurry.h:106: error: parse error before "seraphimColors"
flurry.h:106: warning: type defaults to `int' in declaration of
`seraphimColors'flurry.h:106: error: ISO C forbids data definition with no type
or storage classflurry.h:108: error: parse error before '}' token
flurry.h:108: warning: type defaults to `int' in declaration of `SmokeV'
flurry.h:108: error: ISO C forbids data definition with no type or storage
classflurry.h:110: error: parse error before '*' token
flurry.h:110: warning: function declaration isn't a prototype
flurry.h:112: error: parse error before "SmokeV"
flurry.h:112: warning: function declaration isn't a prototype
flurry.h:117: error: parse error before "SmokeV"
flurry.h:117: warning: function declaration isn't a prototype
flurry.h:118: error: parse error before "SmokeV"
flurry.h:118: warning: function declaration isn't a prototype
flurry.h:121: error: parse error before "SmokeV"
flurry.h:121: warning: function declaration isn't a prototype
flurry.h:122: error: parse error before "SmokeV"
flurry.h:122: warning: function declaration isn't a prototype
flurry.h:176: error: syntax error before "float"
flurry.h:176: error: parse error before "float"
flurry.h:176: warning: function declaration isn't a prototype
flurry.h: In function `FastDistance2DV':
flurry.h:177: error: `vector' undeclared (first use in this function)
flurry.h:177: error: (Each undeclared identifier is reported only once
flurry.h:177: error: for each function it appears in.)
flurry.h:177: error: parse error before "float"
flurry.h:179: error: `x' undeclared (first use in this function)
flurry.h:179: warning: implicit declaration of function `vec_abs'
flurry.h:179: warning: nested extern declaration of `vec_abs'
flurry.h:180: error: `y' undeclared (first use in this function)
flurry.h:181: error: `mn' undeclared (first use in this function)
flurry.h:181: warning: implicit declaration of function `vec_min'
flurry.h:181: warning: nested extern declaration of `vec_min'
flurry.h:182: error: `temp' undeclared (first use in this function)
flurry.h:182: warning: implicit declaration of function `vec_add'
flurry.h:182: warning: nested extern declaration of `vec_add'
flurry.h:183: warning: implicit declaration of function `vec_madd'
flurry.h:183: warning: nested extern declaration of `vec_madd'
flurry.h:183: error: parse error before "float"
flurry.h: At top level:
flurry.h:244: error: parse error before "SmokeV"
flurry.h:244: warning: no semicolon at end of struct or union
flurry.h:256: error: parse error before '}' token
flurry.h:256: warning: ISO C does not allow extra `;' outside of a function
flurry.c: In function `delete_flurry_info':
flurry.c:142: error: dereferencing pointer to incomplete type
flurry.c:143: error: dereferencing pointer to incomplete type
flurry.c:146: error: dereferencing pointer to incomplete type
flurry.c: In function `new_flurry_info':
flurry.c:154: error: invalid application of `sizeof' to incomplete type `flurry.h'
flurry.c:158: error: dereferencing pointer to incomplete type
flurry.c:160: error: dereferencing pointer to incomplete type
flurry.c:161: error: dereferencing pointer to incomplete type
flurry.c:161: error: dereferencing pointer to incomplete type
flurry.c:162: error: dereferencing pointer to incomplete type
flurry.c:162: error: dereferencing pointer to incomplete type
flurry.c:162: error: dereferencing pointer to incomplete type
flurry.c:164: error: dereferencing pointer to incomplete type
flurry.c:165: error: dereferencing pointer to incomplete type
flurry.c:166: error: dereferencing pointer to incomplete type
flurry.c:167: error: dereferencing pointer to incomplete type
flurry.c:169: error: dereferencing pointer to incomplete type
flurry.c:170: error: dereferencing pointer to incomplete type
flurry.c:172: error: dereferencing pointer to incomplete type
flurry.c:173: error: dereferencing pointer to incomplete type
flurry.c:174: error: dereferencing pointer to incomplete type
flurry.c:178: error: dereferencing pointer to incomplete type
flurry.c:179: error: dereferencing pointer to incomplete type
flurry.c:180: error: dereferencing pointer to incomplete type
flurry.c:181: error: dereferencing pointer to incomplete type
flurry.c:186: error: dereferencing pointer to incomplete type
flurry.c:190: error: dereferencing pointer to incomplete type
flurry.c: In function `GLRenderScene':
flurry.c:238: error: dereferencing pointer to incomplete type
flurry.c:240: error: dereferencing pointer to incomplete type
flurry.c:240: error: dereferencing pointer to incomplete type
flurry.c:241: error: dereferencing pointer to incomplete type
flurry.c:241: error: dereferencing pointer to incomplete type
flurry.c:242: error: dereferencing pointer to incomplete type
flurry.c:242: error: dereferencing pointer to incomplete type
flurry.c:242: error: dereferencing pointer to incomplete type
flurry.c:244: error: dereferencing pointer to incomplete type
flurry.c:244: error: dereferencing pointer to incomplete type
flurry.c:246: error: dereferencing pointer to incomplete type
flurry.c:254: error: dereferencing pointer to incomplete type
flurry.c:255: error: dereferencing pointer to incomplete type
flurry.c:256: error: dereferencing pointer to incomplete type
flurry.c:257: error: dereferencing pointer to incomplete type
flurry.c:258: error: dereferencing pointer to incomplete type
flurry.c:259: error: dereferencing pointer to incomplete type
flurry.c:267: error: dereferencing pointer to incomplete type
flurry.c:301: error: dereferencing pointer to incomplete type
flurry.c: In function `init_flurry':
flurry.c:403: error: dereferencing pointer to incomplete type
flurry.c:412: error: dereferencing pointer to incomplete type
flurry.c:420: error: dereferencing pointer to incomplete type
flurry.c:428: error: dereferencing pointer to incomplete type
flurry.c:432: error: dereferencing pointer to incomplete type
flurry.c:436: error: dereferencing pointer to incomplete type
flurry.c:444: error: dereferencing pointer to incomplete type
flurry.c:448: error: dereferencing pointer to incomplete type
flurry.c:456: error: dereferencing pointer to incomplete type
flurry.c:464: error: dereferencing pointer to incomplete type
flurry.c: In function `draw_flurry':
flurry.c:541: error: dereferencing pointer to incomplete type
flurry.c:542: error: dereferencing pointer to incomplete type
flurry.c: In function `release_flurry':
flurry.c:565: error: dereferencing pointer to incomplete type
make[1]: *** [flurry.o] Error 1
make[1]: Leaving directory
`/var/tmp/portage/xscreensaver-4.16/work/xscreensaver-4.16/hacks/glx'
make: *** [default] Error 5

!!! ERROR: x11-misc/xscreensaver-4.16 failed.
!!! Function src_compile, Line 147, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.


Expected Results:  
emerge cleanly

Portage 2.0.51-r3 (default-ppc-2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0,
2.6.9-gentoo-r6 ppc)
=================================================================
System uname: 2.6.9-gentoo-r6 ppc 7447A, altivec supported
Gentoo Base System version 1.6.6
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.3-r3
Headers:  sys-kernel/linux-headers-2.4.22
Libtools: sys-devel/libtool-1.5.10
ACCEPT_KEYWORDS="ppc ~ppc"
AUTOCLEAN="yes"
CFLAGS="-O3 -mcpu=7400 -mtune=G4 -maltivec -mabi=altivec -fno-strict-aliasing
-pipe -mpowerpc-gfxopt -fomit-frame-pointer "
CHOST="powerpc-unknown-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -mcpu=7400 -mtune=G4 -maltivec -mabi=altivec -fno-strict-aliasing
-pipe -mpowerpc-gfxopt -fomit-frame-pointer "
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distlocks"
GENTOO_MIRRORS="http://mir.zyrianes.net/gentoo/ ftp://mir.zyrianes.net/gentoo/
ftp://ftp.tu-clausthal.de/pub/linux/gentoo/
ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa altivec berkdb bluetooth bzlib cdr dvd esd f77 fortran freetype gdbm
gif gimp gnome gtk gtk2 java jpeg kde mime ncurses nls opengl pam pda pdf perl
png ppc pwdb python qt radeon readline samba sdl slang ssl svg tcpd tiff
truetype unicode usb wifi xinerama xscreensaver zlib"
Comment 1 Alessandro Ronchi 2004-12-03 18:08:27 UTC
If I delete some altivec controls the file compiles cleanly. I upload a patch (I'll submit it also to xscreensaver author).
Comment 2 Alessandro Ronchi 2004-12-03 18:09:52 UTC
Created attachment 45236 [details, diff]
This patch solves the problem, but eliminate some altivec code: is that a problem?
Comment 3 Alessandro Ronchi 2004-12-03 18:21:28 UTC
Created attachment 45238 [details, diff]
This is the correct patch, sorry.
Comment 4 Joe Jezak (RETIRED) gentoo-dev 2004-12-04 06:00:50 UTC
This bug is definitely related to gcc-3.4.3 as I can't replicate it on gcc-3.4.1.   Adding:

 #define __GLCODE__
+#if __VEC__
+  #include <altivec.h>
+#endif
#include <GL/glu.h>

Fixes the altivec errors above.  Next, for some reason (stuffed up gcc?) the vec_abs macro doesn't want to compile correctly.  This can be fixed by commenting out -std=c89 and -U__STRICT_ANSI__ from the makefile.

After changing this, it errors out on:

temp = vec_madd(mn, (vector float)(-0.6875), temp);

Saying that gcc can't convert value to a vector, and that's about where I stopped.  Any ideas?
Comment 5 Joe Jezak (RETIRED) gentoo-dev 2004-12-06 13:28:42 UTC
*** Bug 69916 has been marked as a duplicate of this bug. ***
Comment 6 Luca Barbato gentoo-dev 2004-12-16 22:07:27 UTC
the simplest solution is to disable altivec for xscreensaver.
flurry isn't altivec ready and requires a configure patch to figure out witch altivec support (fsf or motorola convention), not to mention some fixes in the code (correct cast to vector variable using {} instead () on fsf-gcc, altivec.h inclusion, do not force old c standard if you are using something that isn't even standard...)
Comment 7 Joe Jezak (RETIRED) gentoo-dev 2004-12-30 02:42:14 UTC
Looks like Luca already added a work-around to the ebuild.  Reopen if there are still problems.