gcc 빌드 오류

gcc 빌드 오류

gcc를 구성할 때 오류 메시지가 나타납니다. 누구든지 도와줄 수 있나요? 제발..

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

제발..누가 좀 도와주세요 TT

답변1

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

먼저 해결해야 할 부분입니다. 현재 C 컴파일러가 실행 파일을 생성할 수 없으면 사용 가능한 gcc 컴파일러를 생성할 수 없습니다.

C 컴파일러가 실행 파일을 생성할 수 있는지 테스트하려면 간단한 "Hello, world" 프로그램을 사용하거나 코드를 사용할 수 있습니다 configure. 일부 라이브러리가 누락되었을 수도 있습니다.

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

관련 정보