Re: Xvnc working?
On 04-Nov-07 10:27, Harald Dunkel wrote:
> If I try to rebuild Xvnc4 via 'apt-get source --compile vnc4',
> then I still get the problem with the max cpp macro. So how
> was the "official" vnc4server deb built? Is this a gcc-3.3.x
> binary?
I compiled vnc4 with the attached patch and uploaded the package
to the gcc-3.4 archive. However, the upload of the patched sources
failed for some reason. This is why 'apt-get source' still gets
the unpatched package.
Regards
Andreas Jochens
diff -urN ../tmp-orig/vnc4-4.0/debian/buildX.sh ./debian/buildX.sh
--- ../tmp-orig/vnc4-4.0/debian/buildX.sh 2004-11-07 07:49:21.089760528 +0000
+++ ./debian/buildX.sh 2004-11-07 07:31:30.221557240 +0000
@@ -17,7 +17,8 @@
echo "*** Unpacking X source"
tar xfz ../xsrc/X420src-1.tgz
echo "*** Patching X source"
patch -Np0 < ../xc.patch
+ patch -Np0 < ../xc.amd64.patch
patch -p1 < ../xsrc/xccompilefix.patch
patch -p1 < ../xsrc/vncsofpicfix.patch
else
diff -urN ../tmp-orig/vnc4-4.0/rfb/Region.h ./rfb/Region.h
--- ../tmp-orig/vnc4-4.0/rfb/Region.h 2004-06-11 15:13:52.000000000 +0000
+++ ./rfb/Region.h 2004-11-06 20:52:51.000000000 +0000
@@ -21,8 +21,9 @@
#ifndef __RFB_REGION_INCLUDED__
#define __RFB_REGION_INCLUDED__
#include <rfb/Rect.h>
+#undef max
#include <vector>
struct _XRegion;
diff -urN ../tmp-orig/vnc4-4.0/xc.amd64.patch ./xc.amd64.patch
--- ../tmp-orig/vnc4-4.0/xc.amd64.patch 1970-01-01 00:00:00.000000000 +0000
+++ ./xc.amd64.patch 2004-11-07 07:40:15.042772288 +0000
@@ -0,0 +1,129 @@
+diff -urN tmp/config/cf/Imake.cf xc/config/cf/Imake.cf
+--- tmp/config/cf/Imake.cf 2001-11-16 16:47:50.000000000 +0000
++++ xc/config/cf/Imake.cf 2004-11-06 22:15:52.408675152 +0000
+@@ -750,6 +750,16 @@
+ # endif
+ # undef __sparc__
+ # endif
++# ifdef x86_64
++# define x86_64Architecture
++# undef x86_64
++# endif
++# ifdef __x86_64__
++# ifndef x86_64Architecture
++# define x86_64Architecture
++# endif
++# undef __x86_64__
++# endif
+ # ifdef ia64
+ # define ia64Architecture
+ # undef ia64
+diff -urN tmp/config/cf/linux.cf xc/config/cf/linux.cf
+--- tmp/config/cf/linux.cf 2002-01-15 21:22:31.000000000 +0000
++++ xc/config/cf/linux.cf 2004-11-06 22:17:28.212110816 +0000
+@@ -275,7 +275,7 @@
+ /* The DRM module requires kernel services that appeared in late 2.1.x
+ kernels and are known to be present in 2.2.x kernels. */
+ #ifndef BuildXF86DRI
+-# if defined(i386Architecture) || defined(ia64Architecture)
++# if defined(i386Architecture) || defined(x86_64Architecture) || defined(ia64Architecture)
+ # if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 2)
+ # define BuildXF86DRI YES
+ # else
+@@ -312,7 +312,7 @@
+ kernel revisions. So, we'll only build the module for kernels that are
+ known to be supported by the module. */
+ #ifndef BuildXF86DRM
+-# if defined(i386Architecture) || defined(ia64Architecture) || defined(SparcArchitecture) || defined(AlphaArchitecture)
++# if defined(i386Architecture) || defined(x86_64Architecture) || defined(ia64Architecture) || defined(SparcArchitecture) || defined(AlphaArchitecture)
+ # if OSMajorVersion == 2
+ /* Only tested for Linux 2.2.0 through 2.2.12 */
+ # if OSMinorVersion == 2 && OSTeenyVersion <= 12
+@@ -336,7 +336,7 @@
+ #endif
+
+ #ifndef HasAgpGart
+-# if defined(i386Architecture) || defined(ia64Architecture)
++# if defined(i386Architecture) || defined(x86_64Architecture) || defined(ia64Architecture)
+ /* The AGPGART header file is included in os-support/linux, which
+ allows all drivers that depend on AGP to build properly. */
+ # define HasAgpGart YES
+@@ -539,6 +539,13 @@
+ # define LdCmd ld
+ # define AsmDefines -DUSE_GAS -U__ELF__
+ # endif /* HPArchitecture */
++# ifdef x86_64Architecture
++# define CcCmd gcc
++# define CplusplusCmd g++
++# define AsCmd as
++# define LdCmd ld
++# define AsmDefines -DUSE_GAS -U__ELF__
++# endif /* x86_64Architecture */
+ # ifdef ia64Architecture
+ # define CcCmd gcc
+ # define CplusplusCmd g++
+@@ -570,6 +577,13 @@
+ # define AsmDefines -D__ELF__
+ # define CplusplusCmd c++ -b alpha-linux
+ # endif /* AlphaArchitecture */
++# ifdef x86_64Architecture
++# define CcCmd gcc
++# define CplusplusCmd g++
++# define AsCmd as
++# define LdCmd ld
++# define AsmDefines -D__ELF__
++# endif /* x86_64Architecture */
+ # ifdef ia64Architecture
+ # define CcCmd gcc
+ # define CplusplusCmd g++
+@@ -693,6 +707,15 @@
+ # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
+ #endif /* Arm32Achitecture */
+
++#ifdef x86_64Architecture
++# ifndef OptimizedCDebugFlags
++# define OptimizedCDebugFlags -O2
++# endif
++# define LinuxMachineDefines -D__x86_64__
++# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
++# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
++#endif /* x86_64Architecture */
++
+ #ifdef ia64Architecture
+ # ifndef OptimizedCDebugFlags
+ # define OptimizedCDebugFlags -O2
+diff -urN tmp/programs/Xserver/include/servermd.h xc/programs/Xserver/include/servermd.h
+--- tmp/programs/Xserver/include/servermd.h 2001-12-14 19:59:56.000000000 +0000
++++ xc/programs/Xserver/include/servermd.h 2004-11-06 22:18:55.963770536 +0000
+@@ -382,7 +382,7 @@
+ #endif /* linux/s390x */
+
+
+-#if defined(__ia64__) || defined(ia64)
++#if defined(__ia64__) || defined(ia64) || defined(__x86_64__) || defined(x86_64)
+ # define IMAGE_BYTE_ORDER LSBFirst
+
+ # if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO)
+diff -urN tmp/programs/Xserver/fb/fb.h xc/programs/Xserver/fb/fb.h
+--- tmp/programs/Xserver/fb/fb.h 2001-10-28 03:33:08.000000000 +0000
++++ xc/programs/Xserver/fb/fb.h 2004-11-07 07:29:09.262986200 +0000
+@@ -50,7 +50,11 @@
+ */
+
+ #ifndef FB_SHIFT
++#if defined(__x86_64__) || defined(__ia64__)
++#define FB_SHIFT 6
++#else
+ #define FB_SHIFT LOG2_BITMAP_PAD
++#endif
+ #endif
+
+ #if FB_SHIFT < LOG2_BITMAP_PAD
+@@ -103,6 +107,7 @@
+ # else
+ # if defined(__alpha__) || defined(__alpha) || \
+ defined(ia64) || defined(__ia64__) || \
++ defined(__x86_64__) || \
+ defined(__sparc64__) || \
+ defined(__s390x__)
+ typedef unsigned long FbBits;
Reply to: