下载:http://ftp.gnu.org/gnu/libc/ glibc-2.24.tar.gz
如果直接在glibc-2.24目录中执行./configure,提示
configure: error: you must configure in a separate build directory
打开 INSTALL,注意这部分信息:
该C语言库不能直接在源码目录中编译,必须在目录外单独建立一个空目录 glibc-buildThe GNU C Library cannot be compiled in the source directory. You must
build it in a separate build directory. For example, if you have
unpacked the GNU C Library sources in '/src/gnu/glibc-VERSION', create a
directory '/src/gnu/glibc-build' to put the object files in. This
allows removing the whole build directory in case an error occurs, which
is the safest way to get a fresh start and should always be done.
From your object directory, run the shell script 'configure' located
at the top level of the source tree. In the scenario above, you'd type
$ ../glibc-VERSION/configure ARGS...
Please note that even though you're building in a separate build
directory, the compilation may need to create or modify files and
directories in the source directory.
也就是两个目录并排存在: glibc-build , glibc-版本号
用MSYS2 Shell进入 glibc-build, 执行../glibc-2.24/configure
错误提示:
好像是不支持windows平台,进入该链接,懵。configure: error: *** The GNU C library is currently unavailable for this platform. *** If you are interested in seeing glibc on this platform visit *** the "How to submit a new port" in the wiki: *** https://sourceware.org/glibc/wiki/#Development *** and join the community!
分割线
后来翻着翻着就找到这两个链接:http://gnuwin32.sourceforge.net/packages/libgw32c.htm
https://sourceforge.net/projects/gnuwin32/files/libgw32c/0.4/
下载 libgw32c-0.4-src.zip
解压,进入src文件夹,./configure 提示:
打开configure 文件1545行checking whether make sets $(MAKE)... ./configure: eval: line 1545: unexpected E OF while looking for matching `"' ./configure: eval: line 1546: syntax error: unexpected end of file
eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
这可能是什么问题呢? 最有可能是 | 被优先解释了,改为
eval `${MAKE-make} -f conftest.make 2>/dev/null \| grep temp=`
./configure 通过
但是 make 过程中不断提示错误,而且提示缺的东西都不在源码目录中,而在glibc-2.24.tar.gz中(就是提示不支持此平台的那个)
屡试屡败,弃 。。。暂时选择 libgw32c-0.4-lib.zip
如果哪位了解的,还望指点一二。