我正在尝试在OS X 10.9中编译和安装GCC 4.8.2。 我按照这里的说明( http://gcc.gnu.org/wiki/InstallingGCC )首先运行./contrib/download_prerequesites ,然后从不同于源的目录运行configure和make。 我的构建失败并出现错误:
checking for suffix of object files... configure: error: in `/Users/prokilogrammer/temp/gcc-build482/x86_64-apple-darwin13.0.2/libgcc': configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details.显然,如果正确安装GCC的依赖项(GMP,MPC,MPFR),这个问题就会得到解决( http://gcc.gnu.org/wiki/FAQ#configure_suffix )。 我检查并确保它们已正确安装在/ usr / local / lib和/ usr / local / include目录下。
看看config.log,我看到以下错误:
configure:3565: checking for suffix of object files configure:3587: /Users/prokilogrammer/temp/gcc-build482/./gcc/xgcc -B/Users/prokilogrammer/temp/gcc-build482/./gcc/ -B/usr/local/x86_64-apple-darwin13.0.2/bin/ -B/usr/local/x86_64-apple-darwin13.0.2/lib/ -isystem /usr/local/x86_64-apple-darwin13.0.2/include -isystem /usr/local/x86_64-apple-darwin13.0.2/sys-include -c -g -O2 conftest.c >&5 conftest.c:1:0: internal compiler error: Segmentation fault: 11 /* confdefs.h */ ^ libbacktrace could not find executable to open我不确定segfault是否是由于缺少依赖关系或gcc中的合法问题。
你们经历过类似的问题吗? 有解决方案/解决方法吗?
PS:我也试过没有运气设置LD_LIBRARY_PATH和DYLD_LIBRARY_PATH。
I'm trying to compile and install GCC 4.8.2 in OS X 10.9. I followed the instructions here (http://gcc.gnu.org/wiki/InstallingGCC) to first run ./contrib/download_prerequesites and then ran configure and make from a directory different from the source. My build fails with error:
checking for suffix of object files... configure: error: in `/Users/prokilogrammer/temp/gcc-build482/x86_64-apple-darwin13.0.2/libgcc': configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details.Apparently this problem would be solved if GCC's dependencies (GMP, MPC, MPFR) are properly installed (http://gcc.gnu.org/wiki/FAQ#configure_suffix). I checked and made sure they are correctly installed under /usr/local/lib & /usr/local/include directories.
Looking at config.log, I see the following errors:
configure:3565: checking for suffix of object files configure:3587: /Users/prokilogrammer/temp/gcc-build482/./gcc/xgcc -B/Users/prokilogrammer/temp/gcc-build482/./gcc/ -B/usr/local/x86_64-apple-darwin13.0.2/bin/ -B/usr/local/x86_64-apple-darwin13.0.2/lib/ -isystem /usr/local/x86_64-apple-darwin13.0.2/include -isystem /usr/local/x86_64-apple-darwin13.0.2/sys-include -c -g -O2 conftest.c >&5 conftest.c:1:0: internal compiler error: Segmentation fault: 11 /* confdefs.h */ ^ libbacktrace could not find executable to openI am not sure if the segfault is because of the missing dependencies or a legit issue in gcc.
Have you guys experienced similar problems? Is there a solution/workaround?
PS: I have also tried setting LD_LIBRARY_PATH & DYLD_LIBRARY_PATH without any luck.
最满意答案
我在几台Mavericks机器上构建了GCC 4.8.2,但我选择了一种略有不同的策略。 具体来说,我在构建目录中包含了GMP,MPC,MPFR(以及CLOOG和ISL)的代码。 我使用脚本来准自动化它:
GCC_VER=gcc-4.8.2 tar -xf ${GCC_VER}.tar.bz2 || exit 1 cd ${GCC_VER} || exit cat <<EOF | cloog 0.18.0 tar.gz gmp 5.1.3 tar.xz isl 0.11.1 tar.bz2 mpc 1.0.1 tar.gz mpfr 3.1.2 tar.xz EOF while read file vrsn extn do tar -xf "../$file-$vrsn.$extn" && ln -s "$file-$vrsn" "$file" done完成后:
mkdir gcc-4.8.2-obj cd gcc-4.8.2-obj ../gcc-4.8.2/configure --prefix=$HOME/gcc/v4.8.2 make -j8 bootstrapAFAICR就是它所花费的所有内容,分别为4.8.1和4.8.2。
I've built GCC 4.8.2 on several Mavericks machines, but I chose a slightly different strategy. Specifically, I included the code for GMP, MPC, MPFR (and CLOOG and ISL) in the build directory. I used a script to quasi-automate it:
GCC_VER=gcc-4.8.2 tar -xf ${GCC_VER}.tar.bz2 || exit 1 cd ${GCC_VER} || exit cat <<EOF | cloog 0.18.0 tar.gz gmp 5.1.3 tar.xz isl 0.11.1 tar.bz2 mpc 1.0.1 tar.gz mpfr 3.1.2 tar.xz EOF while read file vrsn extn do tar -xf "../$file-$vrsn.$extn" && ln -s "$file-$vrsn" "$file" doneWith that done:
mkdir gcc-4.8.2-obj cd gcc-4.8.2-obj ../gcc-4.8.2/configure --prefix=$HOME/gcc/v4.8.2 make -j8 bootstrapAFAICR, that was about all it took, with 4.8.1 and 4.8.2.
在OS X 10.9中构建GCC 4.8.2(Building GCC 4.8.2 in OS X 10.9)我正在尝试在OS X 10.9中编译和安装GCC 4.8.2。 我按照这里的说明( http://gcc.gnu.org/wiki/InstallingGCC )首先运行./contrib/download_prerequesites ,然后从不同于源的目录运行configure和make。 我的构建失败并出现错误:
checking for suffix of object files... configure: error: in `/Users/prokilogrammer/temp/gcc-build482/x86_64-apple-darwin13.0.2/libgcc': configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details.显然,如果正确安装GCC的依赖项(GMP,MPC,MPFR),这个问题就会得到解决( http://gcc.gnu.org/wiki/FAQ#configure_suffix )。 我检查并确保它们已正确安装在/ usr / local / lib和/ usr / local / include目录下。
看看config.log,我看到以下错误:
configure:3565: checking for suffix of object files configure:3587: /Users/prokilogrammer/temp/gcc-build482/./gcc/xgcc -B/Users/prokilogrammer/temp/gcc-build482/./gcc/ -B/usr/local/x86_64-apple-darwin13.0.2/bin/ -B/usr/local/x86_64-apple-darwin13.0.2/lib/ -isystem /usr/local/x86_64-apple-darwin13.0.2/include -isystem /usr/local/x86_64-apple-darwin13.0.2/sys-include -c -g -O2 conftest.c >&5 conftest.c:1:0: internal compiler error: Segmentation fault: 11 /* confdefs.h */ ^ libbacktrace could not find executable to open我不确定segfault是否是由于缺少依赖关系或gcc中的合法问题。
你们经历过类似的问题吗? 有解决方案/解决方法吗?
PS:我也试过没有运气设置LD_LIBRARY_PATH和DYLD_LIBRARY_PATH。
I'm trying to compile and install GCC 4.8.2 in OS X 10.9. I followed the instructions here (http://gcc.gnu.org/wiki/InstallingGCC) to first run ./contrib/download_prerequesites and then ran configure and make from a directory different from the source. My build fails with error:
checking for suffix of object files... configure: error: in `/Users/prokilogrammer/temp/gcc-build482/x86_64-apple-darwin13.0.2/libgcc': configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details.Apparently this problem would be solved if GCC's dependencies (GMP, MPC, MPFR) are properly installed (http://gcc.gnu.org/wiki/FAQ#configure_suffix). I checked and made sure they are correctly installed under /usr/local/lib & /usr/local/include directories.
Looking at config.log, I see the following errors:
configure:3565: checking for suffix of object files configure:3587: /Users/prokilogrammer/temp/gcc-build482/./gcc/xgcc -B/Users/prokilogrammer/temp/gcc-build482/./gcc/ -B/usr/local/x86_64-apple-darwin13.0.2/bin/ -B/usr/local/x86_64-apple-darwin13.0.2/lib/ -isystem /usr/local/x86_64-apple-darwin13.0.2/include -isystem /usr/local/x86_64-apple-darwin13.0.2/sys-include -c -g -O2 conftest.c >&5 conftest.c:1:0: internal compiler error: Segmentation fault: 11 /* confdefs.h */ ^ libbacktrace could not find executable to openI am not sure if the segfault is because of the missing dependencies or a legit issue in gcc.
Have you guys experienced similar problems? Is there a solution/workaround?
PS: I have also tried setting LD_LIBRARY_PATH & DYLD_LIBRARY_PATH without any luck.
最满意答案
我在几台Mavericks机器上构建了GCC 4.8.2,但我选择了一种略有不同的策略。 具体来说,我在构建目录中包含了GMP,MPC,MPFR(以及CLOOG和ISL)的代码。 我使用脚本来准自动化它:
GCC_VER=gcc-4.8.2 tar -xf ${GCC_VER}.tar.bz2 || exit 1 cd ${GCC_VER} || exit cat <<EOF | cloog 0.18.0 tar.gz gmp 5.1.3 tar.xz isl 0.11.1 tar.bz2 mpc 1.0.1 tar.gz mpfr 3.1.2 tar.xz EOF while read file vrsn extn do tar -xf "../$file-$vrsn.$extn" && ln -s "$file-$vrsn" "$file" done完成后:
mkdir gcc-4.8.2-obj cd gcc-4.8.2-obj ../gcc-4.8.2/configure --prefix=$HOME/gcc/v4.8.2 make -j8 bootstrapAFAICR就是它所花费的所有内容,分别为4.8.1和4.8.2。
I've built GCC 4.8.2 on several Mavericks machines, but I chose a slightly different strategy. Specifically, I included the code for GMP, MPC, MPFR (and CLOOG and ISL) in the build directory. I used a script to quasi-automate it:
GCC_VER=gcc-4.8.2 tar -xf ${GCC_VER}.tar.bz2 || exit 1 cd ${GCC_VER} || exit cat <<EOF | cloog 0.18.0 tar.gz gmp 5.1.3 tar.xz isl 0.11.1 tar.bz2 mpc 1.0.1 tar.gz mpfr 3.1.2 tar.xz EOF while read file vrsn extn do tar -xf "../$file-$vrsn.$extn" && ln -s "$file-$vrsn" "$file" doneWith that done:
mkdir gcc-4.8.2-obj cd gcc-4.8.2-obj ../gcc-4.8.2/configure --prefix=$HOME/gcc/v4.8.2 make -j8 bootstrapAFAICR, that was about all it took, with 4.8.1 and 4.8.2.
发布评论