|
楼主 |
发表于 2004-6-8 21:28:20
|
显示全部楼层
这是我在网上找到的别人装glibc的过程
_________________________________________________________________
5.9.5. Glibc installation
Before starting to install Glibc, you must cd into the glibc-2.3.2 directory and unpack Glibc-linuxthreads in that directory, not in the directory where you usually unpack all the sources.
We are going to run the test suite for Glibc in this chapter. However, it's worth pointing out that running the Glibc test suite here is considered not as important as running it in Chapter 6.
This package is known to behave badly when you have changed its default optimization flags (including the -march and -mcpu options). Therefore, if you have defined any environment variables that override default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting them when building Glibc.
Basically, compiling Glibc in any other way than the book suggests is putting the stability of your system at risk.
Though it is a harmless message, the install stage of Glibc will complain about the absence of /tools/etc/ld.so.conf. Fix this annoying little warning with:
mkdir /tools/etc
touch /tools/etc/ld.so.conf
Also, Glibc has a subtle problem when compiled with GCC 3.3.1. Apply the following patch to fix this:
patch -Np1 -i ../glibc-2.3.2-sscanf-1.patch
The Glibc documentation recommends building Glibc outside of the source directory in a dedicated build directory:
mkdir ../glibc-build
cd ../glibc-build
Next, prepare Glibc for compilation:
../glibc-2.3.2/configure --prefix=/tools \
--disable-profile --enable-add-ons \
--with-headers=/tools/include \
--with-binutils=/tools/bin \
--without-gd
_____________________________________________________________
以下是中文翻译
_____________________________________________________________
安装 Glibc
在安装glibc前,你必须用 cd 命令进入 glibc-2.3.2 目录然后解压 glibc-linuxthreads 压缩包,别把 glibc-linuxthreads 解压到通常的 /usr/src 目录下了。
注: 我们这里将运行Glibc的测试套件。要说明的是,这里运行测试套件,并没有第六章里运行它那么重要。
如果你把这个包缺省的优化参数(包括 -march 和 -mcpu参数)改变的话,它会有很不良的表现。最好不要优化这个包。因此,如果你定义了任何优化参数的话,比如CFLAGS 和 CXXFLAGS,我们劝你在编译Glibc时unset它们。
简单地说,如果不像本书说的这样编译Glibc,你的系统可能就会变得很不稳定。
在用GCC 3.3.2来编译Glibc时,会有一点小问题。下面的补丁能修正:
patch -Np1 -i ../glibc-2.3.2-sscanf-1.patch
Glibc 的安装指南推荐用一个新建的目录来编译它,而不是在源码目录中:
mkdir ../glibc-build
cd ../glibc-build
然后为编译 Glibc 作准备:
../glibc-2.3.2/configure --prefix=/tools \
--disable-profile --enable-add-ons \
--with-headers=/tools/include \
--with-binutils=/tools/bin \
--without-gd
______________________________________________________
关于以上过程我有些疑问
你必须用 cd 命令进入 glibc-2.3.2 目录然后解压 glibc-linuxthreads 压缩包,别把 glibc-linuxthreads 解压到通常的 /usr/src 目录下了
-----可是这个目录里并没有glibc-linuxthreads压缩包啊
patch -Np1 -i ../glibc-2.3.2-sscanf-1.patch
-----这个补丁又是怎么回事呢?
有谁知道吗? |
|