I unmasked a few packages to build a 'system of the future', when the base is built from 2.6.* headers, sash-3.6 won't compile. Observed with gcc-3.2.3 and 3.3.3, GLIBC-2.3.2-r9 with NPTL on. observed against kernel-headers 2.6.1 and 2.6.3. Also se bug #41675, I think this might be the actual source of the problem. ### gcc -O2 -pipe -fomit-frame-pointer -mcpu=750 -Wall -Wmissing-prototypes -DHAVE_GZIP=1 -DHAVE_LINUX_ATTR=1 -DHAVE_LINUX_MOUNT=1 -DHAVE_BSD_MOUNT=0 -DMOUNT_TYPE='"ext3"' -DHAVE_READLINE -c -o cmd_chattr.o cmd_chattr.c In file included from /usr/include/linux/percpu_counter.h:11, from /usr/include/linux/ext2_fs_sb.h:20, from /usr/include/linux/ext2_fs.h:20, from cmd_chattr.c:15: /usr/include/linux/percpu.h: In function `__alloc_percpu': /usr/include/linux/percpu.h:45: error: `GFP_KERNEL' undeclared (first use in this function) /usr/include/linux/percpu.h:45: error: (Each undeclared identifier is reported only once /usr/include/linux/percpu.h:45: error: for each function it appears in.) make: *** [cmd_chattr.o] Error 1 !!! ERROR: app-shells/sash-3.6 failed. !!! Function src_compile, Line 31, Exitcode 2 !!! (no error message) ./mpd-stager: error: Stage 3 build failure
update your kernel headers *** This bug has been marked as a duplicate of 35784 ***
But what I'm trying to say is that I'm compiling this against a 'native' system built this weekend from -2.6.3 headers-. Updating headers isn't possible, I'm building against 'bleeding-edge' headers. BTW, I'm doing this as part of pre-empting any trouble later, when base systems move to 2.6 headers and start using NPTL.
i said update because you said you used 2.6.1 headers you *can* update because 2.6.3 is newer than 2.6.1 :P
tim: odd that this works fine on x86 with same exact kernel headers ... at any rate, cmd_chattr.c includes linux/ext2_fs.h which pulls in linux/ext2_fs_sb.h which pulls in spinlock stuff ... i think we can #ifdef __KERNEL__ the linux/ext2_fs_sb.h include in linux/ext2_fs.h because the only time that file is needed is in code that already has #ifdef __KERNEL__
"observed against kernel-headers 2.6.1 and 2.6.3." just a misunderstanding. I'm doing 2.6.3 builds this weekend, I was the one who actually asked for 2.6.3 headers on Thursday for this specific purpose, to see if the PPC kernel additions made any difference.
I tried this yesterday on my G5. I observed this sash problem with 2.6.3 headers on ppc too.
Well, none of these headers have been tried for anything non-X86 because I don't have any PPC hardware :-/ Try adding this at line 3 of /usr/include/linux/percpu.h: "#include <linux/gfp.h>" and see if that helps it. Mike: Commenting out ext2_fs_sb.h isn't the best thing to do as certain things require them, probably such as sash or ext2fs tools? Thanks!
maybe it's worth looking at the sanitized 2.6 headers the PLD guys are working on. iirc they are already using them to build their packages on x86/ppc/sparc
that's been covered before and the answer is it's too hard to maintain them so there are no plans to move to them as for adding linux/gfp.h, that doesnt work: /usr/include/linux/gfp.h: In function `alloc_pages_node': /usr/include/linux/gfp.h:69: error: `MAX_ORDER' undeclared (first use in this function) /usr/include/linux/gfp.h:69: error: (Each undeclared identifier is reported only once i suggested ifdef-ing out the linux/ext2_fs_sb.h because the only structure defined in it has a member which is a spinlock_t, and we all know that spinlock_t's do not exist in userspace
Alright, I filed a BUNCH of bugs yesterday of this nature, only to find that my build system was slightly borked. My apologies. Since then I've cleaned things out and am rebuilding again. The 'sash' bug is real, as is a compile error with mac-fdisk, but I'll be filing a bug for that later as I don't want to stop when I'm so close to a rebuilt system. In the meantime I've commented-out whatever packages won't compile in my $PORTDIR/profile/<system>/packages file. There's no way mac-fdisk and sash will keep me from a cutting-edge PPC system.
Mike: OK, actually this is because <asm/spinlock.h> only gets included if CONFIG_SMP is set for PPC? Is it [ in /usr/include/linux/autoconf.h ]? Can you just remove the #if CONFIG_SMP #include for <asm/spinlock.h> in <linux/spinlock.h>, that should solve this along with the <linux/gfp.h> addition?
probably a useless comment, but amd64 /also/ needs sanitised headers: gcc -pipe -O3 -ftracer -pipe -DHAVE_GZIP -DHAVE_EXT2 -DHAVE_READLINE -c -o cmd_chattr.o cmd_chattr.c In file included from /usr/include/linux/spinlock.h:16, from /usr/include/linux/blockgroup_lock.h:8, from /usr/include/linux/ext2_fs_sb.h:19, from /usr/include/linux/ext2_fs.h:20, from cmd_chattr.c:15: /usr/include/asm/processor.h:191: error: syntax error before "u16" /usr/include/asm/processor.h:193: error: syntax error before "twd" /usr/include/asm/processor.h:194: error: syntax error before "fop" /usr/include/asm/processor.h:195: error: syntax error before "rip" /usr/include/asm/processor.h:196: error: syntax error before "rdp" /usr/include/asm/processor.h:197: error: syntax error before "mxcsr" /usr/include/asm/processor.h:198: error: syntax error before "mxcsr_mask" /usr/include/asm/processor.h:199: error: syntax error before "st_space" /usr/include/asm/processor.h:200: error: syntax error before "xmm_space" /usr/include/asm/processor.h:201: error: syntax error before "padding" /usr/include/asm/processor.h:202: error: syntax error before '}' token /usr/include/asm/processor.h:205: error: field `fxsave' has incomplete type /usr/include/asm/processor.h:209: error: syntax error before "u32" /usr/include/asm/processor.h:211: error: syntax error before "rsp1" /usr/include/asm/processor.h:212: error: syntax error before "rsp2" /usr/include/asm/processor.h:213: error: syntax error before "reserved2" /usr/include/asm/processor.h:214: error: syntax error before "ist" /usr/include/asm/processor.h:215: error: syntax error before "reserved3" /usr/include/asm/processor.h:216: error: syntax error before "reserved4" /usr/include/asm/processor.h:217: error: syntax error before "reserved5" /usr/include/asm/processor.h:218: error: syntax error before "io_bitmap_base" /usr/include/asm/processor.h:229: error: syntax error before '}' token /usr/include/asm/processor.h:254: error: syntax error before "u64" make: *** [cmd_chattr.o] Error 1 ayanami linux-headers # uname -m x86_64 i'm using linux-headers 2.6.3-r1, as nothing else allows nptl to compile, and nptl seems to be needed to prevent nautilus 2.6 from segfaulting on amd64 when ntfs or nfs mounts are in /etc/fstab (now is THAT an obscure bug or what?)
upgraded to latest headers and sash works now thanks tim
OK, perhaps I'm misunderstanding somehow ... but NO 2.6.x version of linux headers will alow ANY version of sash to compile here. How again is this resolved? I'm on a dual opteron system (amd64).
Created attachment 30136 [details, diff] Patch that allows compiling of sash-3.7 on amd64 with linux-headers 2.6
tim: ok the reason it seems to have 'fixed itself' is because of CONFIG_SMP ... on x86/ppc it would seem that the default is to define it in autoconf.h which causes everything to get included properly ... however, i hit this bug again while messing around on hppa/arm and it's because the default for them with 2.6.5 headers is to not support SMP
Created attachment 31205 [details, diff] Patch [ See relevant comment... ] This should solve the issue; apply the attached patch to your headers and then change /usr/include/asm/thread_info.h - you need to move the "#define TIF_" lines [ ignore the _TIF lines ] to the top of the file; just above "#ifdef __KERNEL__" but below "#define __ASM_FOO_THREAD_INFO_H"...
With 2.6.5 headers, nptl enabled, gcc3.4 and latest glibc snapshot on ppc32 (dual G5): In file included from /usr/include/linux/percpu_counter.h:11, from /usr/include/linux/ext2_fs_sb.h:20, from /usr/include/linux/ext2_fs.h:20, from cmd_chattr.c:15:/usr/include/linux/percpu.h: In function `__alloc_percpu': /usr/include/linux/percpu.h:45: error: `GFP_KERNEL' undeclared (first use in this function) /usr/include/linux/percpu.h:45: error: (Each undeclared identifier is reported only once /usr/include/linux/percpu.h:45: error: for each function it appears in.) make: *** [cmd_chattr.o] Error 1!!! ERROR: app-shells/sash-3.7 failed.!!! Function src_compile, Line 37, Exitcode 2!!! (no error message)
Hi, I had the same compilation issue, and the first patch solved it ! Thanks :-)
2nd patch worked fine over here ADD IT SUCKA FOO i need it for the 2.6-only arm ...
In CVS and fixed with linux-headers-2.6.6. This should reach Portage within an hour so if you sync and merge 2.6.6 this issue should go away. If any other architectures are still experiencing this, please reopen this bug. Thanks!
Shouldn't sash depend on >=linux-headers-2.6.6 on amd64 at least then? I just ran headlong into this trying with 2.6.5, and it would have been nice if emerge -p system told me that the light at the end of the tunnel was another train.