[Xorg] Crosscompile for Solaris
Peter Astrand
peter at cendio.se
Mon Jun 28 07:19:53 PDT 2004
On Mon, 28 Jun 2004, Alexander Gottwald 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.
It doesn't work for me without those. If I don't have those, cross.def is
not parsed at all (I've tested this by inserting a #error line).
> > /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
Thanks.
> You could add
> #define BuildClients NO
> #define BuildFonts NO
> #define BuildDocs NO
> #define BuildServers YES
>
> to host.def
I have now been able to produce a Xvfb binary. Some additional problems:
1) The build of "Xsun" failed, with:
sunCfb.c:311:24: sys/cg2reg.h: No such file or directory
What's the easiest way of disabling the build of Xsun?
2) Xvfb wanted to link with "-lfreetype". This failed, because no
"libfreetype.so" existed in the exports/lib directory. This was solved by
a symlink:
ln -s libfreetype.so.9.0 libfreetype.so
3) I needed to manually make Xvfb link with "-lnsl -lsocket". I wonder why
the definition of ExtraLibraries from sun.cf was not used.
Now I just have to figure out how to link libfreetype statically...
--
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