0

when I configure gcc I got a error message could anyone help me ? plz..

messages..
checking whether the C compiler works... no
configure: error: in `/home/kjs0625/gcc/gcc-13.1.0':
configure: error: C compiler cannot create executables

config.log
gcc (GCC) 13.1.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:4407: $? = 0
configure:4396: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/bin/../libexec/gcc/x86_64-pc-linux-gnu/13.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ./configure --prefix=/root --with-mpc=/root --with-mpfr=/root --with-gmp=/root --with-isl=/root --enable-languages=c,c++ --disable-multilib --with-static-standard-libraries
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.1.0 (GCC)
configure:4407: $? = 0
configure:4396: gcc -V >&5
gcc: error: unrecognized command-line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:4407: $? = 1
configure:4396: gcc -qversion >&5
gcc: error: unrecognized command-line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.
configure:4407: $? = 1
configure:4427: checking whether the C compiler works
configure:4449: gcc    conftest.c  >&5
/usr/bin/ld: cannot find crtbegin.o: No such file or directory
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find -lgcc_s
collect2: error: ld returned 1 exit status
configure:4453: $? = 1
configure:4491: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:4496: error: in `/home/kjs0625/gcc/gcc-13.1.0':
configure:4498: error: C compiler cannot create executables
See `config.log' for more details

plz.. somebody help me TT

1
  • 2
    With which compiler are you compiling your GCC? Commented Dec 9, 2023 at 3:42

1 Answer 1

0
checking whether the C compiler works... no
configure: error: in `/home/kjs0625/gcc/gcc-13.1.0':
configure: error: C compiler cannot create executables

This is the part that you need to solve first. If your current C compiler cannot produce executables, you will never create a working gcc compiler.

To test whether the C compiler can produce executables, you can use a simple "Hello, world" program, or the code that configure uses. You may also be missing a number of libraries:

/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find -lgcc_s

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.