[Xorg] Crosscompile for Solaris

Peter Astrand peter at cendio.se
Mon Jun 28 05:59:39 PDT 2004


I'm trying to crosscompile X.org: Running the GNU toolchain on Linux,
producing code for Solaris. This is what I've tried:

1. Checked out xorg code from CVS, tagged with XORG-6_7_0. 


2. Put this in config/cf/host.def:

#define HasFontconfig           NO
#define HasGcc3 		YES
#define CrossCompiling          YES
#include <cross.def>


3. Changed config/cf/cross.def to:

#undef i386Architecture
#define SparcArchitecture
#undef BootstrapCFlags
#define BootstrapCFlags -Dsun -Dsparc -DSVR4 -D__SVR4 -D__EXTENSIONS__
#undef StandardDefines
#define StandardDefines -Dsun -Dsparc -DSVR4 -D__SVR4 -D__EXTENSIONS__
#define LdCmd gcc -nostdlib
#define SharedLibraryLoadFlags -shared
#define XFree86ServerDefines    -DGCCUSESGAS
#define StdIncDir /usr/local/cross-solaris/sysroot/usr/include
#define PostIncDir /usr/local/cross-solaris/lib/gcc/sparc-sun-solaris2.8/3.4.0/include
#undef LdPostLib
#define LdPostLib -L/usr/local/cross-solaris/lib/
#include <cross.rules>

The CFLAGS lines has been invented pretty much by trial-and-error. 


4. Building with:

make World CROSSCOMPILEDIR=/usr/local/cross-solaris/sparc-sun-solaris2.8/bin


It doesn't work. I have several problems:

a) imake segfaults in get_sun_compiler_versions. I've fixed this by making 
get_sun_compiler_versions a dummy no-op. 

b) The compilation of some components fails, but the build process does 
not stop. Is this normal? It makes it harder to track down errors. 

c) I'm getting all kinds of errors. Here's one example, when compiling 
xterm:

/usr/local/cross-solaris/sparc-sun-solaris2.8/bin/`echo gcc|sed "s%.*/%%"` 
-O2    -I. -I../../exports/include -I../../exports/include 
-I../../exports/include/freetype2 -I../../exports/include/freetype2/config 
-I../../exports/include/X11  -I../.. -I../../exports/include   -Dsun 
-Dsparc -DSVR4 -D__SVR4 -D__EXTENSIONS__        -DSCROLLBAR_RIGHT 
-DOPT_WIDE_CHARS -DOPT_LUIT_PROG -DXRENDERFONT -DXFREE86_FT2 
-DPROJECTROOT=/usr/X11R6  -DXVERSION='"4.3.99.3"'   -DXVENDORNAME='"The 
X.Org Foundation"' -DXVENDORNAMESHORT='"X.Org"'   -c -o resize.o resize.c
In file included from ./ptyx.h:77,
                 from ./xterm.h:237,
                 from resize.c:61:
../../exports/include/X11/Xft/Xft.h:43:35: fontconfig/fontconfig.h: No 
such file or directory
In file included from ../../exports/include/X11/Xft/Xft.h:50,
                 from ./ptyx.h:77,
                 from ./xterm.h:237,
                 from resize.c:61:
../../exports/include/X11/Xft/XftCompat.h:33: error: parse error before 
"XftChar8"



I'm only interested in building Xvfb, so it doesn't matter if programs 
such as "xterm" fails to build, though. 


What am I doing wrong here? Has anyone succeeded with crosscompiling
X.org/XF86 for Solaris? Any ideas?

-- 
Peter Åstrand		Chief Developer
Cendio			www.thinlinc.com
Teknikringen 3		www.cendio.se
583 30 Linköping        Phone: +46-13-21 46 00







More information about the xorg mailing list