安装 gcc-4.1.2
来源:互联网 发布:梦貂蝉11神兽进阶数据 编辑:程序博客网 时间:2024/09/21 06:17
转自:http://www.scroll-lock.eu/index.php?option=com_content&view=article&id=244:compile-gcc-412-on-ubuntu-1004&catid=1:scroll-blog
I was trying to compile gcc-4.1.2 on Ubuntu x64 10.04 because Maya 2011 requires this version of gcc to be used to compile plugins.
http://download.autodesk.com/us/maya/2011help/index.html?url=./files/Setting_up_your_build_environment_Linux_compiler_requirement.htm,topicNumber=d0e677620
There were several issues I encountered, so here is the process that someone needs to do in order to compile it correctly.
1. You will need to install texinfo
sudo apt-get install texinfo
2. Download gcc-4.1.2 from http://gcc.gnu.org/
3. Create a directory called gcc412
mkdir gcc412
4. CD into it
cd gcc412
5. Make another directory inside called gcc-build. This is important and is almost never mentioned but you need to have two separate directory trees. One of compiling and one for the source.
mkdir gcc-build
6. Copy the gcc archive to the gcc412 directory and unpack the archive there. Not in the build one.
cp gcc-4.1.2.tar.bz2 .../gcc412
cd .../gcc412
tar jxvf gcc-4.1.2.tar.bz2
7. Go to the build directory
cd gcc-build
8. Now you need to configure . In the Maya documentation they say you need to do this:
../gcc-4.1.2/configure --prefix=/opt/gcc412 --program-suffix=412 --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --disable-libunwind-exceptions --enable-__cxa_atexit
But I was having problems if I use these options only so for me this worked instead:
../gcc-4.1.2/configure --prefix=/opt/gcc412 --program-suffix=412 --enable-shared --enable-threads=posix --enable-checking=release --disable-libunwind-exceptions --enable-__cxa_atexit --disable-multilib
Notice the --disable-multilib flag and the missing --with-system-zlib flag.
9. Now because gcc-4.1.2 has a bug and thinks that versions of makeinfo greater than 10 are actually lower than 9 we need to do something manually. In our case if you run makeinfo --version you will see which version was installed by the first step, but it's usually version 13. Open the Makefile that was created by the ./configure and edit the line where it says:
MAKEINFO = /opt/YOURUSERNAME/newlib-1.15.0/missing makeinfo
and change it to:
MAKEINFO = makeinfo
Save the file.
10. After the configuration run make
make -j 2 bootstrap
11. Run make install as root after that.
su root
make install
12. Then for convenience you can link the freshly compiled gcc412 to point to usr/bin
ls -s /opt/gcc412/bin/gcc412 /usr/bin/gcc412
I hope this will be in help of somebody else that is struggling with compiling it.
- gcc-4.1.2安装
- 安装 gcc-4.1.2
- RedHat安装Gcc.4.1.2
- 如何安装GCC编译器-如GCC 4.1.2
- Ubuntu下编译安装GCC-4.1.2
- Deepin Linux 12.06安装gcc-4.1.2
- 安装gcc-4.1.0
- gcc-4.1安装
- gcc 4.4.2 安装
- 安装gcc 4.7.2
- gcc 4.8.2 安装
- 安装GCC-4.1.1,问题解决
- Ubuntu 11.04安装gcc 4.5.2以下版本[比如gcc 4.1.1]
- CentOS6.2 安装gcc-c++
- rhel6.2下安装gcc
- GCC-4.8.2 的安装
- GCC、GCC-C++安装
- 如何在Linux上面安装GCC 4.1.2
- Ubuntu设置软件源
- 最短路径Dijkstar算法和Floyd算法详解(c语言版)
- Mac的反编译工具一:otool (objdump工具的OSX对应工具)。
- Transport Stream(1) Beginning
- 黑马程序员_内部类
- 安装 gcc-4.1.2
- ubuntu共享android蓝牙热点
- 3Sum Closest -- LeetCode
- 影响力 读后感
- 397高校毕业设计选题
- 支持向量机推导
- html+css----css布局方式
- linux使用rsync客户端与服务端同步目录进行备份
- ASP.NET(C#)后台安全登陆代码(防XSS攻击\万能密码漏洞)