glibc官网链接:
获取源码(以下描述来自官网)
Download sources
Releases are available by source branch checkout and tarball .
Checkout the latest glibc 2.27 stable release:
git clone git://sourceware.org/git/glibc.git
cd glibc
git checkout --track -b local_glibc-2.27 origin/release/2.27/master
Release tarballs are available via anonymous ftp at and its mirrors.
编译及注意事项:
./glibc/configure --prefix=/usr
make
注意事项:
编译时需要到到源码上一级目录执行./glibc/configure --prefix=xxx ...
configure完成后会在当前目录产生Makefile文件和相关config文件,直接在当前目录执行make进行编译即可,不需要回到源码目录,否则无法编译。
编译错误:
如果在源码目录执行./configure 会提示以下错误:
configure: error: you must configure
in a separate build directory
如果指定的--prefix=后面没有指定绝对路径,会提示以下错误
configure: error: expected an absolute directory name for --prefix: ../build
阅读(6722) | 评论(0) | 转发(0) |