Attempting to emerge cloop-2.01.5 fails, dieing in "/usr/include/netinet/in.h", which seems to belong to glibc: # qpkg -f /usr/include/netinet/in.h sys-libs/glibc-2.3.4.20040808-r1 I'm running a 2.6.8 kernel (-r7), and here's the dump from emerge: >>> emerge (1 of 1) sys-fs/cloop-2.01.5 to / >>> md5 src_uri ;-) cloop_2.01-5.tar.gz * /usr/src/linux is a symbolic link * Determining the real directory of the Linux kernel source code * Building for Linux 2.6.8-gentoo-r7 found in /usr/src/linux >>> Unpacking source... >>> Unpacking cloop_2.01-5.tar.gz to /var/tmp/portage/cloop-2.01.5/work * Applying kernel26_amd64.patch ... [ ok ] * /usr/src/linux is a symbolic link * Determining the real directory of the Linux kernel source code * Building for Linux 2.6.8-gentoo-r7 found in /usr/src/linux * Applying kernel-2.6.8-fs_h-fix.patch ... [ ok ] * Applying cloop.fix.patch ... [ ok ] * Applying cloop.zlib-amd64.patch ... [ ok ] >>> Source unpacked. ( make -C advancecomp-1.9_create_compressed_fs advfs ) gcc -O3 -march=athlon-tbird -fomit-frame-pointer -pipe -c -o extract_compressed_fs.o extract_compressed_fs.c make[1]: Entering directory `/var/tmp/portage/cloop-2.01.5/work/cloop-2.01/advancecomp-1.9_create_compressed_fs' g++ -DHAVE_CONFIG_H -I. -I. -I. -g -O3 -DUSE_ERROR_SILENT -DUSE_COMPRESS -c -o advfs.o `test -f 'advfs.cc' || echo './'`advfs.cc gcc -I/usr/src/linux/include -I/usr/src/linux/include/asm/mach-default -O3 -march=athlon-tbird -fomit-frame-pointer -pipe -D__KERNEL__ -DMODULE -fno-builtin -nostdlib -DKBUILD_MODNAME="cloop" -DKBUILD_BASENAME="cloop" -D__OPTIMIZE__ compressed_loop.c -c -o compressed_loop.o advfs.cc:33:1: warning: "__OPTIMIZE__" redefined <built-in>:53:1: warning: this is the location of the previous definition gcc -o extract_compressed_fs extract_compressed_fs.o -lz In file included from advfs.cc:34: /usr/include/netinet/in.h:354: error: parse error before `)' token /usr/include/netinet/in.h:354: error: parse error before `?' token /usr/include/netinet/in.h:354: error: parse error before `)' token /usr/include/netinet/in.h:355: error: parse error before `)' token /usr/include/netinet/in.h:355: error: parse error before `?' token /usr/include/netinet/in.h:355: error: parse error before `)' token /usr/include/netinet/in.h:357: error: parse error before `)' token /usr/include/netinet/in.h:357: error: parse error before `?' token /usr/include/netinet/in.h:357: error: parse error before `)' token /usr/include/netinet/in.h:359: error: parse error before `)' token /usr/include/netinet/in.h:359: error: parse error before `?' token /usr/include/netinet/in.h:359: error: parse error before `)' token In file included from advfs.cc:34: /usr/include/netinet/in.h:510: error: parse error before `}' token Building for Kernel Patchlevel 6 ld -r -o cloop.ko compressed_loop.o g++ -DHAVE_CONFIG_H -I. -I. -I. -g -O3 -DUSE_ERROR_SILENT -DUSE_COMPRESS -c -o utility.o `test -f 'utility.cc' || echo './'`utility.cc make[1]: *** [advfs.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/var/tmp/portage/cloop-2.01.5/work/cloop-2.01/advancecomp-1.9_create_compressed_fs' make: *** [advancecomp-1.9_create_compressed_fs/advfs] Error 2 !!! ERROR: sys-fs/cloop-2.01.5 failed. !!! Function kernel-mod_src_compile, Line 207, Exitcode 2 !!! (no error message) !!! If you need support, post the topmost build error, NOT this status message. Reproducible: Always Steps to Reproduce: 1. set package.keywords for sys-fs/cloop to ~x86 2. emerge sys-fs/cloop Portage 2.0.51-r3 (default-linux/x86/2004.0, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.8-gentoo-r7 i686) ================================================================= System uname: 2.6.8-gentoo-r7 i686 AMD Athlon(tm) Processor Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.90.0.1.1-r3 Headers: sys-kernel/linux-headers-2.4.21-r1 Libtools: sys-devel/libtool-1.5.2-r7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=athlon-tbird -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.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/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=athlon-tbird -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://mirror.datapipe.net/gentoo http://gentoo.osuosl.org/ http://mirrors.tds.net/gentoo http://gentoo.chem.wisc.edu/gentoo/ http://gentoo.binarycompass.org http://mirror.datapipe.net/gentoo http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow X X509 aalib acl acpi acpi4linux aim alsa apache2 apm arts avantgo avi berkdb bitmap-fonts cddb cdparanoia cdr clamav crypt cups curl dga directfb dv dvd dvdr encode escreen esd ethereal f77 fam fax ffmpeg flac flash fmod foomaticdb fortran freetype gd gdbm gif gimpprint gphoto2 gpm gstreamer gtk gtk2 icq idea imagemagick imap imlib imlib2 innodb jabber java javascript jpeg junit kde lcms ldap libg++ libwww lmtp ltsp mad matroska mbox mcal md5sum mdb mikmod mmx motif mozcalendar mozilla mozsvg mpeg mpeg4 mpi msn mysql nas ncurses nls nntp odbc oggvorbis opengl oscar oss pam pda pdflib perl pic pie png postgres ppds pthreads pwdb python qt quicktime readline regexp samba scanner sdl slang slp snmp speex spell sqlite ssl svg svga tcltk tcpd tiff transcode truetype uml usb v4l v4l2 vim-with-x virus-scan wxwin wxwindows x86 xfs xine xinerama xinetd xml2 xmms xosd xv xvid zlib"
Does it work with gcc-3.4 or the 2.6.9 kernel? Thank you for your bug-report.
Can you please try CTRL+Z after unpacking+patching and editing cloop-2.01.new/advancecomp-1.9_create_compressed_fs/advfs.cc at line 33 by removing "#define __OPTIMIZE__" ?
I've tried doing the Ctrl-Z and removing the #define __OPTIMIZE__, but get exactly the same error/behaviour. I don't have a system that's running gcc 3.4 (waiting until it's marked stable ;-) Would it be worth upgrading the kernel and trying it with the latest 2.6.9? I wouldn't think that would change the glibc headers, tho?
oh, maybe you use 2.4 headers?
Yes, I'm using 2.4 headers. Last time I read up on this, running 2.6 headers was still supposedly "experimental"? (Even though running a 2.6 kernal was not?) So if I were using 2.6 headers this would probably work? Is there any guide to tell me when I should be using 2.6 headers and when 2.4 headers?
please try it with 2.6 headers (emerge -va linux26-headers) if it works then I will add a dep for linux26-headers.
It could be a kernel-headers issue becuase glibc needs the kernel headers for building, so it would be nice if you could rebuild your glibc after upgrading the kernel headers so that we can really see if it helped.
This process worked: emerge unmerge linux-headers emerge linux26-headers emerge sys-fs/cloop emerge unmerge linux26-headers emerge linux-headers That is, it compiled without any problem. modprobe and rmmod also worked fine, but I have yet to test with an actual cloop image. I did *NOT* (as implied by the linux-headers ebuild) need to rebuild glibc for this to work. So, I think this is fixed if one uses linux26-headers. Thanks!
Addendum to the "solved". I've now sucessfully mounted a cloop image using the compiled module. So, as long as linux26-headers are present when compiling, everything seems to work flawlessly (even if they are unmerged after compiling, and even if glibc is *NOT* recompiled). Thanks! This is completely solved now!
How can you consider this as solved, when another person who has kernel-2.6 and headers-2.4 also will run into this problem? I need to find some way to exclude this bad kernel/header combination to really fix this.
Oh, sorry, I thought you were going to require linux26-headers as a dep? That should show up as a required dep, and then linux-headers should show up as blocking on a 2.4 headers system. Unless you want to support 2.4 headers, in which case we need to find out what exactly is not compiling, and if that is fixable...
The ebuild should have kernel 2.4 compatibility, and on 2.4 kernels you have no 2.6-headers, so I will have to support it or make the ebuild kernel 2.6 only :( I think 2.4 kernel would work with 2.4 headers. Problem is that I cant add a dep only for kernel-2.6 :(
We still want to provide cloop for 2.4 users and this bug highlighted that it will not build against 2.4 headers (regardless of kernel version). A fix is now in place which will take effect for 2.4 (kernel) users. This does however assume that you aren't mixing 2.4 headers with a 2.6 system.