【问题标题】:glibc not properly compilingglibc 没有正确编译
【发布时间】:2012-05-02 12:29:11
【问题描述】:

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

【问题讨论】:

  • 为什么要编译glibc?它是一个如此核心的软件,编译它需要大量的专业知识!安装较新的发行版(可能在 chroot-ed 环境中)可能更简单。

标签: c linux gcc x86 glibc


【解决方案1】:

显然,这是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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-12-12
    • 1970-01-01
    • 2016-07-04
    • 2016-02-28
    • 2015-07-20
    • 2011-12-10
    • 2014-07-12
    • 2021-03-25
    相关资源
    最近更新 更多