Bug 60982 - Very long compilation of precompiled headers
Summary: Very long compilation of precompiled headers
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: pch (show other bugs)
Version: 4.8.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-28 06:14 UTC by Yuriy Chernyshov
Modified: 2014-05-28 13:40 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuriy Chernyshov 2014-04-28 06:14:43 UTC
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
Comment 1 Jonathan Wakely 2014-04-28 07:48:46 UTC
How much RAM do you have? Is the machine swapping while running that command? How much memory is the cc1plus process using?
Comment 2 Yuriy Chernyshov 2014-04-28 07:59:56 UTC
Memory usage is 0.1%.
Building host has 32g of RAM.
Comment 3 Richard Biener 2014-04-28 09:30:56 UTC
As a workaround you can configure with --disable-libstdcxx-pch (the generated
PCHs are not too useful anyway).
Comment 4 Yuriy Chernyshov 2014-04-28 09:32:42 UTC
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.
Comment 5 Yuriy Chernyshov 2014-04-29 18:10:40 UTC
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.
Comment 6 Yuriy Chernyshov 2014-05-28 13:40:11 UTC
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.