Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 16715

Summary: doomlegacy-1.40 doesn't build (errno)
Product: Gentoo Linux Reporter: Derek Dolney <z23>
Component: [OLD] GamesAssignee: Gentoo Games <games>
Status: RESOLVED FIXED    
Severity: normal CC: celestialwizard
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 16267    
Bug Blocks:    

Description Derek Dolney 2003-03-02 23:51:34 UTC
emerge doomlegacy-1.40 fails at link stage due to undefined reference to `errno`.

I can fix it by including <errno.h> in linux_x/i_sound.c. Here's a patch:

--- linux_x/i_sound.c.orig      2003-03-02 23:48:57.000000000 -0500
+++ linux_x/i_sound.c   2003-03-02 23:49:51.000000000 -0500
@@ -84,6 +84,8 @@
 #include <sys/time.h>
 #include <sys/types.h>
                                                                                
+#include <errno.h>
+
 #if !defined(LINUX) && !defined(SCOOS5) && !defined(_AIX)
 #include <sys/filio.h>
 #endif
@@ -261,7 +263,7 @@
   int*  arg )
 {
     int         rc;
-    extern int  errno;
+//    extern int  errno;
                                                                                
     rc = ioctl(fd, command, arg);
     if (rc < 0)


Reproducible: Always
Steps to Reproduce:
1.emerge doomlegacy
2.
3.

Actual Results:  
undefined reference to `errno' in objs/i_sound.o


Portage 2.0.47-r7 (default-x86-1.4, gcc-3.2.2, glibc-2.3.2_pre1-r0)
=================================================================
System uname: 2.4.20-gentoo-r1 i686 AMD Athlon(tm) Processor
GENTOO_MIRRORS=" ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo
ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/
http://194.83.57.11/sites/www.ibiblio.org/gentoo/"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="oss perl esd -arts -avi -berkdb -crypt -cups -encode -imlib -kde -libg++
-libwww -mikmod -motif -nls -oggvorbis -pam -python -qt -qtmt -sdl -slang -ssl
-svga -tcpd -xmms x86 3dnow apm bonobo gdbm gif gnome gpm gtk java jpeg maildir
mmx mozilla mpeg ncurses opengl pdflib pic png quicktime readline spell tcltk
tetex truetype X xml2 xv zlib"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon-tbird -O3 -fomit-frame-pointer -pipe"
CXXFLAGS="-march=athlon-tbird -O3 -fomit-frame-pointer -pipe"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache userpriv usersandbox"
Comment 1 Celestial Wizard 2003-03-03 03:53:17 UTC
I can also confirm this bug