LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 813|回复: 2

BLFS编译tetex-src-3.0错误解决方法

[复制链接]
发表于 2010-8-17 11:19:32 | 显示全部楼层 |阅读模式
BLFS编译tetex-src-3.0时出现下面的错误,在网上找了很久才找到解决方法,
贴出了给以后碰见这个问题的朋友

make[3]: Leaving directory `/sources/blfs/tetex-src-3.0/texk/web2c/lib'
gcc -DHAVE_CONFIG_H  -I. -I. -I.. -I./..   -g -O2  -c tangleboot.c -o tangleboot.o
In file included from tangleboot.c:94:
tangleboot.h:34: error: conflicting types for 'getline'
/usr/include/stdio.h:651: note: previous declaration of 'getline' was here
tangleboot.c:2175: error: conflicting types for 'getline'
/usr/include/stdio.h:651: note: previous declaration of 'getline' was here
make[2]: *** [tangleboot.o] Error 1
make[2]: Leaving directory `/sources/blfs/tetex-src-3.0/texk/web2c'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/sources/blfs/tetex-src-3.0/texk'
make: *** [all] Error 1


解决方法:

修改texk/web2c/cpascal.h
增加:
/* Apparently POSIX 2008 has getline and glibc 2.9.90 exports it.
*    tangle, weave, et al. use that symbol; try to define it away so
*       something that a standard won't usurp.
* From http://tutimura.ath.cx/ptetex/?%C6%B0%BA%EE%CA%F3%B9%F0%2F134 */
#ifdef getline
#undef getline
#endif
#define getline web2c_getline

修改texk/dvipsk/afm2tfm.c
改getline为tetex_getline
命令行方式修改:sed -i -e 's/getline/tetex_getline/g' afm2tfm.c

参考:http://lists.ibiblio.org/piperma ... 09-July/024831.html
发表于 2010-8-17 12:51:09 | 显示全部楼层
请同时参考 CBLFS,根本不会浪费时间
http://cblfs.cross-lfs.org/index.php/TeTeX
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-8-17 15:38:43 | 显示全部楼层
Post by 聚焦深空;2108567
请同时参考 CBLFS,根本不会浪费时间
http://cblfs.cross-lfs.org/index.php/TeTeX


谢谢,聚焦深空,是不是跟gcc-4.4-1的补丁有关系?不过我用的是gcc-4.5
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表