Xorg-server faild to compile
Steps to Reproduce:
1. emerge xorg-server
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: *** [vm86.o] Error 1
make: *** Waiting for unfinished jobs....
mv -f .deps/vesa.Tpo .deps/vesa.Po
make: Leaving directory `/var/tmp/portage/x11-base/xorg-server-1.4.2/work/xorg-server-1.4.2/hw/kdrive/vesa'
make: *** [all-recursive] Error 1
make: Leaving directory `/var/tmp/portage/x11-base/xorg-server-1.4.2/work/xorg-server-1.4.2/hw/kdrive'
make: *** [all-recursive] Error 1
make: 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
dev-java/java-config: 1.3.7, 2.1.6-r1
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
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -funroll-all-loops -fpeel-loops -funswitch-loops -funit-at-a-time -ftracer -ffast-math"
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"
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/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Have you tried with Default CFLAGS?
Yes, those are horrible CFLAGS, but that's not the problem.
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.
http://bugs.gentoo.org/show_bug.cgi?id=235310#c6 has a suggested fix.
*** Bug 235575 has been marked as a duplicate of this bug. ***
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:
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?
*** Bug 236910 has been marked as a duplicate of this bug. ***
Still an issue with xorg-server-1.5.1. The attached patch still fixes it.
Please add it to the portage tree.
For reference, this seems to be the upstream kernel commit which removed the definitions from the vm86.h header file.
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.
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.
(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
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!
*** Bug 240328 has been marked as a duplicate of this bug. ***
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.
I confirm this issue still exists in 1.5.2 and that the patch works fine. Could we please fix this annoying issue?
*** Bug 242480 has been marked as a duplicate of this bug. ***
(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?
This one is getting more annoying now because of this one:
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?
(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:
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.
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!
(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!
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.
Quick follow up, Martin's patch was accepted into 1.5.3 and upstream devs agreed to kill Xvesa off completely from master.
*** Bug 256006 has been marked as a duplicate of this bug. ***
To be strict - in Gentoo this bug IS STILL PRESENT in the stable x11-base/xorg-server-126.96.36.199-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.
Well, I believe REOPEN would then be appropriate. Why didn't you?
(In reply to comment #25)
> Well, I believe REOPEN would then be appropriate. Why didn't you?
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.
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)
(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)
Then shouldn't that USE-flag be masked or something to prevent other users from running into the same problem again?
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.
(In reply to comment #27)
> which will go stable Very Soon (tm)
Could you clarify, if you have any estimations for stabilization date?
(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.