Building GCC 4.1.2 in CentOS 7 for Maya API development
Following the official guid:
http://help.autodesk.com/cloudhelp/2015/ENU/Maya-SDK/files/Setting_up_your_build_environment_Linux_environments_32bit_and_64bit.htm
I still encountered several errors, and here is the way how I came out.
Here is the steps in the offical guid, and I add my annotation.
Download the gcc 4.1.2 source tar file from http://gcc.gnu.org/install/ // I download the package in this page: https://gcc.gnu.org/releases.html Setup directories:
% mkdir gcc412 // My directory is /home/user0/tools/gcc412
% cd gcc412
% mkdir gcc-build // My directory is /home/user0/tools/gcc412/build Extract the source files:
% tar zxvf gcc-4.1.2.tar.gz // I unzip the package in /home/user0/tools/gcc412/src
% cd gcc-build // for me, it is /home/user0/tools/gcc412/build Configure the compiler. Run the following all on 1 line:
../src/configure --prefix=/opt/gcc412 --program-suffix=412 --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --disable-libunwind-exceptions --enable-__cxa_atexit Build the compiler:
% make -j 2 bootstrap
Note:
0. you need to install glibc-devel.i686, you can run this command:
#yum install glibc-devel.i686 1. It may fail if your display driver is nvidia-x11-drv-340.32-1. You have to update your display driver to nvidia-x11-drv-340.32-2. If you installed nvidia-x11-drv-340.32-1 with Nvidia installer, you can read this post for updating your driver: nvidia-xhttps://www.centos.org/forums/viewtopic.php?t=24137,
And if you installed 1nvidia-x11-drv-340.32-1 with yum, you can use the following commands to update your driver:
#yum clean all
#yum --disablerepo=\* --enablerepo=elrepo install kmod-nvidia nvidia-x11-drv
#yum --disablerepo=\* --enablerepo=elrepo install nvidia-x11-drv-32bit
(See this post for more details: https://www.centos.org/forums/viewtopic.php?f=48&t=48236) 2. It has a compiling error when you build gcc4.1.2:
../gcc/config/i386/linux-unwind.h:138:17: error: field 'info' has incomplete type "
And here is the solution: http://forge.ispras.ru/issues/4295
It means that you need to change the code on line 136 in linux-unwind.h:
struct rt_sigframe {
int sig;
struct siginfo *pinfo;
void *puc;
struct siginfo info;
} *rt_ = context->cfa;
to
struct rt_sigframe {
int sig;
siginfo_t *pinfo;
void *puc;
siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
You can download the modified file in http://files.cnblogs.com/yaoyansi/gcc412_build.zip. 3. It has a link error: .libs/libgcj.so: undefined reference to `__cxa_call_unexpected'.
And here is the solution: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50888, it shows you how to modify libjava/prims.cc.
You can download the modified file in http://files.cnblogs.com/yaoyansi/gcc412_build.zip,
After you modify /home/user0/tools/gcc412/src/libjava/prims.cc, remove /home/user0/tools/gcc412/build/gcc/gcc.o and build it again. 4. It complains:
creating gij
GC Warning: Repeated allocation of very large block (appr. size 1048576000):
May lead to memory leak and poor performance.
GC Warning: Out of Memory! Returning NIL!
GC Warning: Repeated allocation of very large block (appr. size 1048576000):
May lead to memory leak and poor performance.
GC Warning: Out of Memory! Returning NIL!
Exception during runtime initialization
java.lang.OutOfMemoryError
<<No stacktrace available>> In /home/user0/tools/gcc412, I searched all gij.o and gcc.o, and removed them, then built it again.
Install compiler as root:
% su root
% make install // gcc412 is installed in /opt/gcc412/ Note: you can make a symlink in /usr/bin to make the call to gcc easier for the
user:
% cd /usr/bin
% ln -s /opt/gcc412/bin/gcc412 .
% ln -s /opt/gcc412/bin/g++412 .
Building GCC 4.1.2 in CentOS 7 for Maya API development的更多相关文章
- gcc configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0
从svn checkout svn://gcc.gnu.org/svn/gcc/trunk拿了GCC的最新代码,打算编译了学东西习学习C++ 11的东西,结果在configure的时候出现例如以下问题 ...
- GCC升级问题解决:configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.,mpfr2.4.0
如果遇到类似问题: configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.,mpfr2.4.0 解决 ...
- configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+. 一.错误发生情景: 在安装gcc时,执行.c ...
- win10 UWP 等级控件Building a UWP Rating Control using XAML and the Composition API | XAML Brewer, by Diederik Krols
原文:Building a UWP Rating Control using XAML and the Composition API | XAML Brewer, by Diederik Krols ...
- gcc 4.8.3 install centos
http://blog.csdn.net/xlx921027/article/details/17382643
- Centos 7 安装 Xilinx SDSoC Development Environment
1.CentOS版本信息 $ cat /etc/redhat-releaseCentOS Linux release 7.6.1810 (Core) 2.SDSoC下载地址: https://www. ...
- 在CentOS 7.2下升级gcc编译器的版本
默认情况下,CentOS 7.2预装的gcc版本是4.8.x,通过执行命令 gcc -v 可以看到,一般情况下这个版本的编译器已经满足需要了,但是某些特殊的时候为了支持C++更高的特性,需要对gcc编 ...
- 转载:Centos升级gcc
一.检查centos 里面是否安装了gcc g++ 输入命令:rpm -qa|grep gcc*有看到就出来gcc的东西就是装了没有的话就yum install gcc* -y 二.升级gcc 对于C ...
- centos 7升级gcc到10.2.0
安装gcc 由于 Linux 操作系统的自由.开源,在其基础上衍生出了很多不同的 Linux 操作系统,如 CentOS.Ubuntu.Debian 等.这些 Linux 发行版中,大多数都默认装有 ...
随机推荐
- mysql数据库引擎 MyISAM和 InnoDB区别
1. 存储结构 MyISAM:每个MyISAM在磁盘上存储成三个文件.第一个文件的名字以表的名字开始,扩展名指出文件类型..frm文件存储表定义.数据文件的扩展名为.MYD (MYData).索引文件 ...
- 对上次“对字符串进行简单的字符数字统计 探索java中的List功能 ”程序,面向对象的改进
之前的随笔中的程序在思考后发现,运用了太多的static 函数,没有将面向对象的思想融入,于是做出了一下修改: import java.util.ArrayList; import java.util ...
- Linux手动释放缓存的方法
Linux释放内存的命令:syncecho 1 > /proc/sys/vm/drop_caches drop_caches的值可以是0-3之间的数字,代表不同的含义:0:不释放(系统默认值)1 ...
- C#面向接口编程详解(1)——思想基础
我想,对于各位使用面向对象编程语言的程序员来说,“接口”这个名词一定不陌生,但是不知各位有没有这样的疑惑:接口有什么用途?它和抽象类有什么区别?能不能用抽象类代替接口呢?而且,作为程序员,一定经常听到 ...
- 记账类APP竞品分析-挖财与随手记
注:本文更新中. 一.概览 1. 产品名称及版本 l 挖财11.2.0.0 免费版(2016/9/6发布) l 随手记10.2.8免费版(2016/8/22发布) 2. 设备信息 设备型号:i ...
- CSS---解决内容过多就会出文本溢出(显示在区域外面,不换行的情况)
当我们设置我的的div,或者其它文本框固定宽度之后,文本内容过多就会出文本溢出(显示在区域外面,不换行的情况). 这时我们可以使用Css中的几个属于来解.有以下的三个属于可以解决问题: 1,word- ...
- ActiveMQ的初夜
Producer Flow Control mq自己实现了Flow Control(流量控制,默认开启),在mq的版本中,4.x和5.x流量控制实现原理并不相同,前者通过 TCP Flow Contr ...
- touch srceen
/etc/udev/rules.d touchrules reset
- sql server 更新视图的sp
create procedure RefreshAllViewas begin declare @ViewName varchar(250) declare #views cursor for sel ...
- CentOS7 搭建python3 Django环境
yum install gcc yum install make yum install openssl-devel -y yum install sqlite-devel -y wget https ...