[Xorg] Crosscompile for Solaris
Alexander Gottwald
alexander.gottwald at s1999.tu-chemnitz.de
Mon Jun 28 06:17:58 PDT 2004
On Mon, 28 Jun 2004, Peter Astrand wrote:
>
> 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>
The last two are not required (afaik). Setting CROSSCOMPILEDIR does include
cross.def and sets CrossCompiling too.
> 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
I'm doing crosscompile for cygwin on linux and I've no problems. But I've adjusted
some files in config/imake and config/makedepend to workaround some problems.
> 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.
I've noticed this too. Just write all make output to a file and grep for "***"
make World CROSSCOMPILEDIR=... 2>&1 | tee makelog
and in another xterm I wathc the logfile and search for "***" (regex \*\*\*) and
try to fix the 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
You don't have fontconfig (cross version) installed. Add this to your host.def:
#define HasFontconfig NO
#define HasExpat NO
#define HasMotif NO
#define HasMotif2 NO
maybe there are some other libraries which are not present as crosscompile versions
which have to be added to. make World will then compile a local fontconfig and expat
library and discard everything that requires motif.
> I'm only interested in building Xvfb, so it doesn't matter if programs
> such as "xterm" fails to build, though.
You could add
#define BuildClients NO
#define BuildFonts NO
#define BuildDocs NO
#define BuildServers YES
to host.def
bye
ago
--
Alexander.Gottwald at s1999.tu-chemnitz.de
http://www.gotti.org ICQ: 126018723
More information about the xorg
mailing list