Re: Xfree86 4.2
I failed to compile X 4.2/4.1 multiple times too. I have a slow PC and
compilation requires 2-3 hours (PIII-800). Nevertheless hurd seems to be to
unstable, it crashs very often and I have to start from beginning. (I moved
parts of the tree to another partition and linked everything to the new dirs,
so there's no problem with the filesystem limit).
That's why I tried to crosscompile using Debian Woody/Linux:
I installed the following packages:
binutils-multiarch
gcc-i386-gnu 1.7-9 (from testing)
contains crosscompiler tools i386-gnu-{c++,gcc,ld,...}
dpkg-cross (not usefull for crosscompiling X, but maybe for other packages)
I mount my hurd partition in /gnu (important for gcc-i386-gnu) and
copy 998_crosscompile.diff into debian/patches (after
dpkg-source -x xfree86_4.1.0-16.dsc)
xc/config/cf/gnucross.cf is a patched version of gnu.cf I use for
crosscompiling.
Now I start
dpkg-buildpackage -us -uc -b -rfakeroot
This uses the local compiler to create the imake and ccimake binaries.
But this fails too after approx. 30 minutes.
The last error I get is
GetDflt.c:126: too few arguments to function `getpwnam_r'
GetDflt.c:128: too few arguments to function `getpwuid_r'
I get many warnings, such as
../../../exports/bin/bdftopcf: file not found
because X isn't well prepared for crosscompiling (i386-gnu-gcc was used to
compile bdftopcf, not gcc).
I tried not X 4.2 because the debian source package is toooooo large
to download. Maybe I will try the official X source code, instead of debian's
one, I hope the patches apply cleanly.
I hope this report is usefull for others, who want to crosscompile X.
If you have patches don't hesitate to send me your patches.
Regards,
Jens
--- /dev/null Tue Jan 14 00:27:40 2003
+++ xc/config/cf/gnucross.cf Tue Feb 4 00:49:21 2003
@@ -0,0 +1,238 @@
+XCOMM platform: $XFree86: xc/config/cf/gnucross.cf,v 1.10 2000/11/30 23:29:55 dawes Exp $
+
+#ifndef OSName
+#define OSName DefaultOSName
+#endif
+
+#ifndef OSVendor
+#define OSVendor /**/
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
+
+#define HasPam YES
+#define PamLibraries -lpam -rdynamic -ldl
+#define XFree86Devel YES
+#define SystemManDirectory /usr/share/man
+#define HasTk YES
+#define TkLibDir /gnu/usr/lib
+#define TkIncDir /gnu/usr/include
+#define TkLibName tk8.3
+#define XF86SetupUsesStaticTk NO
+#define HasTcl YES
+#define TclLibDir /gnu/usr/lib
+#define TclIncDir /gnu/usr/include
+#define TclLibName tcl8.3
+#define XF86SetupUsesStaticTcl NO
+#define InstallXinitConfig YES
+#define InstallXdmConfig YES
+#define InstallFSConfig YES
+#define HasXdmAuth YES
+#define DebuggableLibraries YES
+#define ForceNormalLib YES
+#define BuildSpecsDocs YES
+#define SpecsDocDirs CTEXT GL ICCCM X11 Xext Xv i18n xterm
+#define BuildAllSpecsDocs YES
+#define HasLatex YES
+/* we build-depend on libfreetype6-dev (FreeType 2.x) */
+#define BuildFreetype2Library NO
+#define HasFreetype2 YES
+#define Freetype2Dir /gnu/usr
+#define XAppLoadDir EtcX11Directory/app-defaults
+#define XFileSearchPathDefault Concat4(EtcX11Directory/%L/%T/%N%C,%S:EtcX11Directory/%l/%T/%N%C,%S:EtcX11Directory/%T/%N%C,%S:EtcX11Directory/%L/%T/%N%S:EtcX11Directory/%l/%T/%N%S:EtcX11Directory/%T/%N%S):Concat4($(LIBDIR)/%L/%T/%N%C,%S:$(LIBDIR)/%l/%T/%N%C,%S:$(LIBDIR)/%T/%N%C,%S:$(LIBDIR)/%L/%T/%N%S:$(LIBDIR)/%l/%T/%N%S:$(LIBDIR)/%T/%N%S)
+/* the relative symlink created by this rule causes problems for us */
+#if InstallAppDefFiles
+#define InstallAppDefaultsLong(file,class) @@\
+InstallNamedTarget(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
+#else
+#define InstallAppDefaultsLong(file,class) @@\
+InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
+#endif /* InstallAppDefFiles */
+#define BuilderEMailAddr "submit@bugs.debian.org"
+#define SharedLibXdmGreet NO
+#define LinkGLToUsrInclude NO
+#define LinkGLToUsrLib NO
+#define SharedLibFont NO
+#define HasZlib YES
+#define SharedLibGlu YES
+#define NormalLibGlu YES
+#define BuildRman NO
+#define BuildHtmlManPages NO
+#define FSUseSyslog YES
+#ifndef HasKatmaiSupport
+#define HasKatmaiSupport NO
+#endif
+
+#define GNUSourceDefines -D_POSIX_C_SOURCE=199309L \
+ -D_POSIX_SOURCE -D_XOPEN_SOURCE \
+ -D_BSD_SOURCE -D_SVID_SOURCE
+
+XCOMM XXXMB: What about _GNU_SOURCE, see Linux/UseInstalled?
+
+#define XawI18nDefines -DHAS_WCHAR_H -DHAS_WCTYPE_H -DNO_WIDEC_H
+
+XCOMM Enable this when we have pthreads.
+XCOMM #define HasPosixThreads YES
+XCOMM #define ThreadedX YES
+XCOMM #define HasThreadSafeAPI YES
+XCOMM #define ThreadsLibraries -lpthread
+XCOMM #define SystemMTDefines -D_REENTRANT
+
+#define ThreadsLibraries -lthreads
+XCOMM #define LocalThreads NO
+#define HasCThreads YES
+
+#ifndef HasLibCrypt
+#define HasLibCrypt YES
+#endif
+
+#ifndef BuildXF86RushExt
+# define BuildXF86RushExt YES
+#endif
+
+#define BuildLibPathVar LD_LIBRARY_PATH
+#define GccUsesGas YES
+#define UseGas YES
+#define GnuCpp YES
+#define HasDlopen YES
+#ifndef HasShadowPasswd
+# define HasShadowPasswd YES
+#endif
+#define HasPutenv YES
+
+XCOMM Not implemented and will always fail.
+#define HasShm YES
+
+#define HasBSD44Sockets YES
+#define HasSockets YES
+#define HasSnprintf YES
+#define HasMkstemp YES
+#define HasUsableFileMmap YES
+#ifndef HasNCurses
+#define HasNCurses YES
+#endif
+
+#define AvoidNullMakeCommand YES
+#ifndef DebuggableLibraries
+#define DebuggableLibraries NO
+#endif
+#define CompressAllFonts YES
+#define Malloc0ReturnsNull YES
+#define NeedConstPrototypes YES
+#define NeedFunctionPrototypes YES
+#define NeedNestedPrototypes YES
+#define NeedVarargsPrototypes YES
+#ifndef NeedWidePrototypes
+#define NeedWidePrototypes NO
+#endif
+#define SetTtyGroup YES
+
+#ifndef UseStaticTermcapLib
+#define UseStaticTermcapLib NO
+#endif
+
+#define MkdirHierCmd mkdir -p
+
+#define AsmDefines -D__ELF__
+#define CplusplusCmd /usr/bin/i386-gnu-c++
+#ifndef TermcapLibrary
+#if UseStaticTermcapLib
+#define TermcapLibrary StaticLibrary(/gnu/usr/lib,ncurses)
+#else
+#define TermcapLibrary -lncurses
+#endif
+#endif
+#ifndef DoLoadableServer
+#define DoLoadableServer YES
+#endif
+#define CcCmd /usr/bin/i386-gnu-gcc
+#define CplusplusCmd /usr/bin/i386-gnu-c++
+#define AsCmd /usr/bin/i386-gnu-as
+#define LdCmd /usr/bin/i386-gnu-ld
+#define RanlibCmd /usr/bin/i386-gnu-ranlib
+#define LdPreLib -L/usr/i386-gnu/lib
+#define YaccCmd bison -y
+#define LexCmd flex -l
+#define HasFlex YES
+#define LexLib -lfl
+#define PreProcessCmd CcCmd -E
+#define StdIncDir /usr/i386-gnu/include
+#define PostIncDir DefaultGccIncludeDir
+#define LdCombineFlags -r
+#ifndef LdPostLib
+#define LdPostLib /* Never needed */
+#endif
+#define HasWChar32 YES
+#define StandardCppOptions -traditional
+#define StandardCppDefines StandardDefines
+
+#define HasVarRun YES
+#define VarDbDirectory $(VARDIR)/lib
+
+XCOMM i386Architecture
+#define OptimizedCDebugFlags DefaultGcc2i386Opt
+#define GNUMachineDefines -D__i386__
+#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
+#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
+#define HasPlugin YES
+#define VendorHasX11R6_3libXext YES
+
+#ifndef StandardDefines
+#define StandardDefines -D__GNU__ GNUMachineDefines GNUSourceDefines
+#endif
+
+#define DlLibrary -rdynamic -ldl
+
+#define ServerExtraSysLibs /**/
+
+#define ConnectionFlags -DUNIXCONN -DTCPCONN
+
+/* Some of these man page defaults are overriden in the above OS sections */
+#ifndef ManSuffix
+# define ManSuffix 1x
+#endif
+#ifndef ManDir
+# define ManDir $(MANSOURCEPATH)1
+#endif
+#ifndef LibManSuffix
+# define LibManSuffix 3x
+#endif
+#ifndef LibmanDir
+# define LibmanDir $(MANSOURCEPATH)3
+#endif
+#ifndef FileManSuffix
+# define FileManSuffix 5x
+#endif
+#ifndef FileManDir
+# define FileManDir $(MANSOURCEPATH)5
+#endif
+
+#ifndef StaticLibrary
+#define StaticLibrary(libpath,libname) -Wl,-Bstatic Concat(-L,libpath) Concat(-l,libname) -Wl,-Bdynamic
+#endif
+
+#define HasGnuMake YES
+
+#define MakeNamedTargetSubdir(dir,flags,subname)\
+ $(MAKE) -C dir $(MFLAGS) $(PARALLELMFLAGS) flags subname
+
+#define ArchitectureDefines -DGNU_ARCHITECTURE
+
+#define XserverNeedsSetUID YES
+
+#include <gnuLib.rules>
+
+XCOMM XXX Might need this if they are not careful with slashes.
+XCOMM #define DirFailPrefix -
+
+#include <xfree86.cf>
+#define CrossCompiling YES
+#include <cross.rules>
--- xc/config/cf/Imake.cf.orig Tue Feb 4 01:43:56 2003
+++ xc/config/cf/Imake.cf Tue Feb 4 01:45:55 2003
@@ -600,7 +600,7 @@
# define Win32Architecture
#endif /* WIN32 */
-#ifdef linux
+#ifdef linux_not_used
# define MacroIncludeFile <linux.cf>
# define MacroFile linux.cf
# undef linux
@@ -848,6 +848,17 @@
#define MinixArchitecture
#define i386Architecture
#endif /* minix */
+
+#ifdef linux
+#undef linux
+#define MacroIncludeFile <gnucross.cf>
+#define MacroFile gnucross.cf
+#define GNUMachArchitecture
+#undefine LinuxArchitecture
+#define i386MachArchitecture
+#define i386Architecture
+#undef i386
+#endif
#ifdef MACH
#ifdef __GNU__
Reply to:
- Follow-Ups:
- Re: Xfree86 4.2
- From: Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>