Summary: | compiling libstatgrab-0.11 failed | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Botykai Zsolt <zsolt.botykai> |
Component: | Current packages | Assignee: | Daniel Black (RETIRED) <dragonheart> |
Status: | RESOLVED NEEDINFO | ||
Severity: | normal | CC: | f, nixnut |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | add #include <linux/types.h> to network_stats.c |
Description
Botykai Zsolt
2005-04-01 00:44:23 UTC
As masterbuilder commented on the forums: http://forums.gentoo.org/viewtopic-p-2318560.html#2318560 "Just open /usr/include/linux/ethtool.h file and add #include <linux/types.h> before the struct declaration." Should resolve this? (Can't try it till monday...) added libstatgrab-0.11.1. I couldn't reproduce your compile fault. If you still have problems reopen this bug and I'll put a #include <linux/types.h> before network_stats.c:59. Technically this is bad kernel headers however I've had little luck in getting this kind of problems fixed upstream. Hi Daniel I gave it a try with removing the include line from '/usr/include/linux/ethtool.h' (as I added it by masterbuilder's recommendations mentioned above), but had got this error which is a little different from the original: ... /usr/include/linux/ethtool.h:348: error: parse error before "__u64" /usr/include/linux/ethtool.h:349: error: parse error before "__u32" /usr/include/linux/ethtool.h:352: error: parse error before "__u64" /usr/include/linux/ethtool.h:355: error: parse error before '}' token network_stats.c: In function `sg_get_network_iface_stats': network_stats.c:634: error: storage size of 'ethcmd' isn't known {standard input}: Assembler messages: {standard input}:66: Warning: size of "version" is already 32; not changing to 4 {standard input}:68: Warning: size of "data" is already 4; not changing to 0 {standard input}:105: Warning: size of "reserved" is already 16; not changing to 4 make[3]: *** [network_stats.lo] Error 1 make[3]: *** Waiting for unfinished jobs.... i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -O3 -march=pentium4 -funroll-loops -pipe -MT page_stats.lo -MD -MP -MF .deps/page_stats.Tpo -c page_stats.c -fPIC -DPIC -o .libs/page_stats.o i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -O3 -march=pentium4 -funroll-loops -pipe -MT page_stats.lo -MD -MP -MF .deps/page_stats.Tpo -c page_stats.c -o page_stats.o >/dev/null 2>&1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 So I re-edited /usr/include/linux/ethtool.h and emerge -uDvN libstatgrab compiled as expected. which version/versions of libstatgrab? Sorry I'm too sleepy :-) Of course the brand new libstatgrab-0.11.1. so what about this problem? > so what about this problem?
This "problem" will get fixed when I get around to it. This isn't the only thing I do.
If you do really actually want to help attach a patch against libstatgrab that will include the required header before including linux/ethtool.h.
Also determine whether ethtool.h should really include linux/type.h. Is so file a linux bug and attach a reference here in the URL field.
Created attachment 66926 [details, diff]
add #include <linux/types.h> to network_stats.c
compiled ok for me after adding #include <linux/types.h> to
/libstatgrab-0.11.1/src/libstatgrab/network_stats.c
libstatgrab-0.12 seems to fix this. It does its own typedefs If it works for you tell me and I'll remove other versions. 0.12 added - anyone have a problem with this version? works for me |