求救,如何设置Makefile,用arm-linux-gcc交叉编译XFree86?

FJGoodGood 2007-05-11 10:02:47
XFree86的Makefile跟通常的不太一样,很难琢磨,在goole上找了,都是这篇文章《交叉编译场景分析(arm-linux)(六)--编译TinyX》,作者说的不是很清除。希望大家提供些详细的资料,必高分回馈,谢谢!100分不够,我会多开几贴给分,最多可以给到500。
...全文
955 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
lxzhg 2010-10-12
  • 打赏
  • 举报
回复
大部分都是重复定义错误,检查一下多include了哪些头文件吧
adonis1620 2010-10-12
  • 打赏
  • 举报
回复
定。。。。。。。
kmajian 2007-06-06
  • 打赏
  • 举报
回复
这和交叉编译器有关吧,和Makefile没有关系吧。不懂,给楼主顶。
FJGoodGood 2007-05-14
  • 打赏
  • 举报
回复
(续)
../../extras/freetype2/src/gzip/inflate.c:179: warning: left-hand operand of comma expression has no effect
../../extras/freetype2/src/gzip/inflate.c:179: warning: left-hand operand of comma expression has no effect
../../extras/freetype2/src/gzip/inflate.c:179: warning: data definition has no type or storage class
../../extras/freetype2/src/gzip/inflate.c:180: error: parse error before "if"
../../extras/freetype2/src/gzip/inflate.c:195: warning: type defaults to `int' in declaration of `r'
../../extras/freetype2/src/gzip/inflate.c:195: error: redefinition of 'r'
../../extras/freetype2/src/gzip/inflate.c:178: error: previous definition of 'r' was here
../../extras/freetype2/src/gzip/inflate.c:195: error: redefinition of 'r'
../../extras/freetype2/src/gzip/inflate.c:161: error: previous definition of 'r' was here
../../extras/freetype2/src/gzip/inflate.c:195: error: initializer element is not constant
../../extras/freetype2/src/gzip/inflate.c:195: warning: data definition has no type or storage class
../../extras/freetype2/src/gzip/inflate.c:195: error: parse error before '}' token
../../extras/freetype2/src/gzip/inflate.c:199: warning: type defaults to `int' in declaration of `r'
../../extras/freetype2/src/gzip/inflate.c:199: error: redefinition of 'r'
../../extras/freetype2/src/gzip/inflate.c:195: error: previous definition of 'r' was here
../../extras/freetype2/src/gzip/inflate.c:199: error: redefinition of 'r'
../../extras/freetype2/src/gzip/inflate.c:161: error: previous definition of 'r' was here
../../extras/freetype2/src/gzip/inflate.c:199: error: initializer element is not constant
../../extras/freetype2/src/gzip/inflate.c:199: warning: data definition has no type or storage class
../../extras/freetype2/src/gzip/inflate.c:199: error: parse error before '}' token
../../extras/freetype2/src/gzip/inflate.c:203: warning: type defaults to `int' in declaration of `r'
../../extras/freetype2/src/gzip/inflate.c:203: error: redefinition of 'r'
../../extras/freetype2/src/gzip/inflate.c:199: error: previous definition of 'r' was here
../../extras/freetype2/src/gzip/inflate.c:203: error: redefinition of 'r'
../../extras/freetype2/src/gzip/inflate.c:161: error: previous definition of 'r' was here
../../extras/freetype2/src/gzip/inflate.c:203: error: initializer element is not constant
../../extras/freetype2/src/gzip/inflate.c:203: warning: data definition has no type or storage class
../../extras/freetype2/src/gzip/inflate.c:203: error: parse error before '}' token
../../extras/freetype2/src/gzip/inflate.c:207: warning: type defaults to `int' in declaration of `r'
../../extras/freetype2/src/gzip/inflate.c:207: error: redefinition of 'r'
../../extras/freetype2/src/gzip/inflate.c:203: error: previous definition of 'r' was here
../../extras/freetype2/src/gzip/inflate.c:207: error: redefinition of 'r'
../../extras/freetype2/src/gzip/inflate.c:161: error: previous definition of 'r' was here
../../extras/freetype2/src/gzip/inflate.c:207: error: initializer element is not constant
../../extras/freetype2/src/gzip/inflate.c:207: warning: data definition has no type or storage class
../../extras/freetype2/src/gzip/inflate.c:207: error: parse error before '}' token
../../extras/freetype2/src/gzip/inflate.c:229: warning: type defaults to `int' in declaration of `r'
../../extras/freetype2/src/gzip/inflate.c:229: error: redefinition of 'r'
../../extras/freetype2/src/gzip/inflate.c:207: error: previous definition of 'r' was here
../../extras/freetype2/src/gzip/inflate.c:229: error: redefinition of 'r'
../../extras/freetype2/src/gzip/inflate.c:161: error: previous definition of 'r' was here
../../extras/freetype2/src/gzip/inflate.c:229: error: initializer element is not constant
../../extras/freetype2/src/gzip/inflate.c:229: warning: data definition has no type or storage class
../../extras/freetype2/src/gzip/inflate.c:230: error: parse error before '->' token
../../extras/freetype2/src/gzip/inflate.c:230: warning: type defaults to `int' in declaration of `inflate_blocks_reset'
../../extras/freetype2/src/gzip/inflate.c:230: warning: data definition has no type or storage class
../../extras/freetype2/src/gzip/inflate.c:238: warning: type defaults to `int' in declaration of `r'
FJGoodGood 2007-05-14
  • 打赏
  • 举报
回复
(续)
/root/rdc/rootfs/usr/include/zconf.h:263: error: previous declaration of 'uInt'
was here
../../extras/freetype2/src/gzip/zconf.h:214: error: redefinition of typedef 'uLong'
/root/rdc/rootfs/usr/include/zconf.h:264: error: previous declaration of 'uLong' was here
../../extras/freetype2/src/gzip/zconf.h:220: error: redefinition of typedef 'Bytef'
/root/rdc/rootfs/usr/include/zconf.h:270: error: previous declaration of 'Bytef' was here
../../extras/freetype2/src/gzip/zconf.h:222: error: redefinition of typedef 'charf'
/root/rdc/rootfs/usr/include/zconf.h:272: error: previous declaration of 'charf' was here
../../extras/freetype2/src/gzip/zconf.h:223: error: redefinition of typedef 'intf'
/root/rdc/rootfs/usr/include/zconf.h:273: error: previous declaration of 'intf'
was here
../../extras/freetype2/src/gzip/zconf.h:224: error: redefinition of typedef 'uIntf'
/root/rdc/rootfs/usr/include/zconf.h:274: error: previous declaration of 'uIntf' was here
../../extras/freetype2/src/gzip/zconf.h:225: error: redefinition of typedef 'uLongf'
/root/rdc/rootfs/usr/include/zconf.h:275: error: previous declaration of 'uLongf' was here
../../extras/freetype2/src/gzip/zconf.h:228: error: redefinition of typedef 'voidpf'
/root/rdc/rootfs/usr/include/zconf.h:279: error: previous declaration of 'voidpf' was here
../../extras/freetype2/src/gzip/zconf.h:229: error: redefinition of typedef 'voidp'
/root/rdc/rootfs/usr/include/zconf.h:280: error: previous declaration of 'voidp' was here
In file included from ../../extras/freetype2/src/gzip/zutil.h:16,
from ftgzip.c:72:
../../extras/freetype2/src/gzip/zlib.h:40:1: warning: "ZLIB_VERSION" redefined
In file included from ftgzip.c:64:
/root/rdc/rootfs/usr/include/zlib.h:40:1: warning: this is the location of the previous definition
In file included from ../../extras/freetype2/src/gzip/zutil.h:16,
from ftgzip.c:72:
../../extras/freetype2/src/gzip/zlib.h:63: error: redefinition of typedef 'alloc_func'
/root/rdc/rootfs/usr/include/zlib.h:77: error: previous declaration of 'alloc_func' was here
../../extras/freetype2/src/gzip/zlib.h:64: error: redefinition of typedef 'free_func'
/root/rdc/rootfs/usr/include/zlib.h:78: error: previous declaration of 'free_func' was here
../../extras/freetype2/src/gzip/zlib.h:68: error: redefinition of `struct z_stream_s'
../../extras/freetype2/src/gzip/zlib.h:87: error: redefinition of typedef 'z_stream'
/root/rdc/rootfs/usr/include/zlib.h:101: error: previous declaration of 'z_stream' was here
../../extras/freetype2/src/gzip/zlib.h:89: error: redefinition of typedef 'z_streamp'
/root/rdc/rootfs/usr/include/zlib.h:103: error: previous declaration of 'z_streamp' was here
In file included from ../../extras/freetype2/src/gzip/zutil.h:16,
from ftgzip.c:72:
../../extras/freetype2/src/gzip/zlib.h:157:1: warning: "Z_ASCII" redefined
In file included from ftgzip.c:64:
/root/rdc/rootfs/usr/include/zlib.h:198:1: warning: this is the location of the
previous definition
../../extras/freetype2/src/gzip/zlib.h:309: error: parse error before "int"
../../extras/freetype2/src/gzip/zlib.h:378: error: parse error before "int"
../../extras/freetype2/src/gzip/zlib.h:569: error: parse error before "int"
../../extras/freetype2/src/gzip/zlib.h:775: error: parse error before "uLong"
../../extras/freetype2/src/gzip/zlib.h:813: error: parse error before "int"
In file included from ftgzip.c:85:
../../extras/freetype2/src/gzip/inflate.c:54: error: parse error before "int"
../../extras/freetype2/src/gzip/inflate.c:62: error: parse error before '->' token
../../extras/freetype2/src/gzip/inflate.c:62: warning: type defaults to `int' in declaration of `inflate_blocks_reset'
../../extras/freetype2/src/gzip/inflate.c:62: error: conflicting types for 'inflate_blocks_reset'
../../extras/freetype2/src/gzip/infblock.c:71: error: previous definition of 'inflate_blocks_reset' was here
../../extras/freetype2/src/gzip/inflate.c:62: warning: data definition has no type or storage class
../../extras/freetype2/src/gzip/inflate.c:64: error: parse error before "return"../../extras/freetype2/src/gzip/inflate.c:75: error: parse error before '->' token
../../extras/freetype2/src/gzip/inflate.c:134: warning: type defaults to `int' in declaration of `inflateReset'
../../extras/freetype2/src/gzip/inflate.c:134: warning: parameter names (without types) in function declaration
../../extras/freetype2/src/gzip/inflate.c:134: warning: data definition has no type or storage class
../../extras/freetype2/src/gzip/inflate.c:135: error: parse error before "return"
../../extras/freetype2/src/gzip/inflate.c:154: error: parse error before "if"
../../extras/freetype2/src/gzip/inflate.c:156: warning: type defaults to `int' in declaration of `f'
../../extras/freetype2/src/gzip/inflate.c:156: error: initializer element is not constant
../../extras/freetype2/src/gzip/inflate.c:156: warning: data definition has no type or storage class
../../extras/freetype2/src/gzip/inflate.c:157: warning: type defaults to `int' in declaration of `r'
../../extras/freetype2/src/gzip/inflate.c:157: warning: data definition has no type or storage class
../../extras/freetype2/src/gzip/inflate.c:158: error: parse error before "while"../../extras/freetype2/src/gzip/inflate.c:161: warning: type defaults to `int' in declaration of `r'
../../extras/freetype2/src/gzip/inflate.c:161: error: redefinition of 'r'
../../extras/freetype2/src/gzip/inflate.c:157: error: previous definition of 'r' was here
../../extras/freetype2/src/gzip/inflate.c:161: error: initializer element is not constant
../../extras/freetype2/src/gzip/inflate.c:161: warning: data definition has no type or storage class
../../extras/freetype2/src/gzip/inflate.c:161: error: parse error before '}' token
../../extras/freetype2/src/gzip/inflate.c:178: warning: type defaults to `int' in declaration of `r'
../../extras/freetype2/src/gzip/inflate.c:178: error: redefinition of 'r'
../../extras/freetype2/src/gzip/inflate.c:161: error: previous definition of 'r' was here
../../extras/freetype2/src/gzip/inflate.c:178: error: redefinition of 'r'
../../extras/freetype2/src/gzip/inflate.c:161: error: previous definition of 'r' was here
../../extras/freetype2/src/gzip/inflate.c:178: error: initializer element is not constant
../../extras/freetype2/src/gzip/inflate.c:178: warning: data definition has no type or storage class
../../extras/freetype2/src/gzip/inflate.c:178: error: parse error before '}' token
../../extras/freetype2/src/gzip/inflate.c:179: warning: type defaults to `int' in declaration of `b'
../../extras/freetype2/src/gzip/inflate.c:179: error: conflicting types for 'b'
../../extras/freetype2/src/gzip/inflate.c:152: error: previous declaration of 'b' was here
../../extras/freetype2/src/gzip/inflate.c:179: error: `z' undeclared here (not in a function)
FJGoodGood 2007-05-14
  • 打赏
  • 举报
回复
XFree86 源码版本 4.6.0
host.def 设置如下:

#define KDriveXServer YES

#define TinyXServer YES

#define XfbdevServer YES

#define CrossCompiling YES

#define ProjectRoot /usr/X11R6

#define NothingOutsideProjectRoot YES

#define HasZlib YES

#define XF86CardDrivers fbdev

#define XInputDrivers mouse keyboard

cross.def 设置如下:

#undef Arm32Architecture

#undef i386Architecture


#define Arm32Architecture

#undef OptimizedCDebugFlags

#define OptimizedCDebugFlags -Os

#define ServerCDebugFlags -Os

#undef StandardDefines

#define StandardDefines -Dlinux -D__arm__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE \
-DX_LOCALE -DUSE_DYNAMIC_LC -DUSE_UTF8_LOADER -DUSE_DYNAMIC_LOADER

#define StdIncDir

#define PreIncDir

#undef PostIncDir

#define PostIncDir

#undef CcCmd

#define CcCmd arm-linux-gcc -I/root/rdc/rootfs/usr/include/ncurses -I/root/rdc/rootfs/usr/include

#undef HasCplusplus

#define HasCplusplus NO

#undef CplusplusCmd

#define CplusplusCmd NO

#define DoRanlibCmd YES

#define RanlibCmd arm-linux-ranlib

#undef ExtraLoadFlags

#define ExtraLoadFlags

#define FbNoPixelAddrCode

#undef TermcapLibrary

#define TermcapLibrary -L/root/rdc/rootfs/usr/lib -lncurses

#define NCursesLibName -L/root/rdc/rootfs/usr/lib -lncurses

#undef LdPostLib

#undef LdCmd

#define LdCmd arm-linux-ld

#undef ExtensionOSDefines

#define ExtensionOSDefines

#define ServerXdmcpDefines

#undef GzipLibrary

#define GzipLibrary -L/root/rdc/rootfs/usr/lib -lz

#include <cross.rules>

编译出错:

In file included from ../../extras/freetype2/src/gzip/zlib.h:34,
from ../../extras/freetype2/src/gzip/zutil.h:16,
from ftgzip.c:72:
../../extras/freetype2/src/gzip/zconf.h:211: error: redefinition of typedef 'Byte'
/root/rdc/rootfs/usr/include/zconf.h:261: error: previous declaration of 'Byte'
was here
../../extras/freetype2/src/gzip/zconf.h:213: error: redefinition of typedef 'uInt'
jlu3389 2007-05-13
  • 打赏
  • 举报
回复
XFree86???

FJGoodGood 2007-05-13
  • 打赏
  • 举报
回复
CSDN这个板块都是菜鸟吗?

21,597

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 驱动开发/核心开发
社区管理员
  • 驱动开发/核心开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧