Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 235789 - xorg-server / kernel headers 2.6.26 - vm86.c:225: error: 'IF_MASK' undeclared (first use in this function)
Summary: xorg-server / kernel headers 2.6.26 - vm86.c:225: error: 'IF_MASK' undeclared...
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords: Inclusion
: 235575 236910 240328 242480 256006 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-26 15:06 UTC by lexx
Modified: 2009-09-03 20:04 UTC (History)
12 users (show)

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


Attachments
Have vm86.h fall back to X86_EFLAGS_* (vm86_masks.patch,495 bytes, patch)
2008-09-09 16:51 UTC, Martin von Gagern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lexx 2008-08-26 15:06:40 UTC
Xorg-server faild to compile

Reproducible: Always

Steps to Reproduce:
1. emerge xorg-server

Actual Results:  
...
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../../include -I../../../hw/kdrive/src -I../../../miext/damage -I../../../miext/shadow -I../../../Xext -I../../../fb -I../../../mi -I../../../hw/kdrive/linux -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/hal -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include   -I../../../include -I../../../include -I../../../Xext -I../../../composite -I../../../damageext -I../../../xfixes -I../../../Xi -I../../../mi -I../../../miext/shadow  -I../../../miext/damage -I../../../render -I../../../randr -I../../../fb -DHAVE_KDRIVE_CONFIG_H     -march=athlon-xp -O3 -pipe -fomit-frame-pointer -funroll-all-loops -fpeel-loops -funswitch-loops -funit-at-a-time -ftracer -ffast-math -D_GNU_SOURCE -MT vm86.o -MD -MP -MF .deps/vm86.Tpo -c -o vm86.o vm86.c
vm86.c: In function 'Vm86DoInterrupt':
vm86.c:213: warning: too few arguments for format
vm86.c:225: error: 'IF_MASK' undeclared (first use in this function)
vm86.c:225: error: (Each undeclared identifier is reported only once
vm86.c:225: error: for each function it appears in.)
vm86.c:225: error: 'IOPL_MASK' undeclared (first use in this function)
vm86.c: In function 'Vm86Debug':
vm86.c:746: warning: format '%04lX' expects type 'long unsigned int', but argument 2 has type 'int'
vm86.c:746: warning: format '%04lX' expects type 'long unsigned int', but argument 3 has type 'int'
vm86.c:746: warning: format '%04lX' expects type 'long unsigned int', but argument 4 has type 'int'
vm86.c:746: warning: format '%04lX' expects type 'long unsigned int', but argument 5 has type 'int'
vm86.c:746: warning: format '%04lX' expects type 'long unsigned int', but argument 6 has type 'int'
make[3]: *** [vm86.o] Error 1
make[3]: *** Waiting for unfinished jobs....
mv -f .deps/vesa.Tpo .deps/vesa.Po
make[3]: Leaving directory `/var/tmp/portage/x11-base/xorg-server-1.4.2/work/xorg-server-1.4.2/hw/kdrive/vesa'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/x11-base/xorg-server-1.4.2/work/xorg-server-1.4.2/hw/kdrive'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/x11-base/xorg-server-1.4.2/work/xorg-server-1.4.2/hw'
make: *** [all-recursive] Error 1
 *
 * ERROR: x11-base/xorg-server-1.4.2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3090:  Called x-modular_src_compile
 *             environment, line 3894:  Called x-modular_src_make
 *             environment, line 3930:  Called die
 * The specific snippet of code:
 *       emake || die "emake failed"
 *  The die message:
 *   emake failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/x11-base:xorg-server-1.4.2:20080826-093148.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-base/xorg-server-1.4.2/temp/environment'.
 *



Portage 2.2_rc8 (default-linux/x86/2007.0/desktop, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.26-gentoo i686)
=================================================================
System uname: Linux-2.6.26-gentoo-i686-AMD_K7_processo-with-glibc2.0
Timestamp of tree: Tue, 26 Aug 2008 01:17:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.26
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -funroll-all-loops -fpeel-loops -funswitch-loops -funit-at-a-time -ftracer -ffast-math"
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/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -funroll-all-loops -fpeel-loops -funswitch-loops -funit-at-a-time -ftracer -ffast-math"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.bg/ http://mirror.yandex.ru/gentoo-distfiles/ ftp://mirror.yandex.ru/gentoo-distfiles/ http://distfiles.gentoo.bg/ http://ftp.gentoo.bg/ http://ftp.fi.muni.cz/pub/linux/gentoo/ ftp://ftp.fi.muni.cz/pub/linux/gentoo/ http://gentoo.mirror.web4u.cz/ ftp://gentoo.mirror.web4u.cz/ http://ftp.linux.ee/pub/gentoo/distfiles/ ftp://ftp.linux.ee/pub/gentoo/distfiles/ http://mirror.ovh.net/gentoo-distfiles/ ftp://mirror.ovh.net/gentoo-distfiles/ ftp://gentoo.imj.fr/pub/gentoo/ ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.gentoo.mesh-solutions.com/gentoo/ ftp://pandemonium.tiscali.de/pub/gentoo/ http://gentoo.mneisen.org/ http://de-mirror.org/distro/gentoo/ ftp://de-mirror.org/distro/gentoo/"
LANG="ru_RU.UTF-8"
LC_ALL=""
LDFLAGS=""
LINGUAS="ru en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
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"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 7zip X Xaw3d a52 aac accessibility acl acpi aim alias alisp alsa amarok amr amrnb aotuv aspnet aspnet2 async audit authfile authlib auto-completion automount avahi bash-completion bind-mysql bzip2 c++ cairo caps ccache cdaudio cdb cdda cddb cdio cdparanoia cdr cdrom cdsound cg cgi chroot cli compress consolekit cpio cracklib crypt cups curl cursors cxx cyrillic dbm dbus debugger demo device-mapper dga dhcp directfb directv divx djvu dmi dnd dvbplayer dvd dvdarchive dvdchapjump dvdr dvdread emacs emboss encode esd exif fame fastbuild fbdev ffmpeg filter flac ftp gdb gdbm gif gimp glut gmp gpm gstreamer hal hash http icons iconv icq ieee1394 ivtv java java-external java-internal javascript jpeg jpeg2k kde kdeenablefinal kdm kdrive kerberos laptop libnotify mad maps midi mikmod mime mmx mono moonlight mouse mp2 mp3 mp4 mp4live mpeg mpeg2 mplayer mpu401 mtp mudflap music mysql nano-syntax nanoemacs ncurses nforce2 nls nocd nptl nvidia nvram odk ogg opengl openmp opera oscar oss pam pcre pdf perl php player png posix python qt3 qt3-static qt3support qt4 quicktime radio rar rdesktop readline reflection reiser4 reiserfs resolver rsync ruby samba scanner sdl search server session slang sms sound soundex sounds spell spl sse ssl suexec svg svga tcpd tga themes tiff tivo toolbar tools translator truetype tv unicode usb v4l v4l2 vcd vga videos vim-syntax vmware vorbis wav web win32codecs winbind winpopup wma wmf wmp x264 x86 xcomposite xine xinerama xml xmlwriter xorg xscreensaver xv xvid xvmc zip zlib zoran" ALSA_CARDS="hda-intel intel8x0" 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="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ru en" LIRC_DEVICES="avermedia avermedia98 pctv pixelview_bt878" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Mike Weissman 2008-08-26 15:15:51 UTC
Have you tried with Default CFLAGS?
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2008-08-26 18:24:26 UTC
Yes, those are horrible CFLAGS, but that's not the problem.
Comment 3 Rafał Mużyło 2008-08-26 20:39:01 UTC
Right, those flags are horrible, but this
is actually caused by kernel headers 2.6.26.
All of those flags have been renamed there.
I can't recall the numbers, but I've already seen
similar bugs wrt. different packages.
Comment 4 Donnie Berkholz (RETIRED) gentoo-dev 2008-08-29 00:03:01 UTC
http://bugs.gentoo.org/show_bug.cgi?id=235310#c6 has a suggested fix.
Comment 5 Rémi Cardona (RETIRED) gentoo-dev 2008-08-29 14:45:54 UTC
*** Bug 235575 has been marked as a duplicate of this bug. ***
Comment 6 Martin von Gagern 2008-09-09 16:51:35 UTC
Created attachment 165037 [details, diff]
Have vm86.h fall back to X86_EFLAGS_*

This is an adaptation of the fix mentioned in comment #4 to xorg-server. Thanks for the referene!

The fix uses X86_EFLAGS_IF and X86_EFLAGS_IOPL if IF_MASK and IOPL_MASK haven't been defined already. These EFLAGS come from /usr/include/asm/processor-flags.h which gets included from asm/vm86.h which gets included from sys/vm86.h which is already included in the vm86.h from xorg-server.

An alternative I mentioned in bug 236910 (which I consider a dup of this here) would be the constants X86_IF_MASK and X86_IOPL_MASK from the hw/xfree86/int10/xf86int10.h header file present in the xorg-server source tree.

Up to now, Upstream doesn't seem to have addressed this issue:
http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=tree;f=hw/kdrive/vesa
I couldn't find a bug report either. Is this issue due to some strange and nonstandard configuration of the installed linux headers, or would other distributions suffer similar issues and the problem should be taken upstream?
Comment 7 Donnie Berkholz (RETIRED) gentoo-dev 2008-09-09 18:23:38 UTC
*** Bug 236910 has been marked as a duplicate of this bug. ***
Comment 8 Martin von Gagern 2008-10-01 12:43:13 UTC
Still an issue with xorg-server-1.5.1. The attached patch still fixes it.
Please add it to the portage tree.
Comment 9 Martin von Gagern 2008-10-01 16:13:27 UTC
For reference, this seems to be the upstream kernel commit which removed the definitions from the vm86.h header file.
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6-stable.git;a=commitdiff;h=a5c15d419d4b68535222b51f9054dd08d5e67470
Message: "x86: replace most VM86 flags with flags from processor-flags.h"

From this I take it that
a) the issue is probably not Gentoo-specific
b) the attached fix matches the fix in the kernel sources quite well

I had a look at the package linux-libc-dev of Debian sid and Ubuntu intrepid. Debian still contains those flags, while Ubuntu has lost them. Therefore building kdrive-vesa on Ubuntu should expose this issue as well. The Debian based packages are configured with --disable-kdrive-vesa by default, so the issue doesn't show up for the official packages.
http://git.debian.org/?p=pkg-xorg/xserver/xorg-server.git;a=commitdiff;h=50ddaffe30920254835c7bfcc152a3f9860d1c2a

On the whole I think this is a bug to be addressed upstream as well. I'll file a bug report there, and post its URL here. But don't wait for upstream to include this fix in Gentoo.
Comment 10 Martin von Gagern 2008-10-01 17:31:32 UTC
(In reply to comment #9)
> On the whole I think this is a bug to be addressed upstream as well. I'll file
> a bug report there, and post its URL here.

Reported as http://bugs.freedesktop.org/show_bug.cgi?id=17858
Comment 11 Steev Klimaszewski (RETIRED) gentoo-dev 2008-10-01 23:58:43 UTC
Just like to throw in that the patch did indeed work here as well, on my x86 boxes, Thanks for the patch Martin, its nice to be able to use Xephyr again!
Comment 12 Rémi Cardona (RETIRED) gentoo-dev 2008-10-06 23:41:15 UTC
*** Bug 240328 has been marked as a duplicate of this bug. ***
Comment 13 Martin von Gagern 2008-10-15 08:27:22 UTC
Still an issue with x11-base/xorg-server-1.5.2, upstream bug still not fixed. xorg-server is quite a lengthy build, and having to compile it twice due to this issue can become rather annoying. Please add this patch to portage.
Comment 14 Ben de Groot (RETIRED) gentoo-dev 2008-10-15 16:29:21 UTC
I confirm this issue still exists in 1.5.2 and that the patch works fine. Could we please fix this annoying issue?
Comment 15 Zac Medico gentoo-dev 2008-10-18 23:50:45 UTC
*** Bug 242480 has been marked as a duplicate of this bug. ***
Comment 16 Jim Ramsay (lack) (RETIRED) gentoo-dev 2008-10-21 13:47:40 UTC
(In reply to comment #14)
> I confirm this issue still exists in 1.5.2 and that the patch works fine. Could
> we please fix this annoying issue?

Seconded.  Would any of the x11 team mind if one of us other devs did it?
Comment 17 Stephan Menzel 2008-10-23 18:17:20 UTC
This one is getting more annoying now because of this one:

http://bugs.gentoo.org/show_bug.cgi?id=199282

I had to mask xorg-server => 1.5.0 because of this bug and now I ended up not being able to build xorg because 1.4 and lower don't seem to have the 'nptl' USE flag which in turn is interfering with mesa. Weird.
Can anyone tell me how I apply this patch you provided during build?

Thanks!

Stephan
Comment 18 Martin von Gagern 2008-10-23 20:09:21 UTC
(In reply to comment #17)
> I had to mask xorg-server => 1.5.0 because of this bug

You really need kdrive? Otherwise "USE=-kdrive emerge xorg-server" is for you.

> Can anyone tell me how I apply this patch you provided during build?

As the Wiki is currently down, I give you a link to archived versions instead:
http://web.archive.org/web/*/http://gentoo-wiki.com/HOWTO_Create_an_Updated_Ebuild
Especially note the section "Adding a patch". For further support ask on IRC, as this bug report here is not the place for learning about portage.
Comment 19 Stephan Menzel 2008-10-25 19:36:44 UTC
That worked, thank you. I did indeed have the kdrive use flag but didn't actually know why. Disabling it solved this. However, I didn't see that hint in the bug here until you told me so maybe it would be a good idea to issue such a comment after the ebuild fails. Just in case.

Thanks a lot!

Stephan
Comment 20 Martin von Gagern 2008-10-25 20:50:40 UTC
(In reply to comment #19)
> maybe it would be a good idea to issue such a comment after the ebuild fails.

If someone were to actually modify the ebuild in the portage tree, I'd rather prefer him to include the fix than a comment about the error.

(In reply to comment #16)
> Seconded.  Would any of the x11 team mind if one of us other devs did it?

No complaints in 4+ days, please go ahead!
Comment 21 Rémi Cardona (RETIRED) gentoo-dev 2008-10-26 09:29:06 UTC
Done. And I've sent the patch upstream through the mailing list where I think it has a better chance of being seen/acked than through bugzilla.

Thanks
Comment 22 Rémi Cardona (RETIRED) gentoo-dev 2008-11-06 07:40:39 UTC
Quick follow up, Martin's patch was accepted into 1.5.3 and upstream devs agreed to kill Xvesa off completely from master.

Thanks
Comment 23 Jeroen Roovers (RETIRED) gentoo-dev 2009-01-23 23:52:37 UTC
*** Bug 256006 has been marked as a duplicate of this bug. ***
Comment 24 Jaak Ristioja 2009-03-19 18:04:20 UTC
To be strict - in Gentoo this bug IS STILL PRESENT in the stable x11-base/xorg-server-1.3.0.0-r6, just as mentioned in bug 256006. This bug was marked RESOLVED and even CLOSED last year, but I still got a compilation error this very day... Or is this a WONTFIX, DONTCARE?

I'm a bit frustrated by this. Until properly handled, the issue at hand might still anger even more users.
Comment 25 Stephan Menzel 2009-03-19 18:46:30 UTC
Well, I believe REOPEN would then be appropriate. Why didn't you?

Cheers,

Stephan
Comment 26 Jaak Ristioja 2009-03-19 19:22:21 UTC
(In reply to comment #25)
> Well, I believe REOPEN would then be appropriate. Why didn't you?
> 
> Cheers,
> 
> Stephan
> 

I would, if I could. But as this Bugzilla allows me only to choose "Leave as CLOSED FIXED" for this bug, I'm not left with much options.
Comment 27 Rémi Cardona (RETIRED) gentoo-dev 2009-03-19 19:48:48 UTC
Kdrive on 1.3 is broken. Either don't use it (USE=-kdrive) or upgrade to 1.5.3 which will go stable Very Soon (tm)

Thanks
Comment 28 Jaak Ristioja 2009-03-19 20:02:00 UTC
(In reply to comment #27)
> Kdrive on 1.3 is broken. Either don't use it (USE=-kdrive) or upgrade to 1.5.3
> which will go stable Very Soon (tm)
> 
> Thanks
> 

Then shouldn't that USE-flag be masked or something to prevent other users from running into the same problem again?
Comment 29 Mike Limansky 2009-03-20 09:42:21 UTC
Is it so difficult to fix version 1.3? As I see the fix is trivial. I subscribed bug 256006 for, but it was closed as duplicate. If USE kdrive is allowed for xorg-server-1.3 it shall works fine, regardless that the new xorg is comming soon.
Comment 30 Mike Limansky 2009-03-27 15:50:02 UTC
(In reply to comment #27)
> which will go stable Very Soon (tm)

Hi Remi, 

Could you clarify, if you have any estimations for stabilization date?

BR.
Comment 31 Rémi Cardona (RETIRED) gentoo-dev 2009-03-27 16:00:21 UTC
(In reply to comment #30)
> Could you clarify, if you have any estimations for stabilization date?

Basically, all that's left to do is to write an upgrade guide. Unfortunately, Real Life is keeping me away from doing this properly. I'm still aiming for stabilization before the end of March.

If anything, you should head over to the stabilization bug and follow the upgrade procedure. You'll get a head start on the stabilization process.

Thanks