linux xfree86安装包,XFree86-4.6.0全编译

XFree86 编译

软件包:Xfree86.4.6.tar.bz2

(下载地址:ftp://ftp.xfree86.org/pub/XFree86/4.6.0/source/)

系统环境:Ubuntu10.04 + i486-linux-gcc

$tar xf Xfree86.4.6.tar.bz2

$cd xc

$make World

出错信息:

bison -y -d pswparser.y

/bin/sh: bison: not found

make[4]: *** [pswparser.c] 错误 127

make[4]:正在离开目录 `/home/loongson/software/xc/config/pswrap'

make[3]: *** [../../config/pswrap/pswrap] 错误 2

make[3]:正在离开目录 `/home/loongson/software/xc/lib/dps'

make[2]: *** [includes] 错误 2

make[2]:正在离开目录 `/home/loongson/software/xc/lib'

make[1]: *** [includes] 错误 2

make[1]:正在离开目录 `/home/loongson/software/xc'

make: *** [World] 错误 2

参考解决方法:

没有安装bison软件包

$sudo apt-get install bison

$make World

出错信息:

y.tab.c:245:6: warning: "YYENABLE_NLS" is not defined

y.tab.c:749:6: warning: "YYLTYPE_IS_TRIVIAL" is not defined

flex -l  lexer.l

/bin/sh: flex: not found

make[4]: *** [lexer.c] 错误 127

make[4]:正在离开目录 `/home/loongson/software/xc/config/pswrap'

make[3]: *** [../../config/pswrap/pswrap] 错误 2

make[3]:正在离开目录 `/home/loongson/software/xc/lib/dps'

make[2]: *** [includes] 错误 2

make[2]:正在离开目录 `/home/loongson/software/xc/lib'

make[1]: *** [includes] 错误 2

make[1]:正在离开目录 `/home/loongson/software/xc'

参考解决方法:

没有安装flex软件包

$sudo apt-get install flex

$make World

出错信息:

XF86DGA.c:22:40: error: asm/page.h: 没有那个文件或目录

make[4]: *** [XF86DGA.o] 错误 1

make[4]:正在离开目录 `/home/loongson/software/xc/lib/Xxf86dga'

make[3]: *** [all] 错误 2

make[3]:正在离开目录 `/home/loongson/software/xc/lib'

make[2]: *** [all] 错误 2

make[2]:正在离开目录 `/home/loongson/software/xc'

make[1]: *** [World] 错误 2

make[1]:正在离开目录 `/home/loongson/software/xc'

make: *** [World] 错误 2

参考解决方法:

$sudo find / -name page.h

/opt/gcc-3.4.6/mipsel-linux/sys-include/asm-mips/page.h

/opt/gcc-3.4.6/mipsel-linux/sys-include/asm-generic/page.h

/opt/gcc-3.4.6/mipsel-linux/include/asm-mips/page.h

/opt/gcc-3.4.6/mipsel-linux/include/asm-generic/page.h

/opt/gcc-3.4.6/mipsel-linux/include/asm/page.h

或者:

从网上下一个page.h放到/usr/include/asm目录下

$ sudo cp /opt/gcc-3.4.6/mipsel-linux/include/asm/page.h /usr/include/asm/

$ make World

出错信息:

rm.h:45:26: error: linux/config.h: 没有那个文件或目录

make[5]: *** [clientattrib.o] 错误 1

make[5]:正在离开目录 `/home/loongson/software/xc/lib/GL/glx'

make[4]: *** [all] 错误 2

make[4]:正在离开目录 `/home/loongson/software/xc/lib/GL'

make[3]: *** [all] 错误 2

make[3]:正在离开目录 `/home/loongson/software/xc/lib'

make[2]: *** [all] 错误 2

make[2]:正在离开目录 `/home/loongson/software/xc'

参考解决方法:

$ sudo find / -name config.h

/usr/lib/perl/5.10.1/CORE/config.h

/usr/lib/grub/i386-pc/config.h

/opt/gcc-3.4.6/mipsel-linux/include/linux/config.h

$sudo cp /opt/gcc-3.4.6/mipsel-linux/include/linux/config.h /usr/include/linux/

$make World

出错信息:

/usr/include/linux/config.h:6:28: error: linux/autoconf.h: 没有那个文件或目录

make[5]: *** [clientattrib.o] 错误 1

make[5]:正在离开目录 `/home/loongson/software/xc/lib/GL/glx'

make[4]: *** [all] 错误 2

make[4]:正在离开目录 `/home/loongson/software/xc/lib/GL'

make[3]: *** [all] 错误 2

make[3]:正在离开目录 `/home/loongson/software/xc/lib'

参考解决方法:

$ sudo find / -name autoconf.h

/opt/gcc-3.4.6/mipsel-linux/include/linux/autoconf.h

$sudocp/opt/gcc-3.4.6/mipsel-linux/include/linux/autoconf.h /usr/include/linux/

$make World

出错信息:

In file included from auth.c:44:

dm.h:104:31: error: security/pam_appl.h: 没有那个文件或目录

In file included from auth.c:44:

dm.h:426: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token

dm.h:427: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token

auth.c: In function ‘MakeServerAuthFile’:

auth.c:318: warning: ignoring return value of ‘chown’, declared with attribute warn_unused_result

auth.c: In function ‘SetUserAuthorization’:

auth.c:1376: warning: ignoring return value of ‘chown’, declared with attribute warn_unused_result

make[4]: *** [auth.o] 错误 1

make[4]:正在离开目录 `/home/loongson/software/xc/programs/xdm'

make[3]: *** [all] 错误 2

make[3]:正在离开目录 `/home/loongson/software/xc/programs'

make[2]: *** [all] 错误 2

make[2]:正在离开目录 `/home/loongson/software/xc'

make[1]: *** [World] 错误 2

make[1]:正在离开目录 `/home/loongson/software/xc'

make: *** [World] 错误 2

参考解决方法:

缺少pam安全认证

安装pam模块

$ cd /usr/include

$ sudo mkdir security

$ cd /home/loongson/mylib/include

$ sudo cp *.h /usr/include/security

$make World

出错信息:

tauth.o           genauth.o access.o choose.o  prngc.o           xdmauth.o   greet.o verify.o Login.o -lXinerama -lXpm -lXmu -lXt -lSM -lICE -lXext -lX11 -lXt -lSM -lICE -lXext -lX11 -lXau     -lXdmcp  -lpam -rdynamic -ldl      -lcrypt         -Wl,-rpath-link,../../exports/lib

/usr/bin/ld: cannot find -lpam

collect2: ld returned 1 exit status

make[4]: *** [xdm] 错误 1

make[4]:正在离开目录 `/home/loongson/software/xc/programs/xdm'

make[3]: *** [all] 错误 2

make[3]:正在离开目录 `/home/loongson/software/xc/programs'

make[2]: *** [all] 错误 2

make[2]:正在离开目录 `/home/loongson/software/xc'

make[1]: *** [World] 错误 2

make[1]:正在离开目录 `/home/loongson/software/xc'

make: *** [World] 错误 2

参考解决方法:

$ make World CC="gcc -rpath/home/loongson/mylib/lib -L/home/loongson/mylib/lib"

出错信息:

fbdevhw.c: In function ‘calculateFbmem_len’:

fbdevhw.c:548: error: ‘PAGE_MASK’ undeclared (first use in this function)

fbdevhw.c:548: error: (Each undeclared identifier is reported only once

fbdevhw.c:548: error: for each function it appears in.)

fbdevhw.c: In function ‘fbdevHWMapVidmem’:

fbdevhw.c:575: error: ‘PAGE_MASK’ undeclared (first use in this function)

fbdevhw.c: In function ‘fbdevHWMapMMIO’:

fbdevhw.c:620: error: ‘PAGE_MASK’ undeclared (first use in this function)

fbdevhw.c: In function ‘fbdevHWUnmapMMIO’:

fbdevhw.c:644: error: ‘PAGE_MASK’ undeclared (first use in this function)

make[7]: *** [fbdevhw.o] 错误 1

make[7]:正在离开目录

/home/loongson/software/xc/programs/Xserver/hw/xfree86/fbdevhw'

make[6]: *** [all] 错误 2

make[6]:正在离开目录 `/home/loongson/software/xc/programs/Xserver/hw/xfree86'

make[5]: *** [all] 错误 2

make[5]:正在离开目录 `/home/loongson/software/xc/programs/Xserver/hw'

make[4]: *** [hw] 错误 2

make[4]:正在离开目录 `/home/loongson/software/xc/programs/Xserver'

make[3]: *** [all] 错误 2

make[3]:正在离开目录 `/home/loongson/software/xc/programs'

make[2]: *** [all] 错误 2

make[2]:正在离开目录 `/home/loongson/software/xc'

make[1]: *** [World] 错误 2

make[1]:正在离开目录 `/home/loongson/software/xc'

make: *** [World] 错误 2

参考解决方法:

$ cd programs/Xserver/hw/xfree86/fbdevhw$

修改fbdevhw.c

将#include “asm/page.h”

改为

#include 或者自己定义一个:(参照/usr/include/asm/page.h)

#define PAGE_SHIFT  12

#define PAGE_MASK       (~((1 << PAGE_SHIFT) - 1))

出错信息:

vm86.c: In function ‘Vm86DoInterrupt’:

vm86.c:272: error: ‘IF_MASK’ undeclared (first use in this function)

vm86.c:272: error: (Each undeclared identifier is reported only once

vm86.c:272: error: for each function it appears in.)

vm86.c:272: error: ‘IOPL_MASK’ undeclared (first use in this function)

make[5]: *** [vm86.o] 错误 1

make[5]:

正在离开目录 `/home/loongson/software/xc/programs/Xserver/hw/tinyx/vesa'

make[4]: *** [hw/tinyx/vesa] 错误 2

make[4]:正在离开目录 `/home/loongson/software/xc/programs/Xserver'

make[3]: *** [all] 错误 2

make[3]:正在离开目录 `/home/loongson/software/xc/programs'

make[2]: *** [all] 错误 2

make[2]:正在离开目录 `/home/loongson/software/xc'

make[1]: *** [World] 错误 2

make[1]:正在离开目录 `/home/loongson/software/xc'

make: *** [World] 错误 2

参考解决方法:

$Vim vm86.h

在里面添加:

#define TF_MASK     0x00000100

#define IF_MASK     0x00000200

#define IOPL_MASK   0x00003000

#define NT_MASK     0x00004000

#ifdef CONFIG_VM86

#define VM_MASK     0x00020000

#else

#define VM_MASK     0 /* ignored */

#endif

#define AC_MASK     0x00040000

#define VIF_MASK    0x00080000  /* virtual interrupt flag */

#define VIP_MASK    0x00100000  /* virtual interrupt pending */

#define ID_MASK     0x00200000

$make

安装PAM

软件包:Linux-PAM-1.1.1.tar.bz2

(下载地址:)

$ export PREFIX=/home/loongson/mylib

$ ./configure —prefix=$PREFIX

$ make

$ make install

生成的执行文件在/xc/programs/Xserver

使用Xfbdev

$cd /xc/programs/Xserver //可执行文件在这个目录下面

$./Xfbdev

出错信息:

Fatal server error:

Server is already active for display 0

If this server is no longer running, remove /tmp/.X0-lock

and start again.

解决方法:export DISPLAY=:1

原因:当前正在使用display 0

$sudo ./Xfbdev :1

出错信息:

(WW) Could not open RGB file "/root/x_server/lib/X11/rgb.txt"; will use built-in copy.

Could not init font path element /root/x_server/lib/X11/fonts/misc/, removing from list!

Could not init font path element /root/x_server/lib/X11/fonts/TTF/, removing from list!

Could not init font path element /root/x_server/lib/X11/fonts/Speedo/, removing from list!

Could not init font path element /root/x_server/lib/X11/fonts/Type1/, removing from list!

Could not init font path element /root/x_server/lib/X11/fonts/CID/, removing from list!

Could not init font path element /root/x_server/lib/X11/fonts/75dpi/, removing from list!

Could not init font path element /root/x_server/lib/X11/fonts/100dpi/, removing from list

Fatal server error:

could not open default font 'fixed'

解决办法:

原因:没有找到字体

$./Xfbdev --help(查看参数说明)

$sudo ./Xfbdev :1 -fp /usr/share/fonts/X11/misc/  //指定字体路径

阅读(2623) | 评论(0) | 转发(1) |

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值