2012-10-23 132 views
2

我在安裝Debian擠壓gcc 4.6.3時遇到問題。 4.4目前已安裝,但我需要4.6.x才能運行php-hiphop。我試過尋找類似的問題,但沒有發現任何與我有錯誤。GCC 4.6.3無法安裝Debian

我安裝,使用以下指令:

wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.6.3/gcc-4.6.3.tar.gz 
tar -xzvf gcc-4.6.3.tar.gz 
cd gcc-4.6.3 
./contrib/download_prerequisites 
cd .. 
mkdir objdir 
cd objdir 
£PWD/../gcc-4.6.3/configure --prefix=/opt/gcc-4.6.3 
make 
make install 

make命令一切似乎一個很好的20分鐘或更長時間是想得很好,那麼,BLAMO!這會彈出:

make[5]: Entering directory `/root/objdir/x86_64-unknown-linux-gnu/32/libgcc' 
# If this is the top-level multilib, build all the other 
# multilibs. 
/root/objdir/./gcc/xgcc -B/root/objdir/./gcc/ -B/opt/gcc-4.6.3/x86_64-unknown-linux-gnu/bin/ -B/opt/gcc-4.6.3/x86_64-unknown-linux-gnu/lib/ -isystem /opt/gcc-4.6.3/x86_64-unknown-linux-gnu/include -isystem /opt/gcc-4.6.3/x86_64-unknown-linux-gnu/sys-include -g -O2 -m32 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector -I. -I. -I../../.././gcc -I/root/objdir/../gcc-4.6.3/libgcc -I/root/objdir/../gcc-4.6.3/libgcc/. -I/root/objdir/../gcc-4.6.3/libgcc/../gcc -I/root/objdir/../gcc-4.6.3/libgcc/../include -I/root/objdir/../gcc-4.6.3/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c /root/objdir/../gcc-4.6.3/libgcc/../gcc/libgcc2.c \ 
      -fvisibility=hidden -DHIDE_EXPORTS 
In file included from /usr/include/features.h:378:0, 
       from /usr/include/stdio.h:28, 
       from /root/objdir/../gcc-4.6.3/libgcc/../gcc/tsystem.h:87, 
       from /root/objdir/../gcc-4.6.3/libgcc/../gcc/libgcc2.c:29: 
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory 
compilation terminated. 
make[5]: *** [_muldi3.o] Error 1 
make[5]: Leaving directory `/root/objdir/x86_64-unknown-linux-gnu/32/libgcc' 
make[4]: *** [multi-do] Error 1 
make[4]: Leaving directory `/root/objdir/x86_64-unknown-linux-gnu/libgcc' 
make[3]: *** [all-multi] Error 2 
make[3]: Leaving directory `/root/objdir/x86_64-unknown-linux-gnu/libgcc' 
make[2]: *** [all-stage1-target-libgcc] Error 2 
make[2]: Leaving directory `/root/objdir' 
make[1]: *** [stage1-bubble] Error 2 
make[1]: Leaving directory `/root/objdir' 
make: *** [all] Error 2 
[email protected]:~/objdir# 

我看到什麼導致它,stubs.h無法找到,但我要如何解決這個問題?有我需要的單獨的圖書館,還是有其他問題?提前致謝。

編輯下載multilib依賴關係排除了上述錯誤。 make命令運行了5個小時,是5個小時左右,然後崩潰了另一個與拉鍊和罐子有關的錯誤,我很難過。

checking for a BSD-compatible install... /usr/bin/install -c 
checking whether build environment is sane... yes 
checking for a thread-safe mkdir -p... /bin/mkdir -p 
checking for gawk... mawk 
checking whether make sets $(MAKE)... yes 
checking for style of include used by make... GNU 
checking dependency style of /root/objdir/./gcc/xgcc -B/root/objdir/./gcc/ -B/opt/gcc-4.6.3/x86_64-unknown-linux-gnu/bin/ -B/opt/gcc-4.6.3/x86_64-unknown-linux-gnu/lib/ -isystem /opt/gcc-4.6.3/x86_64-unknown-linux-gnu/include -isystem /opt/gcc-4.6.3/x86_64-unknown-linux-gnu/sys-include ... gcc3 
checking dependency style of /root/objdir/./gcc/xgcc -shared-libgcc -B/root/objdir/./gcc -nostdinc++ -L/root/objdir/x86_64-unknown-linux-gnu/libstdc++-v3/src -L/root/objdir/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/opt/gcc-4.6.3/x86_64-unknown-linux-gnu/bin/ -B/opt/gcc-4.6.3/x86_64-unknown-linux-gnu/lib/ -isystem /opt/gcc-4.6.3/x86_64-unknown-linux-gnu/include -isystem /opt/gcc-4.6.3/x86_64-unknown-linux-gnu/sys-include ... gcc3 
checking for x86_64-unknown-linux-gnu-as... /root/objdir/./gcc/as 
checking for x86_64-unknown-linux-gnu-ld... /root/objdir/./gcc/collect-ld 
checking for x86_64-unknown-linux-gnu-ar... ar 
checking for x86_64-unknown-linux-gnu-ranlib... ranlib 
checking for x86_64-unknown-linux-gnu-dlltool... dlltool 
checking for gawk... (cached) mawk 
checking for jar... no 
checking for fastjar... no 
checking for gjar... no 
checking for zip... no 
checking for unzip... unzip 
configure: error: cannot find neither zip nor jar, cannot continue 
make[1]: *** [configure-target-libjava] Error 1 
make[1]: Leaving directory `/root/objdir' 
make: *** [all] Error 2 
[email protected]:~/objdir# 

回答

3

我認爲你需要multilib支持,因爲你試圖在64位機器上安裝32位庫。

+0

這對stubs-32.h中的整個32是有意義的。我現在就試試,謝謝。 – boundless08

+0

+1也幫助我... –

3

感謝註銷解決我最初的問題,我整理了一個後來遇到的問題。需要安裝unzip6.0和zip3.0才能完成make操作。請按照以下命令:

wget ftp://ftp.info-zip.org/pub/infozip/src/unzip60.tgz 
gunzip unzip60.tgz 
tar -xvf unzip60.tar 
cd unzip60 
make -f unix/Makefile generic 
make -f unix/Makefile install 

與同爲zip3.0

wget ftp://ftp.info-zip.org/pub/infozip/src/zip30.tgz 
gunzip zip30.tgz 
tar -xvf zip30.tar 
cd zip30 
make -f unix/Makefile generic 
make -f unix/Makefile install 
+0

這工作完美;做LFS,所以我沒有包管理器。 –

0

作爲一個側面說明,以boundless08的第二個問題和答案:在Debian(大概Ubuntu的)安裝拉鍊似乎是不夠的:

sudo apt-get install zip 

(我會寫一個評論,但我似乎不具有足夠的口碑!)

0

編譯時使用下面的選項禁用對GCC配置的multilib支持。

$ ./configure --prefix=$GCC_PREFIX \ 
    --enable-shared \ 
    --disable-multilib \