Source: vnc4
Severity: normal
Tags: patch
User: debian-powe...@lists.debian.org

Dear Maintainer,

The package vnc4 fails to build from source on ppc64el, as seen at:
https://buildd.debian.org/status/fetch.php?pkg=vnc4&arch=ppc64el&ver=4.1.1%2BX4.3.0-37.1&stamp=1410498358

The first error is due to gcc macro 'pixel' which it tries to replace along the 
code and breaks the build.
Unsetting that (#undef pixel) fixes it.

After that, the build breaks due to incorrect endianess definition. The package 
straight assumes that powerpc is
big endian. As file Imake.tmpl states that it cannot be modified, all I did was 
add a verification and definition
in Imake.cf file. Since compilation flags and parameters should be mostly the 
same for powerpc64 (already defined
in a previously created patch), not much modification was needed.

The patch is attached.

Please let me know your comments.
Thanks and regards.

Fernando.


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: ppc64el (ppc64le)

Kernel: Linux 3.16-trunk-powerpc64le (SMP w/32 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Description: Powerpc64 also has support for little endian (ppc64el), but that
 was not being considered.
This was the way I could figure out so ppc64el is taken into account without
having to change Imake.tmpl file. Additionally the gcc macro pixel was getting in 
the way of the compilation, breaking the build.
Author: Fernando Seiti Furusato <ferse...@br.ibm.com>

Index: vnc4-4.1.1+X4.3.0/unix/xc/config/cf/Imake.cf
===================================================================
--- vnc4-4.1.1+X4.3.0.orig/unix/xc/config/cf/Imake.cf
+++ vnc4-4.1.1+X4.3.0/unix/xc/config/cf/Imake.cf
@@ -19,6 +19,11 @@ XCOMM $Xorg: Imake.cf,v 1.4 2000/08/17 1
  */
 XCOMM $XFree86: xc/config/cf/Imake.cf,v 3.81 2003/02/18 16:51:45 tsi Exp $
 
+#if defined(__PPC64__) && defined(__LITTLE_ENDIAN__)
+# undef pixel
+# define ByteOrder               X_LITTLE_ENDIAN
+#endif
+
 #if defined(__APPLE__)
 # undef __APPLE__
 # define MacroIncludeFile <darwin.cf>

Reply via email to