This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Build gcc-4.8.2 error -- gcc-4.8.1/x86_64-unknown-linux-gnu/libgomp


Thanks for your help.
I have compiled it. But I have no idea of the log.
I tried to add "-shared". It succeed to compile.

 
The following is the log
----------------------------
[root@dev libgomp]#  /root/JULY/gcc-4.8.1/build/./gcc/xgcc -L/lib64 -L/usr/lib64 -B/root/JULY/gcc-4.8.1/build/./gcc/ -B/usr/local/gcc-4.8.1/x86_64-redhat-linux/bin/ -B/usr/local/gcc-4.8.1/x86_64-redhat-linux/lib/ -isystem /usr/local/gcc-4.8.1/x86_64-redhat-linux/include -isystem /usr/local/gcc-4.8.1/x86_64-redhat-linux/sys-include    -g -O2   conftest.c  -v
Reading specs from /root/JULY/gcc-4.8.1/build/./gcc/specs
COLLECT_GCC=/root/JULY/gcc-4.8.1/build/./gcc/xgcc
COLLECT_LTO_WRAPPER=/root/JULY/gcc-4.8.1/build/./gcc/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --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/ --disable-multilib --build=x86_64-redhat-linux --enable-languages=c,c++
Thread model: posix
gcc version 4.8.1 (GCC)
COLLECT_GCC_OPTIONS='-L/lib64' '-L/usr/lib64' '-B' '/root/JULY/gcc-4.8.1/build/./gcc/' '-B' '/usr/local/gcc-4.8.1/x86_64-redhat-linux/bin/' '-B' '/usr/local/gcc-4.8.1/x86_64-redhat-linux/lib/' '-isystem' '/usr/local/gcc-4.8.1/x86_64-redhat-linux/include' '-isystem' '/usr/local/gcc-4.8.1/x86_64-redhat-linux/sys-include' '-g' '-O2' '-v' '-mtune=generic' '-march=x86-64'
 /root/JULY/gcc-4.8.1/build/./gcc/cc1 -quiet -v -iprefix /root/JULY/gcc-4.8.1/build/gcc/../lib/gcc/x86_64-redhat-linux/4.8.1/ -isystem /root/JULY/gcc-4.8.1/build/./gcc/include -isystem /root/JULY/gcc-4.8.1/build/./gcc/include-fixed -isystem /usr/local/gcc-4.8.1/x86_64-redhat-linux/include -isystem /usr/local/gcc-4.8.1/x86_64-redhat-linux/sys-include conftest.c -quiet -dumpbase conftest.c -mtune=generic -march=x86-64 -auxbase conftest -g -O2 -version -o /tmp/cco2DRlF.s
GNU C (GCC) version 4.8.1 (x86_64-redhat-linux)
        compiled by GNU C version 4.4.4 20100726 (Red Hat 4.4.4-13), GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1
warning: GMP header version 4.3.2 differs from library version 4.3.1.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory "/usr/local/gcc-4.8.1/x86_64-redhat-linux/include"
ignoring nonexistent directory "/usr/local/gcc-4.8.1/x86_64-redhat-linux/sys-include"
ignoring nonexistent directory "/root/JULY/gcc-4.8.1/build/gcc/../lib/gcc/x86_64-redhat-linux/4.8.1/include"
ignoring nonexistent directory "/root/JULY/gcc-4.8.1/build/gcc/../lib/gcc/x86_64-redhat-linux/4.8.1/include-fixed"
ignoring nonexistent directory "/root/JULY/gcc-4.8.1/build/gcc/../lib/gcc/x86_64-redhat-linux/4.8.1/../../../../x86_64-redhat-linux/include"
ignoring nonexistent directory "/root/JULY/gcc-4.8.1/build/gcc/../lib/gcc/../../lib/gcc/x86_64-redhat-linux/4.8.1/include"
ignoring nonexistent directory "/root/JULY/gcc-4.8.1/build/gcc/../lib/gcc/../../include"
ignoring nonexistent directory "/root/JULY/gcc-4.8.1/build/gcc/../lib/gcc/../../lib/gcc/x86_64-redhat-linux/4.8.1/include-fixed"
ignoring nonexistent directory "/root/JULY/gcc-4.8.1/build/gcc/../lib/gcc/../../lib/gcc/x86_64-redhat-linux/4.8.1/../../../../x86_64-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /root/JULY/gcc-4.8.1/build/./gcc/include
 /root/JULY/gcc-4.8.1/build/./gcc/include-fixed
 /usr/local/include
 /usr/include
End of search list.
GNU C (GCC) version 4.8.1 (x86_64-redhat-linux)
        compiled by GNU C version 4.4.4 20100726 (Red Hat 4.4.4-13), GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1
warning: GMP header version 4.3.2 differs from library version 4.3.1.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 9c1c7d7825f2bb1296264af9c01aea4e
COLLECT_GCC_OPTIONS='-L/lib64' '-L/usr/lib64' '-B' '/root/JULY/gcc-4.8.1/build/./gcc/' '-B' '/usr/local/gcc-4.8.1/x86_64-redhat-linux/bin/' '-B' '/usr/local/gcc-4.8.1/x86_64-redhat-linux/lib/' '-isystem' '/usr/local/gcc-4.8.1/x86_64-redhat-linux/include' '-isystem' '/usr/local/gcc-4.8.1/x86_64-redhat-linux/sys-include' '-g' '-O2' '-v' '-mtune=generic' '-march=x86-64'
 /root/JULY/gcc-4.8.1/build/./gcc/as -v --64 -o /tmp/cchXesE3.o /tmp/cco2DRlF.s
GNU assembler version 2.20.51.0.2 (x86_64-redhat-linux) using BFD version version 2.20.51.0.2-5.11.el6 20091009
COMPILER_PATH=/root/JULY/gcc-4.8.1/build/./gcc/
LIBRARY_PATH=/root/JULY/gcc-4.8.1/build/./gcc/:/lib/../lib64/:/usr/lib/../lib64/:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-L/lib64' '-L/usr/lib64' '-B' '/root/JULY/gcc-4.8.1/build/./gcc/' '-B' '/usr/local/gcc-4.8.1/x86_64-redhat-linux/bin/' '-B' '/usr/local/gcc-4.8.1/x86_64-redhat-linux/lib/' '-isystem' '/usr/local/gcc-4.8.1/x86_64-redhat-linux/include' '-isystem' '/usr/local/gcc-4.8.1/x86_64-redhat-linux/sys-include' '-g' '-O2' '-v' '-mtune=generic' '-march=x86-64'
 /root/JULY/gcc-4.8.1/build/./gcc/collect2 --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o /root/JULY/gcc-4.8.1/build/./gcc/crtbegin.o -L/lib64 -L/usr/lib64 -L/root/JULY/gcc-4.8.1/build/./gcc -L/lib/../lib64 -L/usr/lib/../lib64 /tmp/cchXesE3.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /root/JULY/gcc-4.8.1/build/./gcc/crtend.o /usr/lib/../lib64/crtn.o
/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




------------------ Original ------------------
From:  "Ian Lance Taylor";<iant@google.com>;
Date:  Tue, Oct 22, 2013 00:08 AM
To:  "GHui"<ugiwgh@gmail.com>; 
Cc:  "gcc-help"<gcc-help@gcc.gnu.org>; 
Subject:  Re: Build gcc-4.8.2 error -- gcc-4.8.1/x86_64-unknown-linux-gnu/libgomp



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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]