Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 159896 - net-dialup/rp-pppoe-3.8 fails to compile with sys-kernel/linux-headers-2.6.19
Summary: net-dialup/rp-pppoe-3.8 fails to compile with sys-kernel/linux-headers-2.6.19
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Dialup Developers
URL:
Whiteboard:
Keywords:
: 161966 (view as bug list)
Depends on:
Blocks: sane-linux-headers
  Show dependency tree
 
Reported: 2007-01-03 13:09 UTC by Rene Gass
Modified: 2007-01-13 23:42 UTC (History)
3 users (show)

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


Attachments
my /usr/include/linux/if.h (if.h,7.36 KB, text/plain)
2007-01-03 15:53 UTC, Rene Gass
Details
my /usr/include/linux/if.h (if.h,7.36 KB, text/plain)
2007-01-03 15:56 UTC, Rene Gass
Details
my /usr/include/net/if.h (if.h,6.90 KB, text/plain)
2007-01-03 15:56 UTC, Rene Gass
Details
my /usr/include/linux/types.h (types.h,3.42 KB, text/plain)
2007-01-03 15:59 UTC, Rene Gass
Details
my /usr/include/linux/socket.h (socket.h,713 bytes, text/plain)
2007-01-03 16:00 UTC, Rene Gass
Details
my /usr/include/linux/hdlc/ioctl.h (ioctl.h,2.51 KB, text/plain)
2007-01-03 16:00 UTC, Rene Gass
Details
my /usr/include/features.h (features.h,11.46 KB, text/plain)
2007-01-03 16:01 UTC, Rene Gass
Details
my /usr/include/sys/types.h (types.h,6.62 KB, text/plain)
2007-01-03 16:01 UTC, Rene Gass
Details
my /usr/include/sys/socket.h (socket.h,8.98 KB, text/plain)
2007-01-03 16:02 UTC, Rene Gass
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rene Gass 2007-01-03 13:09:20 UTC
...
config.status: creating config.h
On this platform, the following targets will be built:
pppoe pppoe-server pppoe-sniff pppoe-relay rp-pppoe.so
Type 'make' to compile the software.
i686-pc-linux-gnu-gcc -march=pentium4 -O2 -fno-ident -fomit-frame-pointer -pipe -Wall -Wstrict-prototypes -ansi    '-DPPPOE_PATH="/usr/sbin/pppoe"' '-DPPPD_PATH="/usr/sbin/pppd"' '-DPLUGIN_PATH="/etc/ppp/plugins/rp-pppoe.so"' '-DPPPOE_SERVER_OPTIONS="/etc/ppp/pppoe-server-options"' -Ilibevent '-DVERSION="3.8"' -c -o pppoe.o pppoe.c
i686-pc-linux-gnu-gcc -march=pentium4 -O2 -fno-ident -fomit-frame-pointer -pipe -Wall -Wstrict-prototypes -ansi    '-DPPPOE_PATH="/usr/sbin/pppoe"' '-DPPPD_PATH="/usr/sbin/pppd"' '-DPLUGIN_PATH="/etc/ppp/plugins/rp-pppoe.so"' '-DPPPOE_SERVER_OPTIONS="/etc/ppp/pppoe-server-options"' -Ilibevent '-DVERSION="3.8"' -c -o if.o if.c
if.c: In function 'openInterface':
if.c:425: error: storage size of 'ifr' isn't known
if.c:425: warning: unused variable 'ifr'
make: *** [if.o] Error 1
make: *** Waiting for unfinished jobs....


My emerge --info:

Portage 2.1.2_rc4-r5 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.19-gentoo-r2 i686)
=================================================================
System uname: 2.6.19-gentoo-r2 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.12.8
Last Sync: Wed, 03 Jan 2007 20:00:01 +0000
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.19
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -fno-ident -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=pentium4 -O2 -fno-ident -fomit-frame-pointer -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig collision-protect distlocks metadata-transfer sandbox sfperms strict userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="de de_DE en en_US en_GB"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa arts artswrappersuid asf audiofile bash-completion berkdb bitmap-fonts boost browserplugin bzip2 cairo caps cdparanoia cli cracklib crypt css cups curl dga dlloader dpms dri dvd dvdr dvdread encode expat fam fame ffmpeg flac foomaticdb fortran fpx gdbm gif glitz gpm graphviz gs gstreamer gtk gtk2 iconv icu idn imagemagick imlib isdnlog jack jbig jce jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility kqemu lash lcms libg++ libsamplerate lzo lzw lzw-tiff mad mikmod mjpeg mmx mmx2 mmxext mng monkey motif mp3 mpeg ncurses nls nptl nptlonly nsplugin ogg opengl pam pcre pdf perl pic png ppds pppd python qt3 quicktime rdesktop readline real reflection rle rtc sblive sdl session slang sndfile softmmu speex spell spl sse sse2 ssl subversion svg symlink tcl tcltk tcpd tetex theora tidy tiff tk truetype truetype-fonts type1-fonts udev unicode usb userlocales utempter vcd vim visualization vorbis win32codecs wmf wxgtk1 x86 xine xml xml2 xorg xv xvid zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LINGUAS="de de_DE en en_US en_GB" USERLAND="GNU" VIDEO_CARDS="nv"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Alin Năstac (RETIRED) gentoo-dev 2007-01-03 15:00:12 UTC
I think this is related to glibc-2.5 more than to linux-headers. Also, the unused ifr warning is strange.

Please attach a tarball containing the following files:
  /usr/include/linux/if.h
  /usr/include/net/if.h
  whatever file is included by the previous file.
Comment 2 Rene Gass 2007-01-03 15:53:58 UTC
Created attachment 105333 [details]
my /usr/include/linux/if.h
Comment 3 Rene Gass 2007-01-03 15:56:13 UTC
Created attachment 105334 [details]
my /usr/include/linux/if.h
Comment 4 Rene Gass 2007-01-03 15:56:46 UTC
Created attachment 105335 [details]
my /usr/include/net/if.h
Comment 5 Rene Gass 2007-01-03 15:59:32 UTC
Created attachment 105336 [details]
my /usr/include/linux/types.h
Comment 6 Rene Gass 2007-01-03 16:00:07 UTC
Created attachment 105337 [details]
my /usr/include/linux/socket.h
Comment 7 Rene Gass 2007-01-03 16:00:44 UTC
Created attachment 105338 [details]
my /usr/include/linux/hdlc/ioctl.h
Comment 8 Rene Gass 2007-01-03 16:01:24 UTC
Created attachment 105339 [details]
my /usr/include/features.h
Comment 9 Rene Gass 2007-01-03 16:01:57 UTC
Created attachment 105340 [details]
my /usr/include/sys/types.h
Comment 10 Rene Gass 2007-01-03 16:02:31 UTC
Created attachment 105341 [details]
my /usr/include/sys/socket.h
Comment 11 Rene Gass 2007-01-03 16:04:07 UTC
Sorry for the dupe, the page didn't load properly. I hope these are all you need.
Comment 12 SpanKY gentoo-dev 2007-01-03 17:01:39 UTC
struct ifreq is only defined if you have preprocessor flags like _GNU_SOURCE or _BSD_SOURCE or _SVID_SOURCE because if you look at the spec for net/if.h (which is where this struct is defined), it only requires a few things:
http://www.opengroup.org/onlinepubs/009695399/basedefs/net/if.h.html

in order to get access to all the other fun stuff, you need the aforementioned preprocessor stuff
Comment 13 Alin Năstac (RETIRED) gentoo-dev 2007-01-04 00:14:59 UTC
Try the following:
  run "ebuild rp-pppoe-3.8.ebuild unpack"
  delete -ansi from /var/tmp/portage/rp-pppoe-3.8/work/rp-pppoe-3.8/configure script
  run "ebuild rp-pppoe-3.8.ebuild merge"
Comment 14 Alin Năstac (RETIRED) gentoo-dev 2007-01-04 07:06:51 UTC
fixed in cvs (without revision bump) by adding -D_GNU_SOURCE to CFLAGS.
Comment 15 Rene Gass 2007-01-04 09:29:16 UTC
I have changed
  /var/tmp/portage/rp-pppoe-3.8/work/rp-pppoe-3.8/src/configure
but merge fails at the same location. I'm currently syncing my tree and will try again.
Comment 16 Rene Gass 2007-01-04 09:44:27 UTC
Ok, it gets a little further. This is what I get now:

...
i686-pc-linux-gnu-gcc -march=pentium4 -O2 -fno-ident -fomit-frame-pointer -pipe -D_GNU_SOURCE -Wall -Wstrict-prototypes -ansi    '-DPPPOE_PATH="/usr/sbin/pppoe"' '-DPPPD_PATH="/usr/sbin/pppd"' '-DPLUGIN_PATH="/etc/ppp/plugins/rp-pppoe.so"' '-DPPPOE_SERVER_OPTIONS="/etc/ppp/pppoe-server-options"' -Ilibevent '-DVERSION="3.8"' -c -o plugin/debug.o -fPIC debug.c
i686-pc-linux-gnu-gcc '-DRP_VERSION="3.8"' -march=pentium4 -O2 -fno-ident -fomit-frame-pointer -pipe -D_GNU_SOURCE -Wall -Wstrict-prototypes -ansi    '-DPPPOE_PATH="/usr/sbin/pppoe"' '-DPPPD_PATH="/usr/sbin/pppd"' '-DPLUGIN_PATH="/etc/ppp/plugins/rp-pppoe.so"' '-DPPPOE_SERVER_OPTIONS="/etc/ppp/pppoe-server-options"' -Ilibevent -I../../ppp-2.4.3 -c -o plugin/plugin.o -fPIC plugin.c
i686-pc-linux-gnu-gcc -o pppoe pppoe.o if.o debug.o common.o ppp.o discovery.o
In file included from /usr/include/linux/if_pppox.h:21,
                 from plugin.c:56:
/usr/include/asm/byteorder.h:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before '___arch__swab64'
In file included from /usr/include/linux/byteorder/little_endian.h:12,
                 from /usr/include/asm/byteorder.h:53,
                 from /usr/include/linux/if_pppox.h:21,
                 from plugin.c:56:
/usr/include/linux/byteorder/swab.h:160: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__fswab64'
/usr/include/linux/byteorder/swab.h:170: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__swab64p'
/usr/include/linux/byteorder/swab.h:174: error: expected ')' before '*' token
In file included from /usr/include/asm/byteorder.h:53,
                 from /usr/include/linux/if_pppox.h:21,
                 from plugin.c:56:
/usr/include/linux/byteorder/little_endian.h:43: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__cpu_to_le64p'
/usr/include/linux/byteorder/little_endian.h:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__le64_to_cpup'
/usr/include/linux/byteorder/little_endian.h:67: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__cpu_to_be64p'
/usr/include/linux/byteorder/little_endian.h:71: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__be64_to_cpup'
make: *** [plugin/plugin.o] Error 1
make: *** Waiting for unfinished jobs....
Comment 17 SpanKY gentoo-dev 2007-01-04 13:46:20 UTC
that failure is because of -ansi as Alin hinted
Comment 18 Rene Gass 2007-01-04 14:09:35 UTC
I had tried to emerge the package like Alin wrote in #13, which did not help. I synced and got the changes from #14. Emerging without modifying the configure script did not work, as well (I thought the change from #14 would be equivalent to removing the "-ansi"). But taking the new ebuild AND removing "-ansi" from the configure script now solved the problem.

So if you patch that "-ansi" out of the configure script, all should be well.

Thanks, Ren
Comment 19 Rene Gass 2007-01-04 14:09:35 UTC
I had tried to emerge the package like Alin wrote in #13, which did not help. I synced and got the changes from #14. Emerging without modifying the configure script did not work, as well (I thought the change from #14 would be equivalent to removing the "-ansi"). But taking the new ebuild AND removing "-ansi" from the configure script now solved the problem.

So if you patch that "-ansi" out of the configure script, all should be well.

Thanks, René
Comment 20 Alin Năstac (RETIRED) gentoo-dev 2007-01-04 14:27:00 UTC
Fixed in cvs (still without revision bump) by creating configure.patch.
The new patch contains the old no-strip.patch and replace -ansi with -D_GNU_SOURCE.

Thanks, guys!
Comment 21 Rene Gass 2007-01-05 00:45:50 UTC
Works for me, now. Thanks again!
Comment 22 Jakub Moc (RETIRED) gentoo-dev 2007-01-13 23:42:35 UTC
*** Bug 161966 has been marked as a duplicate of this bug. ***