【发布时间】:2015-05-23 08:30:34
【问题描述】:
Fedora 21 存储库有 glibc-2.20-8.fc21
我想从源代码安装 glibc 2.21。 (我意识到我们距离 Fedora 22 发布还有几天的时间,但是下次我有兴趣安装更新版本的 glibc 时,这个问题将适用。)
在 2.21 源上运行配置说:
On GNU/Linux systems the GNU C Library should not be installed into
/usr/local since this might make your system totally unusable.
它引用查看 glibc 常见问题解答,然后说:
The GNU C compiler treats /usr/local/include and /usr/local/lib in a special
way, these directories will be searched before the system directories. Since
on GNU/Linux the system directories /usr/include and /usr/lib contain a ---
possibly different --- version of glibc and mixing certain files from
different glibc installations is not supported and will break, you risk
breaking your complete system. If you want to test a glibc installation, use
another directory as argument to --prefix. If you like to install this glibc
version as default version, overriding the existing one, use --prefix=/usr
and everything will go in the right places.
我正在争论我想走哪条路(一个单独的目录,而不是 /usr/local,或者覆盖 /usr)。
但是,我注意到某处说如果你要这样做,你要确保使用与你的 linux 发行版相同的配置选项。
所以,我下载了 glibc-2.20-8.fc21.src.rpm 并解压。我第一次看到 linux 发行版对上游代码做了什么。有 48 个 .patch 文件、3 个额外的 .c 文件、一个额外的 .h 文件和一些 .conf 文件。
无论您是使用第二个(非 /usr/local)位置还是在 /usr 中覆盖,从源代码安装 glibc 是否安全(如果是,如何)?
RedHat/Fedora 存储库“人们”制作的所有补丁都将被跳过。 (我认为这些特定于发行版的补丁很重要......)有多少地方说升级 glibc 通常是安全的?
就此而言,如果许多分发包都具有如此数量的分发定制,那么从源代码构建任何东西都如何工作?我已经运行 gcc 和 gdb 的主干源代码构建很长时间了,偶尔会遇到问题,因为它不是发布代码,但它通常可以工作......我现在也不明白这些是如何工作的,没有分发存储库补丁。
【问题讨论】: