gpt4 book ai didi

gcc - macOS : configure: error: C compiler cannot create executables

转载 作者:行者123 更新时间:2023-12-04 03:13:53 34 4
gpt4 key购买 nike

我试图在我的 Macbookd 上安装 opensmile 并遇到以下错误:

配置:错误:C 编译器无法创建可执行文件

我安装了 Xcode 8.2.1。我已经在 StackOverflow 上尝试了一些关于类似主题的答案,但到目前为止没有任何帮助。

/opt/local/bin/port select --list gcc 给了我:

gcc 的可用版本:
mp-gcc47(事件)
没有任何

这是configure.log:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by openSMILE configure 2.3.0, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ ./configure --without-portaudio --prefix=/Applications/opensmile/inst --enable-static --enable-shared=no

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

hostname = Alexanders-MacBook-Pro.local
uname -m = x86_64
uname -r = 16.4.0
uname -s = Darwin
uname -v = Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64

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

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64
Kernel configured for up to 4 processors.
2 processors are physically available.
4 processors are logically available.
Processor type: x86_64h (Intel x86-64h Haswell)
Processors active: 0 1 2 3
Primary memory available: 8.00 gigabytes
Default processor set: 276 tasks, 1628 threads, 4 processors
Load average: 2.33, Mach factor: 1.72
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
PATH: /Applications/Xcode.app/Contents/Developer/usr/bin
PATH: /Library/Frameworks/Python.framework/Versions/2.7/bin
PATH: /opt/local/bin
PATH: /opt/local/sbin
PATH: /Library/Frameworks/Python.framework/Versions/2.7/bin
PATH: //anaconda/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /opt/X11/bin
PATH: /usr/local/git/bin
PATH: /Library/TeX/texbin
PATH: /Users/Alex/java


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

configure:2496: checking for a BSD-compatible install
configure:2564: result: /usr/bin/install -c
configure:2575: checking whether build environment is sane
configure:2630: result: yes
configure:2781: checking for a thread-safe mkdir -p
configure:2820: result: ./install-sh -c -d
configure:2827: checking for gawk
configure:2843: found /usr/local/bin/gawk
configure:2854: result: gawk
configure:2865: checking whether make sets $(MAKE)
configure:2887: result: yes
configure:2916: checking whether make supports nested variables
configure:2933: result: yes
configure:3110: checking for gcc
configure:3137: result: /usr/local/bin/gcc-4.2
configure:3366: checking for C compiler version
configure:3375: /usr/local/bin/gcc-4.2 --version >&5
i686-apple-darwin11-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
Copyright (C) 2007 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.

couldn't understand kern.osversion `16.4.0'
configure:3386: $? = 0
configure:3375: /usr/local/bin/gcc-4.2 -v >&5
couldn't understand kern.osversion `16.4.0'
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /Volumes/Media/Builds/gcc-5666.3/build/obj/src/configure --disable-checking --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++,fortran --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)
configure:3386: $? = 0
configure:3375: /usr/local/bin/gcc-4.2 -V >&5
gcc-4.2: argument to `-V' is missing
configure:3386: $? = 1
configure:3375: /usr/local/bin/gcc-4.2 -qversion >&5
couldn't understand kern.osversion `16.4.0'
i686-apple-darwin11-gcc-4.2.1: no input files
configure:3386: $? = 1
configure:3406: checking whether the C compiler works
configure:3428: /usr/local/bin/gcc-4.2 -O2 -mfpmath=sse -msse2 -D__STATIC_LINK -DOPENSMILE_BUILD -DBUILD_SVMSMO -DBUILD_SVMSMO -DBUILD_LIBSVM -DBUILD_RNN -DBUILD_WITHOUT_EXPERIMENTAL -lrt -lm -lpthread -lc conftest.c >&5
couldn't understand kern.osversion `16.4.0'
ld: library not found for -lrt
collect2: ld returned 1 exit status
configure:3432: $? = 1
configure:3470: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "openSMILE"
| #define PACKAGE_TARNAME "opensmile"
| #define PACKAGE_VERSION "2.3.0"
| #define PACKAGE_STRING "openSMILE 2.3.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "opensmile"
| #define VERSION "2.3.0"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3475: error: in `/Applications/opensmile':
configure:3477: 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=set
ac_cv_env_CC_value=/usr/local/bin/gcc-4.2
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-O2 -mfpmath=sse -msse2'
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value='-D__STATIC_LINK -DOPENSMILE_BUILD -DBUILD_SVMSMO -DBUILD_SVMSMO -DBUILD_LIBSVM -DBUILD_RNN -DBUILD_WITHOUT_EXPERIMENTAL'
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value='-O2 -mfpmath=sse -msse2'
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-lrt -lm -lpthread -lc'
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_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_install='/usr/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=/usr/local/bin/gcc-4.2
ac_cv_prog_make_make_set=yes
am_cv_make_support_nested_variables=yes

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

ACLOCAL='${SHELL} /Applications/opensmile/missing aclocal-1.15'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='1'
AM_V='$(V)'
ANDROID_LDFLAGS=''
AR=''
AUTOCONF='${SHELL} /Applications/opensmile/missing autoconf'
AUTOHEADER='${SHELL} /Applications/opensmile/missing autoheader'
AUTOMAKE='${SHELL} /Applications/opensmile/missing automake-1.15'
AWK='gawk'
BUILD_SMILExtract_FALSE=''
BUILD_SMILExtract_TRUE=''
CC='/usr/local/bin/gcc-4.2'
CCDEPMODE=''
CFLAGS='-O2 -mfpmath=sse -msse2'
CPP=''
CPPFLAGS='-D__STATIC_LINK -DOPENSMILE_BUILD -DBUILD_SVMSMO -DBUILD_SVMSMO -DBUILD_LIBSVM -DBUILD_RNN -DBUILD_WITHOUT_EXPERIMENTAL'
CXX=''
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS='-O2 -mfpmath=sse -msse2'
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
DLIB=''
DLLTOOL=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EGREP=''
EXEEXT=''
FGREP=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LD=''
LDFLAGS='-lrt -lm -lpthread -lc'
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTLIBOBJS=''
LT_SYS_LIBRARY_PATH=''
MAKEINFO='${SHELL} /Applications/opensmile/missing makeinfo'
MANIFEST_TOOL=''
MKDIR_P='./install-sh -c -d'
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OPENCV_CPPFLAGS=''
OPENCV_LDFLAGS=''
OPENCV_ROOT=''
OTOOL64=''
OTOOL=''
PACKAGE='opensmile'
PACKAGE_BUGREPORT=''
PACKAGE_NAME='openSMILE'
PACKAGE_STRING='openSMILE 2.3.0'
PACKAGE_TARNAME='opensmile'
PACKAGE_URL=''
PACKAGE_VERSION='2.3.0'
PATH_SEPARATOR=':'
PORTAUDIO_CPPFLAGS=''
PORTAUDIO_LDFLAGS=''
PORTAUDIO_ROOT=''
PTHREAD_CC=''
PTHREAD_CFLAGS=''
PTHREAD_LIBS=''
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
VERSION='2.3.0'
ac_ct_AR=''
ac_ct_CC='/usr/local/bin/gcc-4.2'
ac_ct_CXX=''
ac_ct_DUMPBIN=''
acx_pthread_config=''
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='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
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='${SHELL} /Applications/opensmile/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/Applications/opensmile/inst'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

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

/* confdefs.h */
#define PACKAGE_NAME "openSMILE"
#define PACKAGE_TARNAME "opensmile"
#define PACKAGE_VERSION "2.3.0"
#define PACKAGE_STRING "openSMILE 2.3.0"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "opensmile"
#define VERSION "2.3.0"

configure: exit 77

最佳答案

好像librt丢失了,它在 MacOS 上不存在。好像openSMILE目前在该平台上不受官方支持。

无论如何,这是您需要做的事情才能构建它:

➜   sed -i -e 's/-lrt//' buildStandalone.sh
➜ ./buildStandalone.sh

关于gcc - macOS : configure: error: C compiler cannot create executables,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42736091/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com