glibc没有正确编译

时间:2012-05-02 12:29:12

标签: c linux gcc x86 glibc

在编译glibc 2.11时,出现以下错误。不知道如何解决这个问题。

In file included from ../sysdeps/unix/sysv/linux/syslog.c:10:
../misc/syslog.c: In function ‘__vsyslog_chk’:
../misc/syslog.c:123: sorry, unimplemented: inlining failed in call to ‘syslog’: function body not available
../misc/syslog.c:155: sorry, unimplemented: called from here
make[2]: *** [/home/alice/Desktop/glib-build/misc/syslog.o] Error 1
make[2]: Leaving directory `/home/alice/Desktop/glibc-2.11/misc'
make[1]: *** [misc/subdir_lib] Error 2
make[1]: Leaving directory `/home/alice/Desktop/glibc-2.11'
make: *** [all] Error 2

1 个答案:

答案 0 :(得分:4)

显然,这是known problem with building glibc on Ubuntu。实质上:

glibc does not build with _FORTIFY_SOURCE enabled,Ubuntu使用-D_FORTIFY_SOURCE=2编译内容。

您需要通过取消定义_FORTIFY_SOURCE来禁用此功能。即 -U_FORTIFY_SOURCE附加到您的CFLAGS