Ubuntu 11.04:安装GCC 4.4.6 [英] Ubuntu 11.04: Installing GCC 4.4.6

查看:242
本文介绍了Ubuntu 11.04:安装GCC 4.4.6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Ubuntu 11.04 64位上安装GCC 4.4.6并遇到一些麻烦。由于该包不包含此发行版,我尝试从源代码构建它。它需要我从包装系统中安装的GMP和MPFR。我建议使用不同的源代码,构建和安装目录。 Target = build = host。



除了 - 前缀我不提供任何配置选项:

  gcc-4.4.6 / configure --prefix = [absolute_path] /install/gcc-4.4.6 


$ b

这些环境变量也被使用:

  CXX = / usr / bin / g ++  -  4.4 
CC = / usr / bin / gcc-4.4

因为(gcc和g ++默认为4.5也安装了)
$ b $ make 产生以下在编译gcc-4.4.6 / libgcc /../ gcc / libgcc2.c时出现错误(似乎在引导编译器建立之后)

/ usr / include / gnu / stubs.h:7:27:error:gnu / stubs-32.h:没有这样的文件或目录

文件名可能表明这是一个64/32位的问题。在64位计算机上构建GCC时需要考虑什么?



config.log表示:

  uname -m = x86_64 
uname -r = 2.6.38-11-generic
uname -s = Linux
uname -v =#50 -Ubuntu SMP Mon Sep 12 21:17:25 UTC 2011
$ b $ / usr / bin / uname -p =未知
/ bin / uname -X =未知

/ bin / arch =未知
/ usr / bin / arch -k =未知
/ usr / convex / getsysinfo =未知
hostinfo =未知
/ bin /机器=未知
/ usr / bin / oslevel =未知
/ bin / universe =未知

路径:/ usr / local / sbin
路径:/ usr / local / bin
路径:/ usr / sbin
路径:/ usr / bin
路径:/ sbin
路径:/ bin



-----------



核心测试



-----------



configure:1563:检查构建系统类型
configure:1581:result :x86_64-unknown-linux-gnu
configure:1616:check主机系统类型
configure:1630:结果:x86_64-unknown-linux-gnu
configure:1638:检查目标系统类型
configure:1652:result:x86_64-unknown-linux-gnu
configure:1696:检查BSD兼容安装
configure:1762:结果:/ usr / bin / install -c
configure:1773:检查ln是否工作
configure :1795:result:yes
configure:1799:检查ln -s是否有效
configure:1803:result:是
configure:3002:检查gcc
configure:3028:结果:/usr/bin/gcc-4.4
configure:3274:检查C编译器版本
configure:3277:/usr/bin/gcc-4.4 --version& 5
gcc -4.4(Ubuntu / Linaro 4.4.5-15ubuntu1)4.4.5
版权所有(C)2010自由软件基金会,
这是自由软件;请参阅复制条件的来源。没有任何b $ b保修;甚至不适用于适销性或针对特定用途的适用性。 解决方案

这个问题是一个缺失的软件包:libc6-dev-i386

apt-file update

apt-file搜索存根-32.h



libc6-dev-i386:/usr/include/gnu/stubs-32.h



apt-get install libc6-dev-i386



解决了它!


I am trying to install GCC 4.4.6 on Ubuntu 11.04 64 bit and having some trouble. As the package does not ship with this distribution I try to build it from source. It needs GMP and MPFR which I installed from the package system. I am using distinct source, build and install directories as advised. Target=build=host.

Except --prefix I do not give any configure options:

gcc-4.4.6/configure --prefix=[absolute_path]/install/gcc-4.4.6

These environment variables are also used:

CXX=/usr/bin/g++-4.4
CC=/usr/bin/gcc-4.4

since (gcc and g++ default to 4.5 which is also installed)

make produces the following error (it seems after the bootstrap compiler was built) when it comes to compile gcc-4.4.6/libgcc/../gcc/libgcc2.c

/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory

The filename might suggest that this is a 64/32 bit issue. Is there something to consider when building GCC on a 64 bit machine?

The config.log says:

uname -m = x86_64
uname -r = 2.6.38-11-generic
uname -s = Linux
uname -v = #50-Ubuntu SMP Mon Sep 12 21:17:25 UTC 2011

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
hostinfo               = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin

-----------

Core tests.

-----------

configure:1563: checking build system type configure:1581: result: x86_64-unknown-linux-gnu configure:1616: checking host system type configure:1630: result: x86_64-unknown-linux-gnu configure:1638: checking target system type configure:1652: result: x86_64-unknown-linux-gnu configure:1696: checking for a BSD-compatible install configure:1762: result: /usr/bin/install -c configure:1773: checking whether ln works configure:1795: result: yes configure:1799: checking whether ln -s works configure:1803: result: yes configure:3002: checking for gcc configure:3028: result: /usr/bin/gcc-4.4 configure:3274: checking for C compiler version configure:3277: /usr/bin/gcc-4.4 --version &5 gcc-4.4 (Ubuntu/Linaro 4.4.5-15ubuntu1) 4.4.5 Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

解决方案

The problem is a missing package: "libc6-dev-i386"

apt-file update

apt-file search stubs-32.h

libc6-dev-i386: /usr/include/gnu/stubs-32.h

apt-get install libc6-dev-i386

That solves it!

这篇关于Ubuntu 11.04:安装GCC 4.4.6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆