[Failed]C运行库 - glibc

头像
paktc
渐入佳境
渐入佳境
帖子: 47
注册时间: 2016年07月21日 20:34
拥有现金: 锁定
储蓄: 锁定
Has thanked: 6 times
Been thanked: 5 times
联系:

[Failed]C运行库 - glibc

帖子 #1 paktc » 2016年10月26日 15:55

页面:http://www.gnu.org/software/libc/
下载: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,注意这部分信息:
The 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.


该C语言库不能直接在源码目录中编译,必须在目录外单独建立一个空目录 glibc-build
也就是两个目录并排存在: glibc-build , glibc-版本号

用MSYS2 Shell进入 glibc-build, 执行../glibc-2.24/configure

错误提示:

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!

好像是不支持windows平台,进入该链接,懵。
分割线


后来翻着翻着就找到这两个链接:
http://gnuwin32.sourceforge.net/packages/libgw32c.htm
https://sourceforge.net/projects/gnuwin32/files/libgw32c/0.4/
下载 libgw32c-0.4-src.zip

解压,进入src文件夹,./configure 提示:

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


打开configure 文件1545行
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

如果哪位了解的,还望指点一二。

回到 “编译、链接与标准库”

在线用户

用户浏览此论坛: 没有注册用户 和 2 访客