Ubuntu 23.04 C 编译器无法创建可执行文件 - C 编译器无法工作

Ubuntu 23.04 C 编译器无法创建可执行文件 - C 编译器无法工作

该文件包含运行 configure 时编译器产生的任何消息,以便在 configure 出现错误时帮助调试。

它是由 liberasurecode configure - 创建的,由 GNU Autoconf 2.71 生成。调用命令行是

  $ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = Imran
uname -m = x86_64
uname -r = 5.19.0-38-generic
uname -s = Linux
uname -v = #39-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 17 17:33:16 UTC 2023

/usr/bin/uname -p = x86_64
/bin/uname -X     = unknown

/bin/arch              = x86_64
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin/
PATH: /usr/local/bin/
PATH: /usr/sbin/
PATH: /usr/bin/
PATH: /sbin/
PATH: /bin/
PATH: /usr/games/
PATH: /usr/local/games/
PATH: /snap/bin/
PATH: /usr/local/go/bin/


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2991: looking for aux files: config.guess config.sub ltmain.sh missing install-sh compile
configure:3004:  trying ./
configure:3033:   ./config.guess found
configure:3033:   ./config.sub found
configure:3033:   ./ltmain.sh found
configure:3033:   ./missing found
configure:3015:   ./install-sh found
configure:3033:   ./compile found
configure:3145: checking whether to enable maintainer-specific portions of Makefiles
configure:3155: result: no
configure:3181: checking whether make supports nested variables
configure:3199: result: yes
configure:3214: checking for sed
configure:3238: found /usr/bin/sed
configure:3251: result: /usr/bin/sed
configure:3264: checking liberasurecode API version
configure:3267: result: 1
configure:3346: checking for gcc
configure:3367: found /usr/bin/gcc
configure:3378: result: gcc
configure:3731: checking for C compiler version
configure:3740: gcc --version >&5
gcc (Ubuntu 12.2.0-17ubuntu1) 12.2.0
Copyright (C) 2022 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:3751: $? = 0
configure:3740: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/12/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 12.2.0-17ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-12 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-12-Pa930Z/gcc-12-12.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-12-Pa930Z/gcc-12-12.2.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (Ubuntu 12.2.0-17ubuntu1) 
... rest of stderr output deleted ...
configure:3751: $? = 0
configure:3740: gcc -V >&5
gcc: error: unrecognized command-line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3751: $? = 1
configure:3740: gcc -qversion >&5
gcc: error: unrecognized command-line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.
configure:3751: $? = 1
configure:3740: gcc -version >&5
gcc: error: unrecognized command-line option '-version'
gcc: fatal error: no input files
compilation terminated.
configure:3751: $? = 1
configure:3771: checking whether the C compiler works
configure:3793: gcc    conftest.c  >&5
/usr/local/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section `.relr.dyn'
/usr/local/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6
/usr/local/bin/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6
/usr/local/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section `.relr.dyn'
/usr/local/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6
/usr/local/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section `.relr.dyn'
/usr/local/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2
/usr/local/bin/ld: cannot find /lib64/ld-linux-x86-64.so.2
/usr/local/bin/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section `.relr.dyn'
/usr/local/bin/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2
collect2: error: ld returned 1 exit status
configure:3797: $? = 1
configure:3837: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "liberasurecode"
| #define PACKAGE_TARNAME "liberasurecode"
| #define PACKAGE_VERSION "-"
| #define PACKAGE_STRING "liberasurecode -"
| #define PACKAGE_BUGREPORT "tusharsg AT gmail DOT com, kmgreen2 AT gmail DOT com"
| #define PACKAGE_URL "https://github.com/openstack/liberasurecode"
| /* end confdefs.h.  */
| 
| int
| main (void)
| {
| 
|   ;
|   return 0;
| }
configure:3842: error: in `/home/imran/liberasurecode':
configure:3844: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LT_SYS_LIBRARY_PATH_set=
ac_cv_env_LT_SYS_LIBRARY_PATH_value=
ac_cv_env_PKG_CONFIG_LIBDIR_set=
ac_cv_env_PKG_CONFIG_LIBDIR_value=
ac_cv_env_PKG_CONFIG_PATH_set=
ac_cv_env_PKG_CONFIG_PATH_value=
ac_cv_env_PKG_CONFIG_set=
ac_cv_env_PKG_CONFIG_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_path_SED=/usr/bin/sed
ac_cv_prog_ac_ct_CC=gcc
am_cv_make_support_nested_variables=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR=''
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='0'
AM_V='$(V)'
AR=''
AUTOCONF=''
AUTOHEADER=''
AUTOMAKE=''
AWK=''
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CPPFLAGS=''
CSCOPE=''
CTAGS=''
CXX=''
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W=''
DEFS=''
DEPDIR=''
DLLTOOL=''
DOXYGEN=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
ENABLE_DOXYGEN_FALSE=''
ENABLE_DOXYGEN_TRUE=''
ETAGS=''
EXEEXT=''
FGREP=''
FILECMD=''
GCOV_FLAGS=''
GCOV_LDFLAGS=''
GREP=''
HAVE_DOXYGEN=''
HAVE_DOXYGEN_FALSE=''
HAVE_DOXYGEN_TRUE=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
INSTALL_STRIP_PROGRAM=''
LD=''
LDFLAGS=''
LIBERASURECODE_API_VERSION='1'
LIBERASURECODE_VERSION='1.6.3'
LIBERASURECODE_VERSION_INFO='7:3:6'
LIBERASURECODE_VERSION_MAJOR='1'
LIBERASURECODE_VERSION_MICRO='3'
LIBERASURECODE_VERSION_MINOR='6'
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
LT_SYS_LIBRARY_PATH=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO=''
MANIFEST_TOOL=''
MKDIR_P=''
NM=''
NMEDIT=''
OBJDUMP=''
OBJECTS=''
OBJEXT=''
OTOOL64=''
OTOOL=''
PACKAGE=''
PACKAGE_BUGREPORT='tusharsg AT gmail DOT com, kmgreen2 AT gmail DOT com'
PACKAGE_NAME='liberasurecode'
PACKAGE_STRING='liberasurecode -'
PACKAGE_TARNAME='liberasurecode'
PACKAGE_URL='https://github.com/openstack/liberasurecode'
PACKAGE_VERSION='-'
PATH_SEPARATOR=':'
PKG_CONFIG=''
PKG_CONFIG_LIBDIR=''
PKG_CONFIG_PATH=''
RANLIB=''
SED='/usr/bin/sed'
SET_MAKE=''
SHELL='/bin/bash'
STRIP=''
VERSION=''
ac_aux_dir='./'
ac_ct_AR=''
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include=''
am__isrc=''
am__leading_dot=''
am__nodep=''
am__quote=''
am__tar=''
am__untar=''
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p=''
oldincludedir='/usr/include'
pdfdir='${docdir}'
pkgconfigdir=''
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "liberasurecode"
#define PACKAGE_TARNAME "liberasurecode"
#define PACKAGE_VERSION "-"
#define PACKAGE_STRING "liberasurecode -"
#define PACKAGE_BUGREPORT "tusharsg AT gmail DOT com, kmgreen2 AT gmail DOT com"
#define PACKAGE_URL "https://github.com/openstack/liberasurecode"

configure: exit 77

答案1

这可能是问题所在:

/usr/local/bin/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section `.relr.dyn'
/usr/local/bin/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6
/usr/local/bin/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6

您有 的旧副本,位于ld的系统前面。/usr/local/bin/ld$PATH/usr/bin/ld

相关内容