14 12
发新话题
打印

编译fontconfig错误

编译fontconfig错误

  俺的系统想采用Framebuffer+DirectFB+GTK
编译fontconfig时,./configure没有问题,make时错误如下错误,请大侠指点指点:
make[2]: Entering directory `/mnt/hd2/shanggmj/dev_home/src/fontconfig-2.3.95/src'
if /bin/sh ../libtool --tag=CC --mode=compile arm-linux-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../src -I/mnt/hd2/shanggmj/dev_home/rootfs/usr/include/freetype2 -I/mnt/hd2/shanggmj/dev_home/rootfs/usr/include /mnt/hd2/shanggmj/dev_home/rootfs/usr/include  -Wall -Wpointer-arith -Wstrict-prototypes     -Wmissing-prototypes -Wmissing-declarations    -Wnested-externs -fno-strict-aliasing -DFONTCONFIG_PATH='"/mnt/hd2/shanggmj/dev_home/rootfs/usr/etc/fonts"' -DPKGCACHEDIR='"/mnt/hd2/shanggmj/dev_home/rootfs/usr/var/cache/fontconfig"'   -g -O2 -MT fcatomic.lo -MD -MP -MF ".deps/fcatomic.Tpo" -c -o fcatomic.lo fcatomic.c; \
then mv -f ".deps/fcatomic.Tpo" ".deps/fcatomic.Plo"; else rm -f ".deps/fcatomic.Tpo"; exit 1; fi
arm-linux-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../src -I/mnt/hd2/shanggmj/dev_home/rootfs/usr/include/freetype2 -I/mnt/hd2/shanggmj/dev_home/rootfs/usr/include /mnt/hd2/shanggmj/dev_home/rootfs/usr/include -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -DFONTCONFIG_PATH=\"/mnt/hd2/shanggmj/dev_home/rootfs/usr/etc/fonts\" -DPKGCACHEDIR=\"/mnt/hd2/shanggmj/dev_home/rootfs/usr/var/cache/fontconfig\" -g -O2 -MT fcatomic.lo -MD -MP -MF .deps/fcatomic.Tpo -c fcatomic.c  -fPIC -DPIC -o .libs/fcatomic.o
arm-linux-gcc: cannot specify -o with -c or -S and multiple compilations
make[2]: *** [fcatomic.lo] Error 1
make[2]: Leaving directory `/mnt/hd2/shanggmj/dev_home/src/fontconfig-2.3.95/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/hd2/shanggmj/dev_home/src/fontconfig-2.3.95'
make: *** [all] Error 2
俺交叉编译器的版本是cross-3.3.2
拜请各位大侠指点指点啊
从错误信息上看 似乎是 gcc 参数出问题
-o与-c -S等同时使用了

你自己修改过代码吗?
邮箱 sanool at gmail.com  
我没遇到这个问题,我给你看我的脚本

export CC=/cross-compile/bin/arm-linux-gcc
export AR=/cross-compile/bin/arm-linux-ar
export LD=/cross-compile/bin/arm-linux-ld
export RANLIB=/cross-compile/bin/arm-linux-ranlib
export CXX=/cross-compile/bin/arm-linux-g++
export PREFIX=/tftpboot/root/usr
LIBXML2_CFLAGS=/tftpboot/root/usr/include
LIBXML2_LIBS=/tftpboot/root/usr/lib/libxml2.so
FREE_TYPE_PATH=/tftpboot/root/usr/bin/freetype-config
./configure --host=arm-linux --build=i386-linux --prefix=$PREFIX
--with-freetype-config=$FREE_TYPE_PATH --with-confdir=/tftpboot/root/etc/fonts --enable-libxml2

我在用3.3.4,
建议你换个新版本的编译器
http://linux-dvbh.blogspot.com/ http://www.aesop-embedded.org/docu.html http://210.217.20.216/zboard/   pmplab.org http://projects.o-hand.com/matchbox/ http://www.frappr.com/opensourcetesters
请问mic大侠:俺用的是REDHAT9.0,会不会跟这里面的环境变量有关呢?
请问mic大侠:俺用的是REDHAT9.0,会不会跟这里面的环境变量有关呢?
我觉得只要正确设置了上述几个环境变量,
还有检查configure后生成的Makefile中的CFLAGS,LIBS等参数,
如果还是有问题出现,那么尝试换个编译器或者换个新的版本.(我也接触交叉编译不久,configure脚本不大看得懂)
http://linux-dvbh.blogspot.com/ http://www.aesop-embedded.org/docu.html http://210.217.20.216/zboard/   pmplab.org http://projects.o-hand.com/matchbox/ http://www.frappr.com/opensourcetesters
谢谢mic大侠!!!
俺的交叉编译器的版本换成3.4.1之后出现如下问题,望大侠指点:
make[2]: Entering directory `/mnt/hd2/shanggmj/dev_home/src/fontconfig-2.3.95/src'
if /bin/sh ../libtool --tag=CC --mode=compile arm-linux-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../src -I/mnt/hd2/shanggmj/dev_home/rootfs/usr/include/freetype2 -I/mnt/hd2/shanggmj/dev_home/rootfs/usr/include /mnt/hd2/shanggmj/dev_home/rootfs/usr/include  -Wall -Wpointer-arith -Wstrict-prototypes     -Wmissing-prototypes -Wmissing-declarations    -Wnested-externs -fno-strict-aliasing -DFONTCONFIG_PATH='"/mnt/hd2/shanggmj/dev_home/rootfs/usr/etc/fonts"' -DPKGCACHEDIR='"/mnt/hd2/shanggmj/dev_home/rootfs/usr/var/cache/fontconfig"'   -g -O2 -MT fcatomic.lo -MD -MP -MF ".deps/fcatomic.Tpo" -c -o fcatomic.lo fcatomic.c; \
then mv -f ".deps/fcatomic.Tpo" ".deps/fcatomic.Plo"; else rm -f ".deps/fcatomic.Tpo"; exit 1; fi
mkdir .libs
arm-linux-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../src -I/mnt/hd2/shanggmj/dev_home/rootfs/usr/include/freetype2 -I/mnt/hd2/shanggmj/dev_home/rootfs/usr/include /mnt/hd2/shanggmj/dev_home/rootfs/usr/include -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -DFONTCONFIG_PATH=\"/mnt/hd2/shanggmj/dev_home/rootfs/usr/etc/fonts\" -DPKGCACHEDIR=\"/mnt/hd2/shanggmj/dev_home/rootfs/usr/var/cache/fontconfig\" -g -O2 -MT fcatomic.lo -MD -MP -MF .deps/fcatomic.Tpo -c fcatomic.c  -fPIC -DPIC -o .libs/fcatomic.o
arm-linux-gcc: /mnt/hd2/shanggmj/dev_home/rootfs/usr/include: linker input file unused because linking not done
cc1: /mnt/hd2/shanggmj/dev_home/rootfs/usr/include: No such file or directory
cc1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[2]: *** [fcatomic.lo] Error 1
make[2]: Leaving directory `/mnt/hd2/shanggmj/dev_home/src/fontconfig-2.3.95/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/hd2/shanggmj/dev_home/src/fontconfig-2.3.95'
make: *** [all] Error 2
cc1: /mnt/hd2/shanggmj/dev_home/rootfs/usr/include: No such file or directory
你可以查找第一个ERROR,然后查看他的前后来寻找出错信息,授人以鱼,不如授人以渔,不是么?学东西也是一样。
REDHAT9.0的GCC太古老了,建议用新的gcc!
好好学习,天天向上~~! msn:hlf5507@163.com
 14 12
发新话题