Linux 如何在 openSUSE 11.2 (x86_64) 上安装/更新 gcc-4.6?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11034547/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 06:51:02  来源:igfitidea点击:

How to install/update gcc-4.6 on openSUSE 11.2 (x86_64)?

linuxgccopensuselibstdc++

提问by HymanWM

I met an err when I installed JikesRVM, that is,

我在安装 JikesRVM 的时候遇到了一个错误,就是

skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.4/libstdc++.so when searching for -lstdc++

So I am trying to install/update it to a later version. Now, the machine already has

所以我正在尝试将其安装/更新到更高版本。现在机器已经

gcc (SUSE Linux) 4.4.1 [gcc-4_4-branch revision 150839]

I am new to openSUSE, could you help?

我是 openSUSE 的新手,你能帮忙吗?

Thanks!

谢谢!

采纳答案by Dmitri Chubarov

You need to install 32 bit support for the GNU C/C++ compiler since JikesRVM on x86_64 currently supports only the 32 bit architecture.

您需要为 GNU C/C++ 编译器安装 32 位支持,因为 x86_64 上的 JikesRVM 当前仅支持 32 位架构。

To install this support in OpenSuSE 11.2 type

在 OpenSuSE 11.2 类型中安装此支持

    sudo zypper install gcc44-32bit gcc-32bit libstdc++44-devel-32bit

The first two provide runtime support for the C language and the 32-bit version of libgcc, the GCC low level runtime library. The third provides the 32-bit version of libstdc++, both the static import library and the dynamic library. It is the static libstdc++.a that was missing for JikesRVM.

前两个为 C 语言和 32 位版本的 libgcc(GCC 低级运行时库)提供运行时支持。第三个提供32位版本的libstdc++,静态导入库和动态库。JikesRVM 缺少静态 libstdc++.a。

To verify that the 32bit C++ build system is installed correctly you can test it with the following

要验证 32 位 C++ 构建系统是否已正确安装,您可以使用以下命令对其进行测试

    echo "int main(){}" | g++ -x c++ -m32 -

NoteOfficial support for OpenSuSE 11.2 has ended. Evergreen support will be available through 2013. Yet it is reasonable to update to 11.3 or a later version soon.

注意OpenSuSE 11.2 的官方支持已结束。Evergreen 支持将持续到 2013 年。但很快更新到 11.3 或更高版本是合理的。