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 发行版中,大多数都默认装有 ...
随机推荐
- Ubuntu 16.04 64位安装insight 6.8
1. apt-get install insight已经不管用. 2. 编译源码死都有问题. 3. 拜拜,用KDBG.
- Nginx配置指定媒体类型文件强制下载
由于业务需要,在点击显示链接(如www.xxx.com/2015-01-15/xxx.png)显示媒体资源(如图片.视频.音频.文档),而在点击下载链接(如www.xxx.com/2015-01-15 ...
- Android HandlerThread 的使用及其Demo (转)
转自http://www.cnblogs.com/hnrainll/p/3597246.html 介绍 首先我们来看看为什么我们要使用HandlerThread?在我们的应用程序当中为了实现同时完成多 ...
- ScriptableObject本地序列化后重启Unity后报The associated script can not be loaded.Please fix any compile errors and assign a valid script的坑
踩坑 做编辑器一些设置序列化存在本地的时候,继承自ScriptableObject的类通过 创建的asset文件. 在重启Unity后查看这个asset发现上面的所有序列化属性丢失,报的错就是 在不存 ...
- maven打包不执行测试用例
在执行maven打包时不需要执行测试用例,使用如下2种方式实现:-DskipTests=true : 不执行测试用例,但编译测试用例类生成相应的class文件至target/test-classes下 ...
- EMV文档:接收到的ATR不在EMV规定范围,终端需要的操作
Required terminal behaviour in the event that a terminal receives characters outside the range allow ...
- gcc编译的四个阶段:预处理,编译,汇编,链接
1:gcc编译的四个阶段:预处理,编译,汇编,链接 #vi file.c #gcc -E file.c -o file.i//-E查看且预处理后停止编译,-o生成目标文件,-i表示已预处理 #gcc ...
- SolidWorks的简单介绍及基本用法
写这博客的动机来源于构建之法微信群里面的的一位老师.sw是一个强大的机械设计制图软件,我记得大一的时候学制图学的3d软件是inventor,而后发现sw用起来更方便更高效,于是就自学了sw,由于是自学 ...
- 用JS实现的类似QQ密码的输入特效
<input ID="_PSD"></input> <script> function passwordText(ID,pd,mark){ ma ...
- Sqlserver 函数
SQL2008 表达式:是常量.变量.列或函数等与运算符的任意组合. 1. 字符串函数 函数 名称 参数 示例 说明 ascii(字符串表达式) select ascii('abc') 返回 97 返 ...