Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 50699 - net-tools-1.60-r8 fails to compile
Summary: net-tools-1.60-r8 fails to compile
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High blocker (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-10 21:23 UTC by Chris Bruner
Modified: 2004-08-19 22:16 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Bruner 2004-05-10 21:23:38 UTC
interface.c: In function `if_fetch':
interface.c:437: error: `skfd' undeclared (first use in this function)
interface.c:437: error: (Each undeclared identifier is reported only once
interface.c:437: error: for each function it appears in.)
make[1]: *** [interface.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/net-tools-1.60-r8/work/net-tools-1.60/lib'
make: *** [subdirs] Error 2

!!! ERROR: sys-apps/net-tools-1.60-r8 failed.
!!! Function src_compile, Line 78, Exitcode 2
!!! (no error message)


Reproducible: Always
Steps to Reproduce:
1.emerge -up world
2.
3.

Actual Results:  
Looks like a programing error in the code itself. A variable is being used that 
doesn't exist. 


Looks like a programing error in the code itself. A variable is being used that 
doesn't exist.
Comment 1 Sven Wegener gentoo-dev 2004-06-04 16:01:33 UTC
compiles clean over here, both on x86 and ~x86, please post the output of emerge --info
Comment 2 Chris Bruner 2004-06-05 12:59:40 UTC
 emerge --info
Portage 2.0.50-r7 (default-x86-1.4, gcc-3.3.3, glibc-2.3.3_pre20031222-r0,2.3.3_pre20040117-r0,2.3.3_pre20040207-r0,2.3.3_pre20040420-r0,2.3.2-r1,2.3.2-r3, 2.6.6-rc3-mm1)
=================================================================
System uname: 2.6.6-rc3-mm1 i686 AMD Athlon(TM) MP 1800+
Gentoo Base System version 1.4.15
distcc 2.14 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.2 [enabled]
Autoconf: sys-devel/autoconf-2.59-r1,sys-devel/autoconf-2.59-r3,sys-devel/autoconf-2.59-r4,sys-devel/autoconf-2.58,sys-devel/autoconf-2.59
Automake: sys-devel/automake-1.7.8,sys-devel/automake-1.8.2,sys-devel/automake-1.8.3,sys-devel/automake-1.8.5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="no"
CFLAGS="-march=athlon -O3 -pipe -ffast-math -msse -funroll-loops -fforce-addr -falign-functions=4"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X Xaw3d aalib alsa apm arts avi berkdb bonobo bsf bsh cdr crypt cups dga directfb doc dvd encode esd etwin evo foomaticdb freetype fs gdbm gif gnome gphoto2 gpm gtk gtk2 guile imagemagick imlib jack jack-caps jack-tmpfs java jpeg kde ldap libg++ libwww mad mikmod mmx mng motif mozilla mpeg mpeg4 mysql ncurses nls nptl oggvorbis openal opengl oss pam pdflib perl png python qt quicktime radeon readline ruby samba scanner sdl slang speex spell sse ssl stencil-buffer svga tcltk tcpd tetex truetype video_cards_radeon videos wxwindows x86 xine xml2 xmms xv zlib"
Comment 3 Chris Bruner 2004-06-05 13:05:45 UTC
/* Fetch the interface configuration from the kernel. */
int if_fetch(struct interface *ife)
{
    struct ifreq ifr;
    int fd;
    char *ifname = ife->name;

    strcpy(ifr.ifr_name, ifname);
    if (ioctl(skfd, SIOCGIFFLAGS, &ifr) < 0)
        return (-1);
The problem is that skfd is not defined. at line 437.  I don't see how you could have compiled it since it is a code error. 

net-tools-1.60-r8 right?
Comment 4 Chris Bruner 2004-06-29 21:48:44 UTC
Looking a bit further, it appears that skfd is a global variable and marked as externel in sockets.h  For some unknown reason my system doesn't see this file, (it possibly sees some other file with the same name. There's a number on my system). 

I was able to get around the problem by 
emerge -u net-tools
waiting for the unpacking to finish.
ctrl-z 
copying the sockets.h from include to lib
fg

This allowed the compile to finish.

Comment 5 Matthew Schulkind 2004-08-19 19:37:03 UTC
This seems to be solved and should probably be marked as invalid, as it was due to multiple header files of the same name on the include path.
Comment 6 SpanKY gentoo-dev 2004-08-19 19:46:32 UTC
ok
Comment 7 Chris Bruner 2004-08-19 22:05:57 UTC
Wait a minute. The bug is that system include files are being included before the local ones. The fact that I was able to resolve it on my system doesn't mean the bug is not real. (And it re-occurs with each itteration of net-tools!) 

The include file in question is sockets.h which sounds to me like a very common name.

This can be found in my system at a number of places, 
/opt/crystal/include/csutil/sockets.h
/usr/local/include/sockets.h
/usr/include/mono/io-layer/sockets.h

So as far as I can see, if you emerge mono or crystalspace or whatever made the local one (Toolbus) then you can't compile net-tools.

Am I completely missing something?

Comment 8 SpanKY gentoo-dev 2004-08-19 22:16:31 UTC
i guess this should have been marked invalid since you've screwed up your system by setting up files in /usr/local/include/