首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用glibc线程编译glibc 2.3

用glibc线程编译glibc 2.3
EN

Ask Ubuntu用户
提问于 2020-10-18 20:37:29
回答 1查看 1.1K关注 0票数 0

我正在尝试用ubuntu18.04下的adonlinuxlinux线程(https://ftp.gnu.org/gnu/glibc/glibc-linuxthreads-2.3.tar.gz)编译glibc2.3 (https://ftp.gnu.org/gnu/glibc/glibc-2.3.tar.gz)。自述机构的要求是:

  • gcc (3.2或更高)
  • GNU制作3.79版或更高版本
  • 二进制数2.10.1或更高
  • 2.2内核标头

我是应该安装一个较旧的发行版,还是可以在较新的发行版上完成此任务。任何建议或建议都非常感谢。

我可以使用支持glibc线程的最新版本,即glibc2.5。我选择2.3是因为我已经阅读了自述。

到目前为止,我设法安装了gcc 3.3。但我仍然试图安装gnu 3.x (3.82或3.79)。

代码语言:javascript
复制
CC=gcc-3.3 ./configure --enable-add-ons=linuxthreads --prefix=<mypath>/glibc
loading cache ./config.cache
checking host system type... x86_64-unknown-linux-gnu
checking sysdep dirs... sysdeps/x86_64/elf linuxthreads/sysdeps/unix/sysv/linux/x86_64 linuxthreads/sysdeps/unix/sysv/linux linuxthreads/sysdeps/pthread sysdeps/pthread linuxthreads/sysdeps/unix/sysv linuxthreads/sysdeps/unix linuxthreads/sysdeps/x86_64 sysdeps/unix/sysv/linux/x86_64 sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet sysdeps/unix/sysv sysdeps/unix/x86_64 sysdeps/unix sysdeps/posix sysdeps/x86_64/fpu sysdeps/x86_64 sysdeps/wordsize-64 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 pwd... /bin/pwd
checking build system type... x86_64-unknown-linux-gnu
checking for gcc... gcc-3.3
checking version of gcc-3.3... 3.3.6, ok
checking for gnumake... no
checking for gmake... no
checking for make... no
configure: error: 
*** These critical programs are missing or too old: make
*** Check the INSTALL file for required versions.

make必须在版本4下。

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2020-11-09 02:34:29

最后,我成功地用glibc编译了glibc。我将张贴关于如何做到这一点的步骤:

我使用Ubuntu 6.06.2 LTS (Dapper Drake)

活生生的

修改/etc/apt/source.list .列表

代码语言:javascript
复制
deb http://archive.ubuntu.com/ubuntu dapper main restricted 
deb-src http://archive.ubuntu.com/ubuntu dapper main restricted 
...
deb http://security.ubuntu.com/ubuntu dapper-security main restricted 
deb-src http://security.ubuntu.com/ubuntu dapper-security main restricted

代码语言:javascript
复制
deb http://old-releases.ubuntu.com/ubuntu dapper main restricted
deb-src http://old-releases.ubuntu.com/ubuntu dapper main restricted
...
#deb http://security.ubuntu.com/ubuntu dapper-security main restricted
#deb-src http://security.ubuntu.com/ubuntu dapper-security main restricted

然后

代码语言:javascript
复制
sudo apt-get update
sudo apt-get install gcc g++ make

下载和摘录:

glibc 2.3.6

libin 2.3.6

2.3.6线程2.3.6

将插件linux线程、linuxthreads_db和libidn复制到glibc-2.3.6文件夹

创建一个生成文件夹

代码语言:javascript
复制
mkdir build && cd build
../glibc-2.3.6/configure --prefix=/home/ubuntu/glib --enable-add-ons=libio,libidn,linuxthreads --without-__thread
make
make install

检查libc.so.6是否真的有加注。

运行可共享对象/home/ubuntu/glib/lib/libc.so.6。

你会得到这个输出

linux线程的libc

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1284873

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档