Glibc-2.3.4编译

$tar xf Glibc2.3.4.tar.bz2

$mkdir build_glibc

$cd build_glibc

../glibc-2.3.4/configure --prefix=/tools \
--disable-profile --enable-add-ons \
--enable-kernel=2.6.0 --with-binutils=/tools/bin \
--without-gd --with-headers=/tools/include \
--without-selinux
报错如下

备注:在configure之前需要向上面那样的步骤那样另外建立一个新目录作为编译的目录,不然可能会看到类似的提示:
$ ./configure
configure: error: you must configure in a separate build directory

出错信息:

checking build system type... i686-pc-linux-gnu

checking host system type... i686-pc-linux-gnu

configure: running configure fragment for add-on nptl

checking sysdep dirs... sysdeps/i386/elf nptl/sysdeps/unix/sysv/linux/i386/i686 nptl/sysdeps/unix/sysv/linux/i386 sysdeps/unix/sysv/linux/i386 nptl/sysdeps/unix/sysv/linux nptl/sysdeps/pthread sysdeps/pthread sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet sysdeps/unix/sysv/i386 nptl/sysdeps/unix/sysv sysdeps/unix/sysv sysdeps/unix/i386 nptl/sysdeps/unix sysdeps/unix sysdeps/posix sysdeps/i386/i686/fpu nptl/sysdeps/i386/i686 sysdeps/i386/i686 sysdeps/i386/i486 nptl/sysdeps/i386/i486 sysdeps/i386/fpu nptl/sysdeps/i386 sysdeps/i386 sysdeps/wordsize-32 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic

checking for a BSD-compatible install... /usr/bin/install -c

checking whether ln -s works... yes

checking for gcc... gcc

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether gcc accepts -g... yes

checking for gcc option to accept ANSI C... none needed

checking how to run the C preprocessor... gcc -E

checking for g++... no

checking for c++... no

checking for gpp... no

checking for aCC... no

checking for CC... no

checking for cxx... no

checking for cc++... no

checking for cl... no

checking for FCC... no

checking for KCC... no

checking for RCC... no

checking for xlC_r... no

checking for xlC... no

checking whether we are using the GNU C++ compiler... no

checking whether g++ accepts -g... no

checking for ranlib... ranlib

checking whether as is GNU as... yes

checking whether ld is GNU ld... yes

checking for as... as

checking version of as... 2.20.1, bad

checking for ld... ld

checking version of ld... 2.20.1, bad

checking for pwd... /bin/pwd

checking for gcc... gcc

checking version of gcc... 4.4.3, ok

checking for gnumake... no

checking for gmake... no

checking for make... make

checking version of make... 3.81, ok

checking for gnumsgfmt... no

checking for gmsgfmt... no

checking for msgfmt... no

checking for makeinfo... no

checking for sed... sed

checking version of sed... 4.2.1, ok

checking for autoconf... no

configure: error:

*** These critical programs are missing or too old: as ld

*** Check the INSTALL file for required versions.

参考解决方法:

$sudo apt-get install g++

$sudo apt-get install autoconf

最后面的那个错误是GCC版本太低或太高了,而我这个太高了

$ld -v

GNU ld (GNU Binutils for Ubuntu) 2.20.1-system.20100303

本来系统就已装有且,版本也不低

修改configure文骗过它

3921 if test -z "$LD"; then
3922 ac_verc_fail=yes
3923 else
3924 # Found it, now check the version.
3925 echo "$as_me:$LINENO: checking version of $LD" >&5
3926 echo $ECHO_N "checking version of $LD... $ECHO_C" >&6
3927 ac_prog_version=`$LD --version 2>&1 | sed -n ‘s/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p‘`
3928 case $ac_prog_version in
3929 ‘‘) ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
3930 2.1[3-9]*|2.2[3-9]*)
3931 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
3932 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
以上红色部分为增加

时间: 2024-07-31 03:32:18

Glibc-2.3.4编译的相关文章

glibc误删处理

在上一篇安装tensorflow的最后,使用python命令编辑"import tensorflow",发现异常,缺少glibc2.16 原因分析,tensorflow0.12.1版本底层依赖glibc-2.16 在http://ftp.gnu.org/gnu/glibc/ 下载glibc,并执行编译安装后(编译安装需要注意不能在glibc的目录下执行),建立软连接.ln -s /opt/glibc-2.16.0-install/lib/libc-2.16.so /lib64/libc

第4阶段——制作根文件系统之编译配置安装busybox(3)

在上一节分析出制作一个最小的根文件系统至少需要: (1)/dev/console(终端控制台, 提供标准输入.标准输出以及标准错误) /dev/null  (为空的话就是/dev/null, 所有写到这个文件中的数据都会被丢弃掉.) (2)init进程的程序(也就是busybox,因为init程序位于busybox中) (3)/etc/inittab(用于init进程读取配置, 然后执行inittab里的指定应用程序) (4)应用程序(被inittab配置文件调用的应用程序) (5)C库(gli

构建Android的交叉编译器、用ndk编译移植

在之前的博文中提到了用arm-none-linux-gnueabi-gcc交叉编译移植程序到Android平台上.也提到了,Android中没有glibc,所以arm-none-linux-gnueabi-gcc编译出来的程序需要在编译时指明连接器,并且将所需要的动态库拷贝到Android机器中. 详见:http://thedevilking.blog.51cto.com/8144260/1364547 所以为了能够更方便的使用交叉编译器移植我们所需要的程序或者库到Android平台上,我们一般

glibc降级尝试失败

https://cnodejs.org/topic/56dc21f1502596633dc2c3dc 这个介绍的是升级的情况.降级,网上说很难.因为用yum是无法降级安装的.我仿造升级的方式,make install,发现链接还是没有改变.重启, 进入/lib64,强行将libc-so-2.12.so 指向 libc.so,(系统中正在运行的版本是libc-so-2.18).重启后,系统出现内核错误的提示,无法重启. 使用另一个版本的glibc: 有的程序编译需要另外的glibc环境,这样做.(

Linux Glibc库严重安全漏洞修复方案通知(腾讯开发者社区)

如何查看当前glibc的版本号? rpm -aq | grep glibc 尊敬的用户: 您好!2015年1月28日, 腾讯云安全情报监测到LinuxGlibc库存在一处严重安全漏洞,可以通过gethostbyname系列函数实现远程代码执行,获取服务器的控制权及Shell权限,漏洞详细点击这里查看. [影响版本]: Glibc2.2 ~ Glibc 2.18 [修复方案]:       1.通过官方渠道自助下载更新,升级到Glibc 2.19及其以上版本.官方已在Glibc 2.19及以上版本

马哥预习视频

马哥预习视频第三天 linux 根文件系统 回顾:linux文件系统的特性,命令的使用帮助,常用的命令 如何使用帮助,内部命令help,外部man 官方文档 自带文档(README,CHANGELOG,INSTALL) 发行版的文档 google Linux 内核:documentation man非常重要:manual,使用手册 章节有很多whatis keyword man # KEYWORD SECTION: NAME: SYNOPSIS [],<>,|,{} .. 控制命令 space

ModSecurity web application firewall (WAF) Research

catalog 0. 引言 1. OWASP ModSecurity Core Rule Set (CRS) Project 2. Installation mod_security for Apache 3. Installation mod_security for nginx 4. Installation mod_security for IIS 5. mod_security Configuration Directives 6. Processing Phases 7. Variab

MySQL服务器时间同步问题处理

1,调整数据库服务器时间 因为应用app摇一摇活动发现过时15分钟,还可以继续摇一摇,问题根源在于数据库服务器时间比应用服务器时间蛮了18分钟,而app取得是数据库的now(),所以才导致的.2个解决办法,1是修改程序代码,不通过数据库now()去取而是通过应用服务器取:2是直接修改数据库的时间.经过权衡之后采纳第二种方案. 1.1,通过date -s修改时间 修改linux服务器时间 date -s 2015-08-03 修改时间: date -s 10:18:00 1.2,手动调整时间使用n

Python学习day8--linux基础(五)

今天讲了三个单元,Linux网络原理及基础设置,软件包的管理以及yum管理RPM包 . Linux网络原理及基础设置 1.ifconfig命令 功能:显示所有正在启动的网卡的详细信息或设定系统中网卡的IP地址. 应用ifconfig命令设定网卡的IP地址: 例如:修改eth0网卡的IP地址为172.18.48.56,子网掩码为255.255.255.128的命令:ifconfig eth0 172.18.48.56 netmask 255.255.255.128 ens33是第一块网卡 inet

【Nagios】

Installation documentation https://assets.nagios.com/downloads/nagioscore/docs/Installing_Nagios_Core_From_Source.pdf#_ga=1.139535539.1081149190.1491445330 解决Perl软件编译问题 [[email protected] yum.repos.d]# echo 'export LC_ALL=C'>> /etc/profile  <##设置