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 发行版中,大多数都默认装有 ...
随机推荐
- WebStorm里面配置运行React Native的方案
以前开发react native项目总是需要打开WebStorm编写代码,Xcode跑项目.显得有点多余. 今天教大家如何直接使用WebStorm这个IDE直接完成编码+运行项目工作.这样就可以不用打 ...
- LayaAir引擎——(五)
LayaAir引擎——关于地图详解 所需要的软件: LayaAirIDE1.0.2版本 在LayaAir引擎中与地图相关的类: 1.laya.map.TiledMap TiledMap类 地图以层 ...
- XML代码生成器——XMLFACTORY 简介(二)
XML代码生成器——XMLFACTORY 简介(二) 因为春节和项目上线的原因,离写上一篇文章的时间已经好久了. 不知道是事情太多了,还是自已效率太低了.总之是时间不够用. 哎,苦逼的程序员 ...
- [驱动开发] struct _LDR_DATA_TABLE_ENTRY
@Windows XP Professional Service Pack 3 (x86) (5.1, Build 2600) lkd> dt -b _LDR_DATA_TABLE_ENTRY ...
- PC端和手机访问调用不同的页面,JS和PHP不同方法
js方法: var urlqr = location.href; urlqr = urlqr.replace(/iphoneF_/, "pc")这里写正则替换页面地址 if( ...
- C++模板元编程(C++ template metaprogramming)
实验平台:Win7,VS2013 Community,GCC 4.8.3(在线版) 所谓元编程就是编写直接生成或操纵程序的程序,C++ 模板给 C++ 语言提供了元编程的能力,模板使 C++ 编程变得 ...
- Ported my old SPH solver in Unity
Here is the link to the web player version, http://www-scf.usc.edu/~taian/pages/sph/builds/12212014/ ...
- JDBC连接数据库演示
今天重新学习了JDBC连接数据库,使用的数据库是Oracle,在运行前已经手动建立了一张t_user表,建表信息如下: create table t_user( card_id ) primary k ...
- web开发实战--图片裁剪和上传
前言: 最近的开发中, 有一个上传头像的任务. 由于头像本身的特殊性, 其一般流程为选择图片, 编辑裁剪区域, 再继而上传图片操作. 看似简单的东西, 实则是挺麻烦的一件事. 借助这次开发机会, 来具 ...
- 2017 年值得一瞥的 JavaScript 相关技术趋势
跨年前两天,Dan Abramov在Twitter上提了一个问题: JS社区毫不犹豫的抛出了它们对于新技术的预期与期待,本文内容也是总结自Twitter的回复,按照流行度降序排列.有一个尚未确定的小点 ...