Bug 31132 - attached patch required to build xserver v1.9.0 on Solaris 10 x86/sparc
Summary: attached patch required to build xserver v1.9.0 on Solaris 10 x86/sparc
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: All Solaris
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-26 08:03 UTC by Rajesh
Modified: 2018-03-10 08:03 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Rajesh 2010-10-26 08:03:45 UTC
[I am using gcc v4.3.3]

While building xserver v1.9.0 (with xproto v7.0.17) on Solaris 10 x86/sparc, I face below two issues:

Issue #1 (observed only on Solaris 10 x86):

<<<<>>>>
In file included from /usr/local/include/X11/Xarch.h:43,
                 from panoramiX.c:37:
/usr/include/sys/byteorder.h:60: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'in_port_t'
/usr/include/sys/byteorder.h:65: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'in_addr_t'
/usr/include/sys/byteorder.h:69: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'htonl'
/usr/include/sys/byteorder.h:70: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'htons'
/usr/include/sys/byteorder.h:71: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ntohl'
/usr/include/sys/byteorder.h:72: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ntohs'
<<<<>>>>

The below patch to Xext/panoramiX.c fixes the issue:

<<<<>>>
--- Xext/panoramiX.c~   Tue Oct 26 20:13:42 2010
+++ Xext/panoramiX.c    Tue Oct 26 20:13:53 2010
@@ -34,6 +34,7 @@
 #include <stdio.h>
 #include <X11/X.h>
 #include <X11/Xproto.h>
+#include <X11/Xos.h>
 #include <X11/Xarch.h>
 #include "misc.h"
 #include "cursor.h"
<<<<>>>

However, I am not sure if the above is the right place to fix. Probably, xproto is:

<<<<>>>>
--- xproto-7.0.17/Xarch.h~    20 Aug 2010 07:19:33
+++ xproto-7.0.17/Xarch.h     26 Oct 2010 14:47:55
@@ -40,6 +40,9 @@
 # else

 #  if defined(SVR4) || defined(__SVR4)
+#   if defined(__sun)
+#    include <sys/types.h>
+#   endif
 #   include <sys/byteorder.h>
 #  elif defined(CSRG_BASED)
 #   if defined(__NetBSD__) || defined(__OpenBSD__)
<<<<>>

Issue #2 (observed on both Solaris 10 x86/sparc):

<<<<>>>>
backtrace.c: In function 'xorg_backtrace_pstack':
. . . . . . . . . . . . . . . . .
backtrace.c:143: error: 'STDIN_FILENO' undeclared (first use in this function)
backtrace.c:143: error: (Each undeclared identifier is reported only once
backtrace.c:143: error: for each function it appears in.)
backtrace.c:144: error: 'STDOUT_FILENO' undeclared (first use in this function)
backtrace.c:146: error: 'STDERR_FILENO' undeclared (first use in this function)
. . . . . . . . . . . . . . . . .
backtrace.c:168: error: 'errno' undeclared (first use in this function)
backtrace.c:168: error: 'EINTR' undeclared (first use in this function)
backtrace.c:168: error: 'EAGAIN' undeclared (first use in this function)
<<<<>>>>

The below patch to os/backtrace.c fixes the issue:

<<<<<>>>>
--- os/backtrace.c~ 2010-06-06 06:47:02
+++ os/backtrace.c  2010-10-26 19:46:01
@@ -122,6 +122,10 @@
 # endif /* HAVE_WALKCONTEXT */

 # ifdef HAVE_PSTACK
+
+#include <unistd.h>
+#include <errno.h>
+
 static int xorg_backtrace_pstack(void) {
     pid_t kidpid;
     int pipefd[2];
<<<<<>>>>

Thanks.  Rajesh
Comment 1 Alan Coopersmith 2018-03-10 08:03:45 UTC
Looks like I failed to close this when I pushed the fix to git:
https://cgit.freedesktop.org/xorg/proto/x11proto/commit/Xarch.h?id=fe7b269fd329201fdbffa12ce7724287c10a3abf


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.