/usr/src/linux/include/asm-generic/int-ll64.h:11:29: error: asm/bitsperlong.h: No such file or directory Reproducible: Always Steps to Reproduce: 1. emerge gentoo-souces-2.6.31 2. emerge app-admin/ulogd Actual Results: i686-pc-linux-gnu-gcc -O2 -march=pentium-m -mfpmath=sse -mmmx -msse -msse2 -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Wall -DULOGD_CONFIGFILE=\"/etc/ulogd.conf\" -I./libipulog/include -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_LIBDL=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_UNISTD_H=1 -DHAVE_VPRINTF=1 -DHAVE_SOCKET=1 -DHAVE_STRERROR=1 -DHAVE_SQLITE3=1 -Iinclude -I/usr/src/linux/include -c libipulog.c -o libipulog.o In file included from /usr/include/asm/types.h:4, from include/libipulog/libipulog.h:12, from libipulog.c:32: /usr/src/linux/include/asm-generic/int-ll64.h:11:29: error: asm/bitsperlong.h: No such file or directory make[1]: *** [libipulog.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/app-admin/ulogd-1.24-r2/work/ulogd-1.24/libipulog' make: *** [recurse] Error 1 Expected Results: successful compiled change the line 11 in /usr/src/linux/include/asm-generic/int-ll64.h, from: #include <asm/bitsperlong.h> to: #include <asm-generic/bitsperlong.h> solve this problem.
Shouldn't be including that file...
It sounds like there is a discrepancy between your linux-headers and your gentoo-sources; what version of linux-headers do you have installed? If you don't have the very latest version to match kernel 2.6.31, you could run into more header issues later.
(In reply to comment #2) > It sounds like there is a discrepancy between your linux-headers and your > gentoo-sources; what version of linux-headers do you have installed? If you > don't have the very latest version to match kernel 2.6.31, you could run into > more header issues later. > The latest in portage, 2.6.30-r1 I think the problem is no coming from linux-headers, because the int-ll64.h is belong to gentoo-souces itself.
The culprit is probably this commit: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c31ae4bb4a9fa4606a74c0a4fb61b74f804e861e In kernel 2.6.31 there is a new file bitsperlong.h, which is not in 2.6.30. Unfortunately there is no sys-kernel/linux-headers-2.6.31 package in portage. I encountered this when compiling sys-cluster/drbd-8.3.2, but bug #284810 is also the same problem.
A really ugly solution which worked me for sys-cluster/drbd-8.3.2 is: cp /usr/src/linux/arch/x86/include/asm/bitsperlong.h /usr/include/asm/
Paul, thanks for providing specifics -- that is exactly the kind of thing I suspected. We could use a headers version bump to go with the new kernel sources.
ulogd is broken and needs to be fixed. it should never do: -I/usr/src/linux/include the version of the kernel headers vs the kernel is irrelevant here
The following fixes it: ln -s /lib/modules/2.6.31-gentoo-r1/build/include/asm-generic/bitsperlong.h /lib/modules/2.6.31-gentoo-r1/build/include/asm/bitsperlong.h But I think the include chain is more than just the ulogd files as this isn't including anything that vapier/spanky mentioned from the kernel directory. It is including the files from the /lib/modules/`uname --kernel-release`/... so perhaps the fix was applied but still incomplete. In file included from /usr/include/asm/types.h:4, from include/libipulog/libipulog.h:12, from libipulog.c:32: /lib/modules/2.6.31-gentoo-r1/build/include/asm-generic/int-ll64.h:11:29: error: asm/bitsperlong.h: No such file or directory
It seems that app-admin/ulogd-2.0.0_beta3 does not suffer from this.
same happens compiling net-wireless/wavemon-0.4.0b-r2 on amd64.
# emerge --info Portage 2.1.8.3 (default/linux/x86/10.0/server, gcc-4.3.4, glibc-2.10.1-r1, 2.6.32-gentoo-r7 i686) ================================================================= System uname: Linux-2.6.32-gentoo-r7-i686-AMD_Athlon-tm-_XP_processor_1600+-with-gentoo-1.12.13 Timestamp of tree: Sat, 22 May 2010 21:00:20 +0000 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=i686 -pipe" CHOST="i686-pc-linux-gnu" sys-kernel/linux-headers-2.6.30-r1 app-admin/ulogd-1.23-r1 sys-kernel/gentoo-sources-2.6.32-r7 /lib/modules/2.6.32-gentoo-r7/build/include/asm-generic/int-ll64.h:11:29: error: asm/bitsperlong.h: No such file or directory libipulog.c: In function 'ipulog_netlink_recvfrom': libipulog.c:80: warning: pointer targets in passing argument 6 of 'recvfrom' differ in signedness make[1]: *** [libipulog.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/app-admin/ulogd-1.23-r1/work/ulogd-1.23/libipulog' make: *** [recurse] Error 1 * ERROR: app-admin/ulogd-1.23-r1 failed: * make failed * * Call stack: * ebuild.sh, line 54: Called src_compile * environment, line 2571: Called die * The specific snippet of code: * emake -j1 || die "make failed" * * If you need support, post the output of 'emerge --info =app-admin/ulogd-1.23-r1', * the complete build log and the output of 'emerge -pqv =app-admin/ulogd-1.23-r1'. * The complete build log is located at '/var/tmp/portage/app-admin/ulogd-1.23-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-admin/ulogd-1.23-r1/temp/environment'. * S: '/var/tmp/portage/app-admin/ulogd-1.23-r1/work/ulogd-1.23'
on x86_64 the same
same bug, while compiling net-wireless/wavemon-0.4.0b-r2 against sys-kernel/xen-sources-2.6.34 . (In reply to comment #5) > A really ugly solution which worked me for sys-cluster/drbd-8.3.2 is: > cp /usr/src/linux/arch/x86/include/asm/bitsperlong.h /usr/include/asm/ worked for me.
See also http://bugs.gentoo.org/show_bug.cgi?id=297068#c8
DUPLICATE with #336323 (where I have suggested a patch)
#352335 linux-headers-2.6.36.1 just went stable for x86. app-admin/ulogd-1.23-r1 compiles quite happily now, although it spits out lots of warnings. In file included from /lib/modules/2.6.36-gentoo-r5/build/include/linux/netlink.h:5, from ../libipulog/include/libipulog/libipulog.h:13, from ../include/ulogd/ulogd.h:15, from ulogd_PCAP.c:35: /lib/modules/2.6.36-gentoo-r5/build/include/linux/types.h:13:2: warning: #warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders" Mike
(In reply to comment #16) > #352335 linux-headers-2.6.36.1 just went stable for x86. > app-admin/ulogd-1.23-r1 compiles quite happily now, although it spits out lots > of warnings. I wonder how you made ulogd compile with the latest linux-headers installed. I get * ERROR: app-admin/ulogd-1.23-r1 failed: * kernel version is too new -- try a newer ulogd
(In reply to comment #17) > I wonder how you made ulogd compile with the latest linux-headers installed. I > get > > * ERROR: app-admin/ulogd-1.23-r1 failed: > * kernel version is too new -- try a newer ulogd > Just comment out the line in the ebuild, and re-digest it.
*** Bug 336323 has been marked as a duplicate of this bug. ***
There are attachments from Christophe Lefebvre in bug #336323 which resolve the issue mentioned in Comment #16. Would someone be so kind as to review them and perhaps get them committed? Last I checked, Wormo is away on account of RL stuff, though she may be resuming maintenance soon. I daresay that she would not mind someone else lending a hand in the meantime, if they are able. It would certainly be nice to steer the bug to a conclusion, particularly as ulogd-1.x remains the stable series. I would humbly suggest: 1) Committing Christophe's patch for a 1.24-r3 bump if it passes basic QA testing 2) Issuing a stable request for the new ebuild
I just tried the bitsperlong patch from the other bug but it didn't apply because it needs to be generated after having applied ulogd-glsa-200805.patch, which was easy enough to deal with. Unfortunately, removing /usr/src/linux/include from the include path causes this: make[1]: Entering directory `/var/tmp/portage/app-admin/ulogd-1.24-r3/work/ulogd-1.24/conffile' gcc -g -O2 -Wall -DULOGD_CONFIGFILE=\"/usr/local/etc/ulogd.conf\" @KERNEL64_USERSPACE32@ -I./libipulog/include -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_LIBDL=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_UNISTD_H=1 -DHAVE_VPRINTF=1 -DHAVE_SOCKET=1 -DHAVE_STRERROR=1 -I../include/ulogd -c conffile.c -o conffile.o gcc: error: @KERNEL64_USERSPACE32@: No such file or directory make[1]: *** [conffile.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/app-admin/ulogd-1.24-r3/work/ulogd-1.24/conffile' make: *** [recurse] Error 1 ... which is related to this commit: http://git.netfilter.org/cgi-bin/gitweb.cgi?p=ulogd.git;a=commitdiff;h=a04029553ce3bfbae039becebaef04a0ea0ae1ab I'm not sure what the appropriate solution is. That was with 1.24 but I'm guessing 1.23 isn't affected (though I have not yet tried it).
The glsa patch seems to screw things up. I just tried applying Christophe's patch to a vanilla ulogd-1.24 tree and it works fine there.
Never mind, I'd just forgotten to run autoconf. My proposed ebuild is in bug 418351 if anyone is interested.
This package needs a proxy maintainer for this and libnetfilter_acct: http://www.gentoo.org/proj/en/qa/proxy-maintainers/
Created attachment 342720 [details, diff] ulogd-fix-unclude-in-libipulog-Makefile.patch A patch that fixes this issue.
Created attachment 342722 [details] ulogd-1.23-r2.ebuild Proposed ebuild with patch that fixes this issue.
Created attachment 342740 [details, diff] ulogd-fix-include-in-libipulog-Makefile.patch Fix typo unclude -> include
Created attachment 342742 [details] ulogd-1.23-r2.ebuild Fix typo unclude -> include
+ 21 Mar 2013; Sergey Popov <pinkbyte@gentoo.org> ulogd-1.23-r1.ebuild, + +files/ulogd-1.23-fix-include-in-libipulog-Makefile.patch, + ulogd-1.24-r2.ebuild: + Fix usage of kernel headers from /usr/src, wrt bug #285376. Thanks to Coacher + <itumaykin AT gmail.com> for patch