I'm trying to compile gcc-4.8.2 on powerpc64 to run on powerpc32. The problem is that I don't have sudo privileges on target machine, so I'm installing everything locally. I've all prerequisites preinstalled and gcc/g++-4.1.2. I configure with the following command: ./configure --prefix=/gpfs/data/chernyshov/chroot --enable-languages=c,c++ --enable-shared --with-gmp=/gpfs/data/chernyshov/chroot --with-mpc=/gpfs/data/chernyshov/chroot --with-mpfr=/gpfs/data/chernyshov/chroot During compilation (as far, as I understand, this is libstdc++ compilation), the following command hangs (I waited for 560 minutes for it's completion): /gpfs/data/chernyshov/contrib/gcc-4.8.2/host-powerpc64-unknown-linux-gnu/gcc/xgcc -shared-libgcc -B/gpfs/data/chernyshov/contrib/gcc-4.8.2/host-powerpc64-unknown-linux-gnu/gcc -nostdinc++ -L/gpfs/data/chernyshov/contrib/gcc-4.8.2/powerpc64-unknown-linux-gnu/libstdc++-v3/src -L/gpfs/data/chernyshov/contrib/gcc-4.8.2/powerpc64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/gpfs/data/chernyshov/chroot/powerpc64-unknown-linux-gnu/bin/ -B/gpfs/data/chernyshov/chroot/powerpc64-unknown-linux-gnu/lib/ -isystem /gpfs/data/chernyshov/chroot/powerpc64-unknown-linux-gnu/include -isystem /gpfs/data/chernyshov/chroot/powerpc64-unknown-linux-gnu/sys-include -x c++-header -nostdinc++ -I/gpfs/data/chernyshov/chroot/include -D_GNU_SOURCE -I/gpfs/data/chernyshov/contrib/gcc-4.8.2/powerpc64-unknown-linux-gnu/libstdc++-v3/include/powerpc64-unknown-linux-gnu -I/gpfs/data/chernyshov/contrib/gcc-4.8.2/powerpc64-unknown-linux-gnu/libstdc++-v3/include -I/gpfs/data/chernyshov/contrib/gcc-4.8.2/libstdc++-v3/libsupc++ -O2 -g -std=gnu++0x /gpfs/data/chernyshov/contrib/gcc-4.8.2/libstdc++-v3/include/precompiled/stdc++.h \ -o powerpc64-unknown-linux-gnu/bits/stdc++.h.gch/O2ggnu++0x.gch
How much RAM do you have? Is the machine swapping while running that command? How much memory is the cc1plus process using?
Memory usage is 0.1%. Building host has 32g of RAM.
As a workaround you can configure with --disable-libstdcxx-pch (the generated PCHs are not too useful anyway).
Thanks, Richard and Jonathan (you both gave me the same solution). Hope, this helps. I'll post the results here, once I'll get them.
I've reconfigured gcc, so it wouldn't build precompiled headers and created a gcc-build subfolder (as FAQ said). Now the following command hangs: libtool: compile: /gpfs/data/chernyshov/contrib/gcc-4.8.2/gcc-build/./gcc/xgcc -shared-libgcc -B/gpfs/data/chernyshov/contrib/gcc-4.8.2/gcc-build/./gcc -nostdinc++ -L/gpfs/data/chernyshov/contrib/gcc-4.8.2/gcc-build/powerpc64-unknown-linux-gnu/libstdc++-v3/src -L/gpfs/data/chernyshov/contrib/gcc-4.8.2/gcc-build/powerpc64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/gpfs/data/chernyshov/chroot/powerpc64-unknown-linux-gnu/bin/ -B/gpfs/data/chernyshov/chroot/powerpc64-unknown-linux-gnu/lib/ -isystem /gpfs/data/chernyshov/chroot/powerpc64-unknown-linux-gnu/include -isystem /gpfs/data/chernyshov/chroot/powerpc64-unknown-linux-gnu/sys-include -I/gpfs/data/chernyshov/contrib/gcc-4.8.2/libstdc++-v3/../libgcc -I/gpfs/data/chernyshov/contrib/gcc-4.8.2/gcc-build/powerpc64-unknown-linux-gnu/libstdc++-v3/include/powerpc64-unknown-linux-gnu -I/gpfs/data/chernyshov/contrib/gcc-4.8.2/gcc-build/powerpc64-unknown-linux-gnu/libstdc++-v3/include -I/gpfs/data/chernyshov/contrib/gcc-4.8.2/libstdc++-v3/libsupc++ -std=gnu++11 -D_GLIBCXX_SHARED -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=random.lo -g -O2 -D_GNU_SOURCE -c ../../../../../libstdc++-v3/src/c++11/random.cc -fPIC -DPIC -D_GLIBCXX_SHARED -o random.o This is just a compilation command, so I consider something is wrong in my environment, but I really can't say what.
Hi! According to my what my system administrator told to be, it is impossible to build GCC-4.6 and higher due to kernel incompatibility. I'll close this as invalid.