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

Bug 82690

Summary: xemacs doesn't compile against linux-headers-2.6.10
Product: Gentoo Linux Reporter: Derek Dolney <z23>
Component: Current packagesAssignee: XEmacs team <xemacs>
Status: RESOLVED FIXED    
Severity: normal CC: charles, plasmaroo
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

Description Derek Dolney 2005-02-20 08:39:20 UTC
This bug is related to #73366. Xemacs's src/lisp.h:262 defines the symbol 'register' to the empty value, but the new headers use the register keyword, e.g. in /usr/include/asm/thread_info.h. Here is the build error:

gcc -c -march=athlon-xp -O2 -Os -fomit-frame-pointer -pipe  -Demacs -I. -DHAVE_CONFIG_H -I/usr/X11R6/include gpmevent.c
In file included from /usr/include/linux/thread_info.h:21,
                 from /usr/include/linux/spinlock.h:12,
                 from /usr/include/linux/wait.h:23,
                 from /usr/include/linux/keyboard.h:4,
                 from gpmevent.c:48:
/usr/include/asm/thread_info.h:94: error: register name given for non-register variable 'current_stack_pointer'
make[1]: *** [gpmevent.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/xemacs-21.4.15-r3/work/xemacs-21.4.15/src'
make: *** [src] Error 2

--------------------------------------------------------------------------------

Portage 2.0.51-r15 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc-2.3.4.20050125-r0, 2.6.10-gentoo-r7 i686)
=================================================================
System uname: 2.6.10-gentoo-r7 i686 AMD Athlon(tm) XP 2100+
Gentoo Base System version 1.6.9
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Feb 18 2005, 17:45:02)]
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r2
sys-devel/libtool:   1.5.10-r4
virtual/os-headers:  2.6.10
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O2 -Os -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /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="-march=athlon-xp -O2 -Os -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms userpriv"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://gentoo.mirrors.pair.com/ http://mirror.datapipe.net/gentoo http://mirrors.tds.net/gentoo http://gentoo.chem.wisc.edu/gentoo/ http://open-systems.ufl.edu/mirrors/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="x86 3dnow X acpi adns alsa apache2 atlas avi berkdb bitmap-fonts bonobo bzlib crypt curl dvd emboss f77 fam fbcon fftw fortran gdbm gif gimpprint gnome gpm gstreamer gtk gtk2 guile imagemagick imlib java jpeg lesstif libg++ libwww maildir mime mmx mozilla moznoirc moznomail mpeg ncurses nptl nptlonly oggvorbis opengl pam pdflib perl pic png python quicktime readline real rtc sdl shared spell sse ssl tcpd tetex threads tiff truetype truetype-fonts type1-fonts unicode usb userlocales xml2 xmms xv zlib video_cards_radeon"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL
Comment 1 Tim Yamin (RETIRED) gentoo-dev 2005-02-24 16:32:15 UTC
Ok, I'm not going to fix this in the headers as what XEmacs is doing is Wrong <TM>; doing #define register '' is inherently bad as "register" is a C primitive which headers should be able to fully expect as should application code.

Some testing and yanking out the #defines in the XEmacs source is the way to fix this, IMO. XEmacs team, if you believe that this isn't something that you're willing to patch locally then feel free to shoot this off upstream.
Comment 2 Steve Arnold archtester gentoo-dev 2005-04-17 15:57:49 UTC
Is there any movement on this?  It's still broken, and linux-headers-2.6.11 is 
the current ~x86 that gets pulled in.  IIRC, it didn't break on 2.6.8 headers 
(whether xemacs is brain-dead or not...)
Comment 3 Tim Yamin (RETIRED) gentoo-dev 2005-04-17 16:25:23 UTC
Try adding:

#ifdef register
#undef register
#endif

to /usr/include/asm/thread_info.h... Let me know how that goes. Thanks.
Comment 4 Charles Pence 2005-04-18 12:14:40 UTC
I'm experiencing the same bug, I'm trying the fix in #3, will report back momentarily.
Comment 5 Charles Pence 2005-04-18 12:21:33 UTC
I can confirm, the fix in #3 does solve this bug.  What XEmacs is doing upstream is Bad Voodoo (tm), but the workaround solves the problem for the time being.  The compiled XEmacs also appears to work, as best I can tell.
Comment 6 Tim Yamin (RETIRED) gentoo-dev 2005-04-18 15:00:41 UTC
Headers patched in CVS, not closing bug as this needs sending upstream.
Comment 7 Markus Rothe (RETIRED) gentoo-dev 2005-04-20 09:06:43 UTC
I got this from plasmaroo on irc:

14:51 <@plasmaroo> corsair: Look at 82690 for that Xemacs thing, do the same workaround for paca.h
14:51 <@plasmaroo> corsair: Basically, upstream decides to screw all ANSI C standards and do #define register which is bad.
14:53 <@plasmaroo> corsair: So actually try putting the workaround in the bottom of types.h instead, that might be better.

I'll try that ASAP.
Comment 8 Markus Rothe (RETIRED) gentoo-dev 2005-04-20 09:07:26 UTC
sorry.. wrong bug.. that should have gone into bug #89770 :-/
Comment 9 Tim Yamin (RETIRED) gentoo-dev 2005-12-20 07:11:17 UTC
This bug is actually fixed in 2.6.11 so I'm closing it; but if somebody would be able to inform upstream about this it would be appreciated. Thanks!