|
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 |
|