Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 283759 - sys-apps/net-tools-1.60_p20090728014017-r1 does not compile due to local headers in /usr/local/include/
Summary: sys-apps/net-tools-1.60_p20090728014017-r1 does not compile due to local head...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: PPC64 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-05 14:50 UTC by Wolfram Kahl
Modified: 2009-09-06 17:37 UTC (History)
2 users (show)

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


Attachments
Build log for net-tools-1.60_p20071202044231 with MAKEOPTS=-j1 (net-tools-j1.log,12.89 KB, text/plain)
2009-09-06 16:01 UTC, Wolfram Kahl
Details
interface.c preprocessor result (interface.cpp,140.07 KB, text/plain)
2009-09-06 16:09 UTC, Wolfram Kahl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfram Kahl 2009-09-05 14:50:38 UTC
All three versions of sys-apps/net-tools currently in portage fail during compilation with ``interface.c:415: error: 'skfd' undeclared''.

For 1.60-r13 this requires ``USE=-nls'' (with nls, 1.60-r13 fails with ``NULL undeclared''); for the two newer versions, both nls and -nls produce the error.



Reproducible: Always

Steps to Reproduce:
emerge sys-apps/net-tools

Actual Results:  
powerpc-unknown-linux-gnu-gcc -O2 -pipe -mcpu=970 -mtune=970 -maltivec -mabi=altivec -fno-strict-aliasing -Wall -I.. -idirafter ../include  -D_GNU_SOURCE -I. -idirafter ./include/ -Ilib  -c -o interface.o interface.c
interface.c: In function 'if_fetch':
interface.c:415: error: 'skfd' undeclared (first use in this function)
interface.c:415: error: (Each undeclared identifier is reported only once
interface.c:415: error: for each function it appears in.)


Expected Results:  
Success!  ;-)

This is on a PowerMac G5, i.e., on powerpc64, running 32bit userland.
I first ran into this in May 2009.

I leave this as ``Normal'' for now, but it could of course be a ``Blocker'' for anybody doing a fresh install.


heraklit ~ # gcc --version
gcc (Gentoo 4.3.2-r3 p1.6, pie-10.1.5) 4.3.2


 # emerge --info
Portage 2.1.6.13 (default/linux/powerpc/ppc64/2008.0/32bit-userland/desktop, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r4 ppc64)
=================================================================
System uname: Linux-2.6.30-gentoo-r4-ppc64-PPC970FX,_altivec_supported-with-glibc2.0
Timestamp of tree: Fri, 04 Sep 2009 13:45:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.4.6, 2.5.4-r3
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
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.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="ppc"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -pipe -mcpu=970 -mtune=970 -maltivec -mabi=altivec"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -mcpu=970 -mtune=970 -maltivec -mabi=altivec"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages metadata-transfer parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="en de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/haskell"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl aiglx alsa altivec amrnb amrwb animgif ao arts asyncns audiofile bash-completion berkdb bluetooth branding bzip2 cairo cddb cdparanoia cdr chardet cjk cli cracklib crypt css cups curl cursors dbus directfb dri dts dv dvd dvdr dvdread dvi eds emacs emboss encode enscript esd evo exif fam fbcon ffmpeg fftw firefox flac fontconfig foomaticdb fortran gb gcc64 gcj gd gdbm gdm ghcbootstrap gif gimp git glade glitz glut gmp gnome gnome-keyring gnomecanvas gnuplot gnutella gnutls gphoto2 gpm graphviz gs gstreamer gtk gtk2 gtkhtml gzip hal haskell hscolour iconv id3tag ilbc imagemagick imlib ipod ipv6 isdnlog jabber jbig jpeg jpeg2k kde kdeenablefinal kdrive kpathsea lame latex ldap leim libcaca libffi libnotify live logrotate loop-aes lzma lzo mad matroska md5sum mikmod mjpeg motif mozdevelop mozdom mozsvg mp3 mp4 mpeg mplayer mudflap mule musepack ncurses netpbm nls nodrm nptl nptlonly nsplugin ocaml ogg openal opengl openmp pam pango pcre pdf pdflib perl plotutils png pnm postgres postscript ppc ppds pppd python qmail qt3 qt3support qt4 quicktime readline realmedia reflection rtc samba sdk sdl seamonkey session smp sndfile spell spl ssl startup-notification subversion svg sysfs t1lib tcltk tcpd theora threads threadsafe thunar tiff timidity tk truetype tta unicode usb v4l v4l2 vorbis wavpack webdav wma wmp x264 xanim xemacs xft xine xinerama xml xmp xorg xpm xrandr xulrunner xv xvid zlib" ALSA_CARDS="aoa aoa-fabric-layout aoa-onyx aoa-soundbus aoa-soundbus-i2s aoa-tas aoa-toonie powermac usb-audio via82xx" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" USERLAND="GNU" VIDEO_CARDS="radeon fbdev vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 SpanKY gentoo-dev 2009-09-06 14:09:23 UTC
post the full build log as an attachment.  skfd is defined in ../include/sockets.h which interface.c includes unconditionally for all functions in global scope.
Comment 2 Wolfram Kahl 2009-09-06 16:01:21 UTC
Created attachment 203283 [details]
Build log for net-tools-1.60_p20071202044231 with MAKEOPTS=-j1
Comment 3 Wolfram Kahl 2009-09-06 16:09:45 UTC
Created attachment 203286 [details]
interface.c preprocessor result

In /var/tmp/portage/sys-apps/net-tools-1.60_p20071202044231-r1/work/net-tools-1.60_p20071202044231/lib, I did:

powerpc-unknown-linux-gnu-gcc -O2 -pipe -mcpu=970 -mtune=970 -maltivec -mabi=altivec -fno-strict-aliasing -Wall -I.. -idirafter ../include  -D_GNU_SOURCE -I. -idirafter ./include/ -Ilib  -E -o interface.cpp interface.c
Comment 4 SpanKY gentoo-dev 2009-09-06 16:23:22 UTC
PEBKAC

# 1 "/usr/local/include/sockets.h" 1 3
Comment 5 Wolfram Kahl 2009-09-06 16:31:18 UTC
I discovered that I have /usr/local/include/sockets.h from ASF-SDF.
Changing

     -idirafter ../include

to

      -I ../include

in my CPP run picks up the local file.


The include flags there seem to be cobbled together without too much thought
--- there are ``-idirafter ./include/ -Ilib'' even inside ``lib''.


-idirafter considered harmful...
Comment 6 SpanKY gentoo-dev 2009-09-06 17:13:37 UTC
-idirafter is not "harmful".  it is used in many many packages and the semantics it provides are absolutely necessary.  net-tools used to be in that class, but it no longer provides fallback headers which necessitate -idirafter usage.  so i will convert it to a -I.
Comment 7 Wolfram Kahl 2009-09-06 17:37:35 UTC
Thank you!

(I forgot the smiley after the ``considered harmful...'' --- sorry!)