Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 285376 - app-admin/ulogd-1.23-r1 uses -I paths against kernel source
Summary: app-admin/ulogd-1.23-r1 uses -I paths against kernel source
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Coacher
URL:
Whiteboard:
Keywords: STABLE
: 336323 (view as bug list)
Depends on: 418351 426868
Blocks:
  Show dependency tree
 
Reported: 2009-09-18 00:00 UTC by Yu Yuwei
Modified: 2013-03-21 09:07 UTC (History)
16 users (show)

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


Attachments
ulogd-fix-unclude-in-libipulog-Makefile.patch (ulogd-fix-unclude-in-libipulog-Makefile.patch,294 bytes, patch)
2013-03-20 15:59 UTC, Coacher
Details | Diff
ulogd-1.23-r2.ebuild (ulogd-1.23-r2.ebuild,1.54 KB, text/plain)
2013-03-20 16:00 UTC, Coacher
Details
ulogd-fix-include-in-libipulog-Makefile.patch (ulogd-fix-include-in-libipulog-Makefile.patch,294 bytes, patch)
2013-03-20 18:34 UTC, Coacher
Details | Diff
ulogd-1.23-r2.ebuild (ulogd-1.23-r2.ebuild,1.54 KB, text/plain)
2013-03-20 18:34 UTC, Coacher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yu Yuwei 2009-09-18 00:00:31 UTC
/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.
Comment 1 Olivier Crete (RETIRED) gentoo-dev 2009-09-19 21:32:05 UTC
Shouldn't be including that file...
Comment 2 Wormo (RETIRED) gentoo-dev 2009-09-20 06:47:04 UTC
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.

Comment 3 Yu Yuwei 2009-09-20 18:21:12 UTC
(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.
Comment 4 Paul Tobias 2009-09-29 19:45:12 UTC
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.
Comment 5 Paul Tobias 2009-09-29 19:55:29 UTC
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/
Comment 6 Wormo (RETIRED) gentoo-dev 2009-10-05 01:18:13 UTC
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. 
Comment 7 SpanKY gentoo-dev 2009-10-11 21:31:32 UTC
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
Comment 8 Tres 'RiverRat' Melton 2009-11-25 19:31:44 UTC
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                                                
Comment 9 Thomas Kahle (RETIRED) gentoo-dev 2010-01-18 11:07:23 UTC
It seems that app-admin/ulogd-2.0.0_beta3 does not suffer from this. 
Comment 10 Alejandro Diaz Caro 2010-03-16 16:00:19 UTC
same happens compiling net-wireless/wavemon-0.4.0b-r2 on amd64.
Comment 11 Kanstantsin Shautsou 2010-05-22 22:16:19 UTC
 # 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'
Comment 12 Kanstantsin Shautsou 2010-05-22 22:38:09 UTC
on x86_64 the same
Comment 13 DEMAINE Benoît-Pierre, aka DoubleHP 2010-07-06 22:22:00 UTC
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.
Comment 14 Christophe LEFEBVRE 2010-11-02 22:32:07 UTC
See also http://bugs.gentoo.org/show_bug.cgi?id=297068#c8
Comment 15 Christophe LEFEBVRE 2010-11-02 23:25:31 UTC
DUPLICATE with #336323 (where I have suggested a patch)
Comment 16 Mike Williams 2011-02-15 19:25:06 UTC
#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
Comment 17 Dirk Olmes 2011-02-16 04:47:11 UTC
(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
Comment 18 Mike Williams 2011-02-16 12:58:50 UTC
(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.
Comment 19 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-07-01 10:16:57 UTC
*** Bug 336323 has been marked as a duplicate of this bug. ***
Comment 20 kfm 2012-05-30 15:12:39 UTC
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
Comment 21 kfm 2012-05-30 18:00:20 UTC
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).
Comment 22 kfm 2012-05-30 18:09:00 UTC
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.
Comment 23 kfm 2012-05-31 10:05:50 UTC
Never mind, I'd just forgotten to run autoconf. My proposed ebuild is in bug 418351 if anyone is interested.
Comment 24 Pacho Ramos gentoo-dev 2012-09-16 09:14:04 UTC
This package needs a proxy maintainer for this and libnetfilter_acct:
http://www.gentoo.org/proj/en/qa/proxy-maintainers/
Comment 25 Coacher 2013-03-20 15:59:41 UTC
Created attachment 342720 [details, diff]
ulogd-fix-unclude-in-libipulog-Makefile.patch

A patch that fixes this issue.
Comment 26 Coacher 2013-03-20 16:00:45 UTC
Created attachment 342722 [details]
ulogd-1.23-r2.ebuild

Proposed ebuild with patch that fixes this issue.
Comment 27 Coacher 2013-03-20 18:34:27 UTC
Created attachment 342740 [details, diff]
ulogd-fix-include-in-libipulog-Makefile.patch

Fix typo unclude -> include
Comment 28 Coacher 2013-03-20 18:34:59 UTC
Created attachment 342742 [details]
ulogd-1.23-r2.ebuild

Fix typo unclude -> include
Comment 29 Sergey Popov gentoo-dev 2013-03-21 09:07:18 UTC
+  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