如何从源代码编译我自己的

如何从源代码编译我自己的

本文介绍了如何从源代码编译我自己的 glibc C 标准库并使用它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编译我自己的 glibc.我有一个目录 glibc,其中包含我从 Internet 下载的 glibc 源代码.我从那个目录输入 mkdir ../build-glibc.现在从 build-glibc 目录我输入 ../glibc/configure,它执行配置.现在我不确定如何调用 make.我不能从 glibc 目录调用它,因为它没有配置集,我也不能从 build-glibc 调用它,因为 makefile 不在那个目录中.我该如何解决这个问题?

I am trying to compile my own glibc. I have a directory glibc, which contain the glibc source code I downloaded from the internet. From that directory I typed mkdir ../build-glibc. Now from the build-glibc directory I typed ../glibc/configure, which performed the configuration. Now I'm not sure how to call make. I can't call it from glibc directory since it doesn't have the configuration set, neither I can call it from build-glibc, since makefile is not in that directory. How do I solve this problem?

推荐答案

Makefile 将存在于您的 build-glibc 目录中,如果 configure 脚本成功完成.

The Makefile is going to exist in your build-glibc directory if the configure script finishes successfully.

如果在 configure 期间一切看起来都很顺利,但仍然没有 Makefile,那么你可能错过了一个特性:

If everything seems to have gone smoothly during configure and still no Makefile, then you probably missed an idiosyncrasy:

在为 glibc 做 configure 时,通常希望您提供一个替代的 --prefix,因为安装到默认位置 (/usr/local) 可能会削弱系统.如果你不提供,那么你需要打开--disable-sanity-checks.

While doing a configure for glibc, it is expected that you normally provide an alternative --prefix, because installing to the default location (/usr/local) can potentially cripple the system. If you don't provide one, then you need to switch on --disable-sanity-checks.

如果也不是这种情况,请查找 config.log 文件,并阅读其内容.

If this is not the case either, look for a config.log file, and read its contents.

这篇关于如何从源代码编译我自己的 glibc C 标准库并使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 14:34