This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Build gcc-4.8.2 error -- gcc-4.8.1/x86_64-unknown-linux-gnu/libgomp
- From: Ian Lance Taylor <iant at google dot com>
- To: GHui <ugiwgh at gmail dot com>
- Cc: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Mon, 21 Oct 2013 09:08:01 -0700
- Subject: Re: Build gcc-4.8.2 error -- gcc-4.8.1/x86_64-unknown-linux-gnu/libgomp
- Authentication-results: sourceware.org; auth=none
- References: <tencent_270180BB0AB8129145BFDDBC at qq dot com>
On Mon, Oct 21, 2013 at 1:34 AM, GHui <ugiwgh@gmail.com> wrote:
> There is some error, when I build gcc-4.8.2.
> The build configure: ../configure --build=x86_64-redhat-linux --prefix=/usr/local/gcc-4.8.1 --enable-FEATURE=yes --with-gmp=/usr/local/gmp-4.3.2 --with-mpfr=/usr/local/mpfr-2.4.2 --with-mpc=/usr/local/mpc-0.8.1/ --enable-languages=c,c++ --disable-multilib
>
> I have google it. There is lack of that error help. Any help will be appreciated.
> configure: error: C compiler cannot create executables
> See `config.log' for more details.
> make[2]: *** [configure-stage1-target-libgomp] Error 77
> configure:3686: /root/JULY/gcc-4.8.1/build/./gcc/xgcc -B/root/JULY/gcc-4.8.1/build/./gcc/ -B/usr/local/gcc-4.8.1/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gcc-4.8.1/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/gcc-4.8.1/x86_64-unknown-linux-gnu/include -isystem /usr/local/gcc-4.8.1/x86_64-unknown-linux-gnu/sys-include -g -O2 conftest.c >&5
> /usr/lib/../lib64/crt1.o: In function `_start':
> (.text+0x12): undefined reference to `__libc_csu_fini'
> /usr/lib/../lib64/crt1.o: In function `_start':
> (.text+0x19): undefined reference to `__libc_csu_init'
> collect2: error: ld returned 1 exit status
Something is wrong but I don't know what. The file crt1.o is not part
of GCC; it is part of your C library. The functions __libc_csu_init
and __libc_csu_fini are also part of your C library, not GCC.
So for some reason the newly built GCC is able to find crt1.o but
failing to find the right C library. Or something.
Please try running the above command, in the directory
x86_64-unknown-linux-gnu/libgomp, with the -v option. That will show
how xgcc is invoking the linker and may suggest what the problem is.
Ian