为什么我不能在 Ubuntu 12.04 上编译 GLIBC?

Eag*_*gle 7 gcc glibc

我正在尝试在 Ubuntu 12.04 上编译Linux From Scratch 内核 7.1版,在虚拟机内部运行。

我已经成功完成了本教程的一部分,但是当我到达步骤 5.7:构建 Glibc-2.14.1 时,我在 make 时遇到错误。

In file included from ../sysdeps/unix/sysv/linux/syslog.c:10:0
../misc/syslog.c: In function '__vsyslog_chk':
../misc/syslog.c:144:9: warning: variable 'prioff' set but not used [-Wunused-but-
    set-variable
../misc/syslog.c:123:1: sorry, unimplemented: inlining failed in call to 'syslog':        
    function body not available.
../misc/syslog.c:155:9: sorry, unimplemented: called from here
make[2]: *** [/mnt/lfs/sources/glibc-build/misc/syslog.o] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/glibc-2.14.1/misc'
make[1]: *** [misc/subdir_lib] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.14.1'
make: ***[all] Error 2
Run Code Online (Sandbox Code Playgroud)

经过一番谷歌搜索,我看到了一个提交的错误报告:http : //sourceware.org/bugzilla/show_bug.cgi? id=10375,其中有我看到 的相同错误,但我无法找到解决方案。

关于我应该去哪里的任何提示?

ish*_*ish 4

错误报告非常明显——尤其是最后两篇文章。

问题是(他们的) GLIBC 与Ubuntu 的gccFORTIFY_SOURCE默认设置的选项不兼容。

更好的解决方案是从 trunk 获取最新的副本,其中问题已得到修复;或者,在 makefile 中或在调用之前取消设置(禁用)该选项make

export CFLAGS=-U_FORTIFY_SOURCE
Run Code Online (Sandbox Code Playgroud)