codeviz配置安装

来源:互联网 发布:web即时通讯源码 编辑:程序博客网 时间:2024/05/20 04:29

codeviz源码来自这里

我是在ubuntu 12.04 64bit环境中安装,需要对系统默认的配置文件进行修改

首先ctro.o的32/64 bits兼容问题,不需要兼容32bit的系统,所以将 脚本install_gcc-3.4.6.sh中的

../gcc-3.4.6/configure --prefix=$INSTALL_PATH --enable-shared --enable-languages=c,c++ || exit

改成

../gcc-3.4.6/configure --prefix=$INSTALL_PATH --enable-shared --disable-multilib --enable-languages=c,c++ || exit

opened dep file ../../../gcc-3.4.6/libiberty/cplus-dem.c.cdepn../../../gcc-3.4.6/libiberty/cplus-dem.c:55: error: conflicting types for 'malloc'../../../gcc-3.4.6/libiberty/cplus-dem.c:55: error: conflicting types for 'malloc'../../../gcc-3.4.6/libiberty/cplus-dem.c: In function `code_for_qualifier':../../../gcc-3.4.6/libiberty/cplus-dem.c:630: warning: implicit declaration of function `abort'../../../gcc-3.4.6/libiberty/cplus-dem.c: In function `squangle_mop_up':../../../gcc-3.4.6/libiberty/cplus-dem.c:1154: warning: implicit declaration of function `free'../../../gcc-3.4.6/libiberty/cplus-dem.c: In function `demangle_qualified':../../../gcc-3.4.6/libiberty/cplus-dem.c:3310: warning: implicit declaration of function `atoi'

这个要修改

# PLATFORM=i686-pc-linux-gnu
PLATFORM=x86_64-unknown-linux-gnu

x86_64-unknown-linux-gnu这个目录来源于~/codeviz/compilers/gcc-graph/objdir,如果编译失败,这个下面会生成一个类似x86_64-unknown-linux-gnu的目录,用这个取代原来的。

fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT i
这个是错误是因为gcc的新版本对open添加了一个新参数,找到对应C文件中open函数,最后一个参数填上0777。2处

这个时候需要把脚本的前解压,打patch,以及配置部分注释了

# Untar gcc#rm -rf gcc-graph/objdir 2> /dev/null#mkdir -p gcc-graph/objdir#echo Untarring gcc...#tar -jxvf gcc-3.4.6.tar.bz2 -C gcc-graph || exit# Apply patch#cd gcc-graph/gcc-3.4.6#patch -p1 < ../../gcc-patches/gcc-3.4.6-cdepn.diff#cd ../objdir# Configure and compile#../gcc-3.4.6/configure --prefix=$INSTALL_PATH --enable-shared --disable-multilib --enable-languages=c,c++ || exit#make bootstrap


原创粉丝点击