有一个可用于纯数据的语音库。它已有10年历史,但是有一个2年前的更新版本,当时被称为功能: http://kaskade.dwds.de/~moocow/mirror/projects/pd/ 我想在macOS Sierra上编译它。我按照构建说明 - 即。在下载和解压缩的目录中运行3个简单的cmd命令,如下所示:
./configure
make
make install
这失败了“错误:无法运行C编译的程序”。以下是运行./configure
:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
Config.log看起来像这样,扣上它需要很长时间:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by ratts configure 0.08, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = Alans-MBP.lan
uname -m = x86_64
uname -r = 16.7.0
uname -s = Darwin
uname -v = Darwin Kernel Version 16.7.0: Wed Oct 4 00:17:00 PDT 2017; root:xnu-3789.71.6~1/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.7.0: Wed Oct 4 00:17:00 PDT 2017; root:xnu-3789.71.6~1/RELEASE_X86_64
Kernel configured for up to 8 processors.
4 processors are physically available.
8 processors are logically available.
Processor type: x86_64h (Intel x86-64h Haswell)
Processors active: 0 1 2 3 4 5 6 7
Primary memory available: 16.00 gigabytes
Default processor set: 478 tasks, 2070 threads, 8 processors
Load average: 4.86, Mach factor: 3.13
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /Users/sinewave440hz/.yarn/bin
PATH: /Users/sinewave440hz/.fastlane/bin
PATH: /Users/sinewave440hz/.nodenv/shims
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /Users/sinewave440hz/Library/Android/sdk/platform-tools
PATH: /Users/sinewave440hz/Library/Android/sdk/tools
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1805: checking for a BSD-compatible install
configure:1861: result: /usr/bin/install -c
configure:1872: checking whether build environment is sane
configure:1915: result: yes
configure:1980: checking for gawk
configure:2010: result: no
configure:1980: checking for mawk
configure:2010: result: no
configure:1980: checking for nawk
configure:2010: result: no
configure:1980: checking for awk
configure:1996: found /usr/bin/awk
configure:2007: result: awk
configure:2018: checking whether make sets $(MAKE)
configure:2039: result: yes
configure:2276: checking for gcc
configure:2292: found /usr/bin/gcc
configure:2303: result: gcc
configure:2541: checking for C compiler version
configure:2548: gcc --version >&5
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
configure:2551: $? = 0
configure:2558: gcc -v >&5
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
configure:2561: $? = 0
configure:2568: gcc -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:2571: $? = 1
configure:2594: checking for C compiler default output file name
configure:2621: gcc conftest.c >&5
configure:2624: $? = 0
configure:2662: result: a.out
configure:2679: checking whether the C compiler works
configure:2689: ./a.out
dyld: mach-o, but built for simulator (not macOS)
./configure: line 2690: 36097 Abort trap: 6 ./$ac_file
configure:2692: $? = 134
configure:2701: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
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_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_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=awk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /Users/sinewave440hz/pd_library/ratts-0.08/config/missing --run aclocal-1.9'
AFLAGS=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='${SHELL} /Users/sinewave440hz/pd_library/ratts-0.08/config/missing --run tar'
AUTOCONF='${SHELL} /Users/sinewave440hz/pd_library/ratts-0.08/config/missing --run autoconf'
AUTOHEADER='${SHELL} /Users/sinewave440hz/pd_library/ratts-0.08/config/missing --run autoheader'
AUTOMAKE='${SHELL} /Users/sinewave440hz/pd_library/ratts-0.08/config/missing --run automake-1.9'
AWK='awk'
BUGREPORT=''
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CYGPATH_W='echo'
DEBUG=''
DEFS=''
DEPDIR=''
DFLAGS=''
ECHO_C='ECHO_N=''
ECHO_T=''
EGREP=''
EXEEXT=''
GREP=''
IFLAGS=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
LD=''
LDFLAGS=''
LFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /Users/sinewave440hz/pd_library/ratts-0.08/config/missing --run makeinfo'
OBJEXT=''
OFLAGS=''
PACKAGE='ratts'
PACKAGE_BUGREPORT='moocow@ling.uni-potsdam.de'
PACKAGE_NAME='ratts'
PACKAGE_STRING='ratts 0.08'
PACKAGE_TARNAME='ratts'
PACKAGE_VERSION='0.08'
PATH_SEPARATOR=':'
PDEXT=''
PD_OBJECT_EXTERNALS=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
VERSION='0.08'
WFLAGS=''
ac_ct_CC='gcc'
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='/Users/sinewave440hz/pd_library/ratts-0.08/config/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='$(mkinstalldirs)'
oldincludedir='/usr/include'
pddir=''
pddocdir=''
pdexternsdir=''
pdfdir='${docdir}'
pdincludedir=''
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE_NAME "ratts"
#define PACKAGE_TARNAME "ratts"
#define PACKAGE_VERSION "0.08"
#define PACKAGE_STRING "ratts 0.08"
#define PACKAGE_BUGREPORT "moocow@ling.uni-potsdam.de"
#define PACKAGE "ratts"
#define VERSION "0.08"
大约10年前没有使用c编译器,我不确定如何继续这里。如何编译macOS?
答案 0 :(得分:1)
每当您遇到./configure
问题时,一个好的开始就是用--help
来唤起它:
$ ./configure --help
[...]
--with-pd-dir=DIR PD base directory (default=PREFIX/pd)
--with-pd-include=DIR PD include directory (default=NONE)
--with-pd-extdir=DIR Directory for PD externals (default=PDDIR/externs)
[...]
$
所以尝试类似:
./configure \
--with-pd=/Applications/Pd.app/Contents/Resources/ \
--with-pd-include=/Applications/Pd.app/Contents/Resources/src \
--with-pd-extdir=~/Library/Pd/