Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 87522 - compiling libstatgrab-0.11 failed
Summary: compiling libstatgrab-0.11 failed
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Daniel Black (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-01 00:44 UTC by Botykai Zsolt
Modified: 2005-10-17 10:21 UTC (History)
2 users (show)

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


Attachments
add #include <linux/types.h> to network_stats.c (libstatgrab-linuxtypes.patch,310 bytes, patch)
2005-08-26 11:01 UTC, nixnut (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Botykai Zsolt 2005-04-01 00:44:23 UTC
Just wanted to install libstatgrab (an adesklet needed it) and this happened:
>>> emerge (2 of 7) sys-libs/libstatgrab-0.11 to /
>>> md5 src_uri ;-) libstatgrab-0.11.tar.gz
>>> Unpacking source...
>>> Unpacking libstatgrab-0.11.tar.gz to /var/tmp/portage/libstatgrab-0.11/work
>>> Source unpacked.
 * econf: updating libstatgrab-0.11/config.guess with /usr/share/gnuconfig/confi
g.guess
 * econf: updating libstatgrab-0.11/config.sub with /usr/share/gnuconfig/config.
sub
./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --inf
odir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var
/lib --disable-setgid-binaries --disable-setuid-binaries --disable-deprecated --
with-ncurses
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for i686-pc-linux-gnu-strip... i686-pc-linux-gnu-strip
checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i686-pc-linux-gnu-gcc accepts -g... yes
checking for i686-pc-linux-gnu-gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of i686-pc-linux-gnu-gcc... gcc3
checking for a BSD-compatible install... /bin/install -c
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by i686-pc-linux-gnu-gcc... /usr/i686-pc-linux-gnu/bin/ld
checking if the linker (/usr/i686-pc-linux-gnu/bin/ld) is GNU ld... yes
checking for /usr/i686-pc-linux-gnu/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/i686-pc-linux-gnu-nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... i686-pc-linux-gnu-gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for i686-pc-linux-gnu-g++... i686-pc-linux-gnu-g++
checking whether we are using the GNU C++ compiler... yes
checking whether i686-pc-linux-gnu-g++ accepts -g... yes
checking dependency style of i686-pc-linux-gnu-g++... gcc3
checking how to run the C++ preprocessor... i686-pc-linux-gnu-g++ -E
checking for i686-pc-linux-gnu-g77... i686-pc-linux-gnu-g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether i686-pc-linux-gnu-g77 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/i686-pc-linux-gnu-nm -B output from i686-pc-l
inux-gnu-gcc object... ok
checking for objdir... .libs
checking for i686-pc-linux-gnu-ar... i686-pc-linux-gnu-ar
checking for i686-pc-linux-gnu-ranlib... i686-pc-linux-gnu-ranlib
checking for i686-pc-linux-gnu-strip... (cached) i686-pc-linux-gnu-strip
checking if i686-pc-linux-gnu-gcc static flag  works... yes
checking if i686-pc-linux-gnu-gcc supports -fno-rtti -fno-exceptions... no
checking for i686-pc-linux-gnu-gcc option to produce PIC... -fPIC
checking if i686-pc-linux-gnu-gcc PIC flag -fPIC works... yes
checking if i686-pc-linux-gnu-gcc supports -c -o file.o... yes
checking whether the i686-pc-linux-gnu-gcc linker (/usr/i686-pc-linux-gnu/bin/ld
) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by i686-pc-linux-gnu-g++... /usr/i686-pc-linux-gnu/bin/ld
checking if the linker (/usr/i686-pc-linux-gnu/bin/ld) is GNU ld... yes
checking whether the i686-pc-linux-gnu-g++ linker (/usr/i686-pc-linux-gnu/bin/ld
) supports shared libraries... yes
checking for i686-pc-linux-gnu-g++ option to produce PIC... -fPIC
checking if i686-pc-linux-gnu-g++ PIC flag -fPIC works... yes
checking if i686-pc-linux-gnu-g++ supports -c -o file.o... yes
checking whether the i686-pc-linux-gnu-g++ linker (/usr/i686-pc-linux-gnu/bin/ld
) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for i686-pc-linux-gnu-g77 option to produce PIC... -fPIC
checking if i686-pc-linux-gnu-g77 PIC flag -fPIC works... yes
checking if i686-pc-linux-gnu-g77 supports -c -o file.o... yes
checking whether the i686-pc-linux-gnu-g77 linker (/usr/i686-pc-linux-gnu/bin/ld
) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for ANSI C header files... (cached) yes
checking for an ANSI C-conforming const... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for atoll... yes
checking for seteuid... yes
checking for setegid... yes
checking for setresuid... yes
checking for setresgid... yes
checking for struct disk_sysctl.dk_rbytes... no
checking for struct diskstats.ds_rbytes... no
checking for struct statvfs.f_fstypename... no
checking sys/loadavg.h usability... no
checking sys/loadavg.h presence... no
checking for sys/loadavg.h... no
checking libdevinfo.h usability... no
checking libdevinfo.h presence... no
checking for libdevinfo.h... no
checking for working ncurses... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/libstatgrab/Makefile
config.status: creating src/statgrab/Makefile
config.status: creating docs/Makefile
config.status: creating examples/Makefile
config.status: creating libstatgrab.pc
config.status: creating src/statgrab/statgrab-make-mrtg-config
config.status: creating src/statgrab/statgrab-make-mrtg-index
config.status: creating src/saidar/Makefile
config.status: creating config.h
config.status: executing depfiles commands
Making all in src
Making all in libstatgrab
mkdir .libs
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -O3 -march=pentium4 -funr
oll-loops -pipe -MT disk_stats.lo -MD -MP -MF .deps/disk_stats.Tpo -c disk_stats
.c  -fPIC -DPIC -o .libs/disk_stats.o
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -O3 -march=pentium4 -funr
oll-loops -pipe -MT cpu_stats.lo -MD -MP -MF .deps/cpu_stats.Tpo -c cpu_stats.c
 -fPIC -DPIC -o .libs/cpu_stats.o
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -O3 -march=pentium4 -funr
oll-loops -pipe -MT cpu_stats.lo -MD -MP -MF .deps/cpu_stats.Tpo -c cpu_stats.c
-o cpu_stats.o >/dev/null 2>&1
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -O3 -march=pentium4 -funr
oll-loops -pipe -MT disk_stats.lo -MD -MP -MF .deps/disk_stats.Tpo -c disk_stats
.c -o disk_stats.o >/dev/null 2>&1
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -O3 -march=pentium4 -funr
oll-loops -pipe -MT load_stats.lo -MD -MP -MF .deps/load_stats.Tpo -c load_stats
.c  -fPIC -DPIC -o .libs/load_stats.o
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -O3 -march=pentium4 -funr
oll-loops -pipe -MT load_stats.lo -MD -MP -MF .deps/load_stats.Tpo -c load_stats
.c -o load_stats.o >/dev/null 2>&1
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -O3 -march=pentium4 -funr
oll-loops -pipe -MT memory_stats.lo -MD -MP -MF .deps/memory_stats.Tpo -c memory
_stats.c  -fPIC -DPIC -o .libs/memory_stats.o
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -O3 -march=pentium4 -funr
oll-loops -pipe -MT memory_stats.lo -MD -MP -MF .deps/memory_stats.Tpo -c memory
_stats.c -o memory_stats.o >/dev/null 2>&1
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -O3 -march=pentium4 -funr
oll-loops -pipe -MT network_stats.lo -MD -MP -MF .deps/network_stats.Tpo -c netw
ork_stats.c  -fPIC -DPIC -o .libs/network_stats.o
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -O3 -march=pentium4 -funr
oll-loops -pipe -MT os_info.lo -MD -MP -MF .deps/os_info.Tpo -c os_info.c  -fPIC
 -DPIC -o .libs/os_info.o
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../.. -O3 -march=pentium4 -funr
oll-loops -pipe -MT os_info.lo -MD -MP -MF .deps/os_info.Tpo -c os_info.c -o os_
info.o >/dev/null 2>&1
In file included from network_stats.c:59:
/usr/include/linux/ethtool.h:18: error: parse error before "__u32"
/usr/include/linux/ethtool.h:20: error: parse error before "advertising"
/usr/include/linux/ethtool.h:21: error: parse error before "speed"
/usr/include/linux/ethtool.h:22: error: parse error before "duplex"
/usr/include/linux/ethtool.h:23: error: parse error before "port"
/usr/include/linux/ethtool.h:24: error: parse error before "phy_address"
/usr/include/linux/ethtool.h:25: error: parse error before "transceiver"
/usr/include/linux/ethtool.h:26: error: parse error before "autoneg"
/usr/include/linux/ethtool.h:27: error: parse error before "maxtxpkt"
/usr/include/linux/ethtool.h:28: error: parse error before "maxrxpkt"
/usr/include/linux/ethtool.h:29: error: parse error before "reserved"
/usr/include/linux/ethtool.h:30: error: parse error before '}' token
/usr/include/linux/ethtool.h:35: error: parse error before "__u32"
/usr/include/linux/ethtool.h:43: error: parse error before "n_stats"
/usr/include/linux/ethtool.h:44: error: parse error before "testinfo_len"
/usr/include/linux/ethtool.h:45: error: parse error before "eedump_len"
/usr/include/linux/ethtool.h:46: error: parse error before "regdump_len"
/usr/include/linux/ethtool.h:52: error: parse error before "__u32"
/usr/include/linux/ethtool.h:54: error: parse error before "wolopts"
/usr/include/linux/ethtool.h:55: error: parse error before "sopass"
/usr/include/linux/ethtool.h:56: error: parse error before '}' token
/usr/include/linux/ethtool.h:60: error: parse error before "__u32"
/usr/include/linux/ethtool.h:66: error: parse error before "__u32"
/usr/include/linux/ethtool.h:67: error: conflicting types for 'version'
/usr/include/linux/ethtool.h:37: error: previous declaration of 'version' was he
re
/usr/include/linux/ethtool.h:68: error: parse error before "len"
/usr/include/linux/ethtool.h:69: error: parse error before "data"
/usr/include/linux/ethtool.h:69: error: conflicting types for 'data'
/usr/include/linux/ethtool.h:61: error: previous declaration of 'data' was here
/usr/include/linux/ethtool.h:70: error: parse error before '}' token
/usr/include/linux/ethtool.h:74: error: parse error before "__u32"
/usr/include/linux/ethtool.h:76: error: parse error before "offset"
/usr/include/linux/ethtool.h:77: error: parse error before "len"
/usr/include/linux/ethtool.h:78: error: parse error before "data"
/usr/include/linux/ethtool.h:79: error: parse error before '}' token
/usr/include/linux/ethtool.h:83: error: parse error before "__u32"
/usr/include/linux/ethtool.h:97: error: parse error before "rx_max_coalesced_fra
mes"
/usr/include/linux/ethtool.h:104: error: parse error before "rx_coalesce_usecs_i
rq"
/usr/include/linux/ethtool.h:105: error: parse error before "rx_max_coalesced_fr
ames_irq"
/usr/include/linux/ethtool.h:111: error: parse error before "tx_coalesce_usecs"
/usr/include/linux/ethtool.h:119: error: parse error before "tx_max_coalesced_fr
ames"
/usr/include/linux/ethtool.h:126: error: parse error before "tx_coalesce_usecs_i
rq"
/usr/include/linux/ethtool.h:127: error: parse error before "tx_max_coalesced_fr
ames_irq"
/usr/include/linux/ethtool.h:134: error: parse error before "stats_block_coalesc
e_usecs"
/usr/include/linux/ethtool.h:143: error: parse error before "use_adaptive_rx_coa
lesce"
/usr/include/linux/ethtool.h:144: error: parse error before "use_adaptive_tx_coa
lesce"
/usr/include/linux/ethtool.h:150: error: parse error before "pkt_rate_low"
/usr/include/linux/ethtool.h:151: error: parse error before "rx_coalesce_usecs_l
ow"
/usr/include/linux/ethtool.h:152: error: parse error before "rx_max_coalesced_fr
ames_low"
/usr/include/linux/ethtool.h:153: error: parse error before "tx_coalesce_usecs_l
ow"
/usr/include/linux/ethtool.h:154: error: parse error before "tx_max_coalesced_fr
ames_low"
/usr/include/linux/ethtool.h:165: error: parse error before "pkt_rate_high"
/usr/include/linux/ethtool.h:166: error: parse error before "rx_coalesce_usecs_h
igh"
/usr/include/linux/ethtool.h:167: error: parse error before "rx_max_coalesced_fr
ames_high"
/usr/include/linux/ethtool.h:168: error: parse error before "tx_coalesce_usecs_h
igh"
/usr/include/linux/ethtool.h:169: error: parse error before "tx_max_coalesced_fr
ames_high"
/usr/include/linux/ethtool.h:174: error: parse error before "rate_sample_interva
l"
/usr/include/linux/ethtool.h:179: error: parse error before "__u32"
/usr/include/linux/ethtool.h:186: error: parse error before "rx_mini_max_pending
"
/usr/include/linux/ethtool.h:187: error: parse error before "rx_jumbo_max_pendin
g"
/usr/include/linux/ethtool.h:188: error: parse error before "tx_max_pending"
/usr/include/linux/ethtool.h:193: error: parse error before "rx_pending"
/usr/include/linux/ethtool.h:194: error: parse error before "rx_mini_pending"
/usr/include/linux/ethtool.h:195: error: parse error before "rx_jumbo_pending"
/usr/include/linux/ethtool.h:196: error: parse error before "tx_pending"
/usr/include/linux/ethtool.h:201: error: parse error before "__u32"
/usr/include/linux/ethtool.h:214: error: parse error before "rx_pause"
/usr/include/linux/ethtool.h:215: error: parse error before "tx_pause"
/usr/include/linux/ethtool.h:226: error: parse error before "__u32"
/usr/include/linux/ethtool.h:228: error: parse error before "len"
/usr/include/linux/ethtool.h:229: error: parse error before "data"
/usr/include/linux/ethtool.h:230: error: parse error before '}' token
/usr/include/linux/ethtool.h:239: error: parse error before "__u32"
/usr/include/linux/ethtool.h:241: error: parse error before "reserved"
/usr/include/linux/ethtool.h:241: error: conflicting types for 'reserved'
/usr/include/linux/ethtool.h:29: error: previous declaration of 'reserved' was h
ere
/usr/include/linux/ethtool.h:242: error: parse error before "len"
/usr/include/linux/ethtool.h:243: error: parse error before "data"
/usr/include/linux/ethtool.h:244: error: parse error before '}' token
/usr/include/linux/ethtool.h:248: error: parse error before "__u32"
/usr/include/linux/ethtool.h:250: error: parse error before "data"
/usr/include/linux/ethtool.h:251: error: parse error before '}' token
/usr/include/linux/ethtool.h:258: error: parse error before "__u32"
/usr/include/linux/ethtool.h:260: error: parse error before "__u32"
/usr/include/linux/ethtool.h:262: error: parse error before "__u32"
/usr/include/linux/ethtool.h:327: error: parse error before "__u32"
/usr/include/linux/ethtool.h:330: error: parse error before '*' token
/usr/include/linux/ethtool.h:330: error: `__u32' declared as function returning
a function
/usr/include/linux/ethtool.h:332: error: parse error before "__u8"
/usr/include/linux/ethtool.h:333: error: parse error before "__u8"
/usr/include/linux/ethtool.h:340: error: parse error before '*' token
/usr/include/linux/ethtool.h:340: error: `__u32' declared as function returning
a function
/usr/include/linux/ethtool.h:342: error: parse error before '*' token
/usr/include/linux/ethtool.h:342: error: `__u32' declared as function returning
a function
/usr/include/linux/ethtool.h:344: error: parse error before '*' token
/usr/include/linux/ethtool.h:344: error: `__u32' declared as function returning
a function
/usr/include/linux/ethtool.h:346: error: parse error before '*' token
/usr/include/linux/ethtool.h:346: error: `__u32' declared as function returning
a function
/usr/include/linux/ethtool.h:349: error: parse error before "__u64"
/usr/include/linux/ethtool.h:350: error: parse error before "__u32"
/usr/include/linux/ethtool.h:353: error: parse error before "__u64"
/usr/include/linux/ethtool.h:356: 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....
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


Reproducible: Always
Steps to Reproduce:
1. emerge -uDva --newuse libstatgrab
2.
3.




$ sudo emerge info
Portage 2.0.51.19 (default-linux/x86/2004.0, gcc-3.4.3-20050110,
glibc-2.3.4.20050125-r1, 2.6.11-ck3 i686)
=================================================================
System uname: 2.6.11-ck3 i686 Intel(R) Celeron(R) CPU 2.40GHz
Gentoo Base System version 1.6.10
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Feb 18 2005, 09:47:46)]
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.8.5-r3, 1.9.5, 1.5, 1.6.3, 1.4_p6, 1.7.9-r1
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.14
virtual/os-headers:  2.6.8.1-r4
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium4 -funroll-loops -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium4 -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks fixpackages noinfo sandbox sfperms"
GENTOO_MIRRORS="http://192.168.5.144:13579/ http://192.168.5.138:13579/
http://intranet.online.hu/ http://gentoo.inode.at/ http://gentoo.mirror.icd.hu/
http://gentoo.math.bme.hu/ http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="hu_HU"
MAKEOPTS="-j2 -s"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X aalib alsa apm arts avi bash-completion berkdb bitmap-fonts bonobo
cdr crypt cups curl directfb emboss encode esd fam flac font-server foomaticdb
fortran gdbm gif gphoto2 gpm gtk gtk2 gtkhtml guile hal imagemagick imlib ipv6
java jikes jpeg junit kde kdeenablefinal kdexdeltas libg++ libwww mad maildir
mbox mikmod motif mozilla mp3 mpeg ncurses nls nptl nptlonly oggvorbis opengl
oss pam pdflib perl png ppds python qt quicktime readline ruby samba sdl slang
spell ssl svga tcltk tcpd tiff truetype truetype-fonts type1-fonts unicode usb
usepackagedmakefiles xml xml2 xmms xv zlib linguas_en linguas_hu"
Unset:  ASFLAGS, CBUILD, CTARGET, LC_ALL, LDFLAGS
Comment 1 Botykai Zsolt 2005-04-17 00:28:05 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...)
Comment 2 Daniel Black (RETIRED) gentoo-dev 2005-04-21 02:28:34 UTC
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.
Comment 3 Botykai Zsolt 2005-04-22 02:27:35 UTC
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.
Comment 4 Daniel Black (RETIRED) gentoo-dev 2005-04-22 02:48:30 UTC
which version/versions of libstatgrab?
Comment 5 Botykai Zsolt 2005-04-22 02:54:27 UTC
Sorry I'm too sleepy :-)
Of course the brand new libstatgrab-0.11.1.
Comment 6 Igor Galchevsky 2005-04-25 03:23:35 UTC
so what about this problem?
Comment 7 Daniel Black (RETIRED) gentoo-dev 2005-04-26 01:39:30 UTC
> 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.
Comment 8 nixnut (RETIRED) gentoo-dev 2005-08-26 11:01:04 UTC
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
Comment 9 Daniel Black (RETIRED) gentoo-dev 2005-09-02 23:54:48 UTC
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. 
Comment 10 Daniel Black (RETIRED) gentoo-dev 2005-09-17 06:59:49 UTC
0.12 added - anyone have a problem with this version? 
Comment 11 nixnut (RETIRED) gentoo-dev 2005-10-17 10:21:30 UTC
works for me