Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 38603 - bootsplash-0.6-r4 still won't compile with 2.6 headers
Summary: bootsplash-0.6-r4 still won't compile with 2.6 headers
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Michal Januszewski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-18 08:19 UTC by Ian Weber
Modified: 2004-01-24 00:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
fb_test00 (fb_test00.c,120 bytes, text/plain)
2004-01-19 08:59 UTC, Michal Januszewski (RETIRED)
Details
fb_h.patch (fb_h.patch,573 bytes, patch)
2004-01-22 08:49 UTC, Brian Jackson (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Weber 2004-01-18 08:19:07 UTC
emerging bootsplash 0.6-r4 bombs out with the following error when attempting to emerge on my system with 2.6 headers:

gcc -O2 -Wall   -c -o fbmngplay.o fbmngplay.c
gcc -O2 -Wall   -c -o messages.o messages.c
In file included from fbmngplay.c:18:
/usr/include/linux/fb.h:345: error: syntax error before "atomic_t"
gcc -O2 -Wall   -c -o mng.o mng.c
make: *** [fbmngplay.o] Error 1
make: *** Waiting for unfinished jobs....
 
!!! ERROR: media-gfx/bootsplash-0.6-r4 failed.
!!! Function src_compile, Line 23, Exitcode 2
!!! (no error message)

This is the section of header code it references in the error:

truct fb_pixmap { 
        __u8  *addr;                      /* pointer to memory             */  
   __u32 size;                       /* size of buffer in bytes       */ 
   __u32 offset;                     /* current offset to buffer      */ 
   __u32 buf_align;                  /* byte alignment of each bitmap */ 
   __u32 scan_align;                 /* alignment per scanline        */ 
   __u32 flags;                      /* see FB_PIXMAP_*               */ 
                 /* access methods                */ 
   void (*outbuf)(__u8 *dst, __u8 *addr, unsigned int size); 
   __u8   (*inbuf) (__u8 *addr); 
   spinlock_t lock;                  /* spinlock                      */ 
   atomic_t count; 
};


Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Portage 2.0.50_pre16 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031222-r0, 2.
6.1-gentoo-r1)
=================================================================
System uname: 2.6.1-gentoo-r1 i686 AMD Athlon(tm) XP 2400+
Gentoo Base System version 1.4.3.12
Autoconf: sys-devel/autoconf-2.59
Automake: sys-devel/automake-1.7.8
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -mfpmath=sse,387 -ffast-math -O3 -fomit-frame-pointer 
-falign-functions=64 -funroll-loops -falign-loops=5 -falign-jumps=5 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config 
/usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon-xp -mfpmath=sse,387 -ffast-math -O3 -fomit-frame-pointer 
-falign-functions=64 -funroll-loops -falign-loops=5 -falign-jumps=5 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://public.ftp.planetmirror.com/pub/gentoo ftp://mirror.
pacific.net.au/linux/Gentoo/ ftp://ftp.vic.keypoint.com.au http://gentoo.
oregonstate.edu"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="X alsa avi berkdb cdr crypt dvd encode foomaticdb gdbm gif gnome gtk gtk2 
imlib java jpeg libg++ libwww mad mikmod motif mpeg ncurses nls nptl oggvorbis 
opengl pam pdflib perl png python qt quicktime readline sdl slang spell ssl 
tcltk tcpd truetype x86 xml2 xmms xv zlib video_cards_radeon"
Comment 1 Michal Januszewski (RETIRED) gentoo-dev 2004-01-18 10:49:07 UTC
Do you have the _latest_ kernel-headers 2.6 installed? (sys-kernel/linux-headers-2.6.0) Does this problem occur when trying to install bootsplash-0.6-r3?
Comment 2 Ian Weber 2004-01-18 17:03:07 UTC
Yes, I believe so. Although I'm using a slightly hacked (to change the keywords from -* to ~x86) version of the ebuild I've diff'd it against the version in the main Portage tree (and diff'd the patches as well) and the only major change recently has been the update of the copyright dates. bootsplash 0.6-r3 used to fall over and die as well. I got around that by temporarily emerging some 2.4 headers, compiling bootsplash and then re-merging the 2.6 headers but I'd really love to avoid that this time around.
Comment 3 Michal Januszewski (RETIRED) gentoo-dev 2004-01-19 08:59:04 UTC
Oh believe me, I'd very much like to have it fixed, too :) The strange thing about this bug is that I'm using almost exactly the same configuration and everything works fine here. Please send me your linux/fb.h file and try to download the attached fb_test00.c and compile it with 'gcc -O2 -Wall -o fb_test fb_test00.c'.
Comment 4 Michal Januszewski (RETIRED) gentoo-dev 2004-01-19 08:59:52 UTC
Created attachment 24087 [details]
fb_test00
Comment 5 Ian Weber 2004-01-19 09:07:51 UTC
Yeah, it's weird. I've read posts on the boards saying people have it working but for some reason, it refuses to on my system. This isn't the only package I've had this kind of trouble with either with both svgalib and DirectFB both complaining when trying to compile under the 2.6 headers. DirectFB is even more wierd as I'm positive it compiled in the first build I made against the 2.6 headers but refuse to in this one. Anyway, back to bootsplash. This is the output I get from your little test:

 gcc -O2 -Wall -o fb_test fb_test00.c
In file included from fb_test00.c:2:
/usr/include/linux/fb.h:345: error: syntax error before "atomic_t"

Same error in the same place as when trying to compile bootsplash. As for my fb.h, I put it up for download here when I made a thread about this on the boards:

http://www.westnet.com.au/gweber/fb.h

Hopefully it'll provide some insight into the problem.
Comment 6 Ian Weber 2004-01-19 09:15:02 UTC
Hang on, my ISP is still whacked. The file *is* there as I can access it via FTP but HTTP access to it is screwed. I'll have to email it to you. It should be there in a few minutes.
Comment 7 Michal Januszewski (RETIRED) gentoo-dev 2004-01-19 10:22:00 UTC
Ok, that was exactly what I expected :/ It's not a kernel/bootsplash bug alright, it has to be smth else. Please run 'gcc -E -Wall -O2 fb_test00.c -o fb_test00.pre' and have the fb_test00.pre file sent to me. Maybe this will make things more clear here.
Comment 8 Ian Weber 2004-01-19 10:27:18 UTC
Sent
Comment 9 Michal Januszewski (RETIRED) gentoo-dev 2004-01-19 12:02:57 UTC
This is most likely a gcc bug. The kernel headers are the same, the bootsplash code is fine, but the preprocessed code generated by GCC is different. My idea for now is to try to reemerge gcc, possibly with "safer" flags (let's say CFLAGS="-O2" only).
Comment 10 Ian Weber 2004-01-19 22:54:35 UTC
I tried using less agressive CFLAGS. First stripping out everything except -march=athlon-xp, -O3, -fomit-frame-pointer and -pipe but when that didn't work, recompiling with just -O2 as you suggested but got the same results with that as well.
Comment 11 Michal Januszewski (RETIRED) gentoo-dev 2004-01-21 21:49:11 UTC
Ok, obviously it's not the cflags then. I've seen similar issues reported (bugs #38737, #37812) and one thing that I noticed everyone experiencing this problem  had in common was having the 'nptl' flag. Could please try removing it from your USE var and then recompiling glibc and gcc? I have no idea if it helps, but it's my best guess for now.
Comment 12 fatty 2004-01-22 01:58:20 UTC
I don't use the 'ntpl'-USE-flag and it still doesn't compile.
Comment 13 Brian Jackson (RETIRED) gentoo-dev 2004-01-22 08:49:27 UTC
Created attachment 24242 [details, diff]
fb_h.patch
Comment 14 Brian Jackson (RETIRED) gentoo-dev 2004-01-22 08:51:51 UTC
can one of you try the patch I just attached?

# cd /usr/include
# patch -p0 </path/to/fb_h.patch

then try to emerge bootsplash?
Comment 15 Ian Weber 2004-01-22 09:00:18 UTC
Works like a charm here. Thanks. I wasn't particularly looking forward to having to rebuild my system to get rid of NPTL support. I might even try re-emerging DirectFB later too see if this patch cures the problem I was having with that as well
Comment 16 Michal Januszewski (RETIRED) gentoo-dev 2004-01-22 10:37:29 UTC
Please rsync and reemerge linux-headers-2.6.0 (there's a new patch included) and then try to compile bootsplash/directfb.
Comment 17 Michal Januszewski (RETIRED) gentoo-dev 2004-01-24 00:05:06 UTC
Closing, as this is now fixed in Portage.