Bug 92351

Summary: FTBFS on m68k
Product: xorg Reporter: Laurent Bigonville <bigon>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED MOVED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: glaubitz
Version: 7.7 (2012.06)Keywords: patch
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Laurent Bigonville 2015-10-08 19:37:03 UTC
Hi,

On debian m68k, the server FTBFS with the following error:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../../hw/xfree86/int10 -I../../../include -I../../../../hw/xfree86 -I../../../../hw/xfree86/include -I../../../../hw/xfree86/common -I../../../../hw/xfree86/os-support -I../../../../hw/xfree86/os-support/bus -I../../../../os -I../../../../hw/xfree86/int10/../x86emu -D_FORTIFY_SOURCE=2 -DPRE_RELEASE=0 -D_X86EMU -DNO_SYS_HEADERS -DHAVE_XORG_CONFIG_H -fvisibility=hidden -I/usr/include/libdrm -DHAVE_DIX_CONFIG_H -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wlogical-op -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing -fno-strict-aliasing -D_DEFAULT_SOURCE -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/usr/include/libdrm -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/X11/dri -I../../../../include -I../../../include -I../../../../Xext -I../../../../composite -I../../../../damageext -I../../../../xfixes -I../../../../Xi -I../../../../mi -I../../../../miext/sync -I../../../../miext/shadow -I../../../../miext/damage -I../../../../render -I../../../../randr -I../../../../fb -I../../../../dbe -I../../../../present -fvisibility=hidden -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -MT xf86x86emu.lo -MD -MP -MF .deps/xf86x86emu.Tpo -c ../../../../hw/xfree86/int10/xf86x86emu.c  -fPIC -DPIC -o .libs/xf86x86emu.o
In file included from ../../../../hw/xfree86/int10/../x86emu/x86emu.h:54:0,
                 from ../../../../hw/xfree86/int10/xf86x86emu.c:10:
../../../../hw/xfree86/int10/../x86emu/x86emu/regs.h:161:18: error: expected ',' or '}' before '.' token
 #define R_SP  spc.SP.I16_reg.x_reg

There are also some warnings before this error


See: https://buildd.debian.org/status/fetch.php?pkg=xorg-server&arch=m68k&ver=2%3A1.17.2-3&stamp=1444325621
Comment 1 John Paul Adrian Glaubitz 2016-02-13 15:40:52 UTC
Hello!

Thorsten Glaser has already suggested a patch to fix this issue in his Debian bug report [1]:

--- ../../../../hw/xfree86/x86emu/x86emu/regs.h~	2013-11-11 22:52:33.000000000 +0000
+++ ../../../../hw/xfree86/x86emu/x86emu/regs.h	2013-11-11 22:55:55.000000000 +0000
@@ -39,6 +39,9 @@
 #ifndef __X86EMU_REGS_H
 #define __X86EMU_REGS_H
 
+/* we sometimes clash with system headers, so pull them in here */
+#include <signal.h>
+
 /*---------------------- Macros and type definitions ----------------------*/
 
 #ifdef PACK
@@ -117,6 +120,14 @@
 };
 
 /* 8 bit registers */
+#undef R_AH
+#undef R_AL
+#undef R_BH
+#undef R_BL
+#undef R_CH
+#undef R_CL
+#undef R_DH
+#undef R_DL
 #define R_AH  gen.A.I8_reg.h_reg
 #define R_AL  gen.A.I8_reg.l_reg
 #define R_BH  gen.B.I8_reg.h_reg
@@ -127,18 +138,32 @@
 #define R_DL  gen.D.I8_reg.l_reg
 
 /* 16 bit registers */
+#undef R_AX
+#undef R_BX
+#undef R_CX
+#undef R_DX
 #define R_AX  gen.A.I16_reg.x_reg
 #define R_BX  gen.B.I16_reg.x_reg
 #define R_CX  gen.C.I16_reg.x_reg
 #define R_DX  gen.D.I16_reg.x_reg
 
 /* 32 bit extended registers */
+#undef R_EAX
+#undef R_EBX
+#undef R_ECX
+#undef R_EDX
 #define R_EAX  gen.A.I32_reg.e_reg
 #define R_EBX  gen.B.I32_reg.e_reg
 #define R_ECX  gen.C.I32_reg.e_reg
 #define R_EDX  gen.D.I32_reg.e_reg
 
 /* special registers */
+#undef R_SP
+#undef R_BP
+#undef R_SI
+#undef R_DI
+#undef R_IP
+#undef R_FLG
 #define R_SP  spc.SP.I16_reg.x_reg
 #define R_BP  spc.BP.I16_reg.x_reg
 #define R_SI  spc.SI.I16_reg.x_reg
@@ -147,14 +172,12 @@
 #define R_FLG spc.FLAGS
 
 /* special registers */
-#define R_SP  spc.SP.I16_reg.x_reg
-#define R_BP  spc.BP.I16_reg.x_reg
-#define R_SI  spc.SI.I16_reg.x_reg
-#define R_DI  spc.DI.I16_reg.x_reg
-#define R_IP  spc.IP.I16_reg.x_reg
-#define R_FLG spc.FLAGS
-
-/* special registers */
+#undef R_ESP
+#undef R_EBP
+#undef R_ESI
+#undef R_EDI
+#undef R_EIP
+#undef R_EFLG
 #define R_ESP  spc.SP.I32_reg.e_reg
 #define R_EBP  spc.BP.I32_reg.e_reg
 #define R_ESI  spc.SI.I32_reg.e_reg
@@ -163,6 +186,12 @@
 #define R_EFLG spc.FLAGS
 
 /* segment registers */
+#undef R_CS
+#undef R_DS
+#undef R_SS
+#undef R_ES
+#undef R_FS
+#undef R_GS
 #define R_CS  seg.CS
 #define R_DS  seg.DS
 #define R_SS  seg.SS

Thus, a rather trivial fix. It would be great if someone could address this issue as it currently prevents us from building xorg-xserver on m68k which - in return - keeps many other packages from building on m68k.

And, yes, X.Org does actually work on real m68k hardware [2] :-).

Adrian

> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=729337
> [2] https://twitter.com/Atari_MegaSTe/status/556583277793132544
Comment 2 GitLab Migration User 2018-12-13 22:33:42 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/484.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.