V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
cubepeng
V2EX  ›  iDev

做一个离线小指令语音识别问题,在编译CMU PocketSphinx的时候碰到问题,希望得到帮助

  •  
  •   cubepeng · 2012-12-03 22:33:26 +08:00 · 5790 次点击
    这是一个创建于 4371 天前的主题,其中的信息可能已经有所发展或是发生改变。
    最近做了一个coco2d的小游戏,打算加入语音的功能,几番对比之后打算用CMU pocketSphnix,
    在下载完各种文件之后,我在下载完各种文件之后,编译不成功。
    1.在cmusphinx.sourceforge.net下载完pocketSphinx和SphinxBase这2包文件。
    2.按照www.rajeevan.co.uk/pocketsphinx_in_iphone/的步骤编译这两包文件。

    分解下步骤2,
    1)在 terminal输入GCC 出现 "i686-apple-darwin11-llvm-gcc-4.2: no input files" 说明我是有gcc的
    2)在编译过程中./build_for_iphone.sh simulator 这句话的时候报错
    如下:
    configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... ./install-sh -c -d
    checking for gawk... no
    checking for mawk... no
    checking for nawk... no
    checking for awk... awk
    checking whether make sets $(MAKE)... yes
    checking for i686-apple-darwin-strip... no
    checking for strip... strip
    checking build system type... i386-apple-darwin12.0.0
    checking host system type... i686-apple-darwin
    checking for style of include used by make... GNU
    checking for i686-apple-darwin-gcc... /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
    checking for C compiler default output file name... rm: a.out.dSYM: is a directory

    configure: error: C compiler cannot create executables
    See `config.log' for more details.

    我查看config.log 看不出任何的问题,我猜想是./build_for_iphone.sh,但是我本身对脚本不太熟悉,特来求助。
    4 条回复    1970-01-01 08:00:00 +08:00
    cubepeng
        1
    cubepeng  
    OP
       2012-12-04 15:07:50 +08:00
    高手们啊,给点提示啊!
    BigZ
        2
    BigZ  
       2012-12-04 15:27:59 +08:00
    config.log 贴出来

    configure: error: C compiler cannot create executables 这个字面看,可能是没有写文件的权限
    cubepeng
        3
    cubepeng  
    OP
       2012-12-04 21:19:35 +08:00
    @Bigz
    我的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 sphinxbase configure 0.7, which was
    generated by GNU Autoconf 2.61. Invocation command line was

    $ ./configure --prefix=/Users/Cube/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk --host=i686-apple-darwin --disable-shared --enable-static

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

    hostname = Cube.local
    uname -m = x86_64
    uname -r = 12.0.0
    uname -s = Darwin
    uname -v = Darwin Kernel Version 12.0.0: Sun Jun 24 23:00:16 PDT 2012; root:xnu-2050.7.9~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 12.0.0: Sun Jun 24 23:00:16 PDT 2012; root:xnu-2050.7.9~1/RELEASE_X86_64
    Kernel configured for up to 4 processors.
    2 processors are physically available.
    4 processors are logically available.
    Processor type: i486 (Intel 80486)
    Processors active: 0 1 2 3
    Primary memory available: 4.00 gigabytes
    Default processor set: 110 tasks, 526 threads, 4 processors
    Load average: 1.07, Mach factor: 2.92
    /bin/machine = unknown
    /usr/bin/oslevel = unknown
    /bin/universe = unknown

    PATH: /usr/bin
    PATH: /bin
    PATH: /usr/sbin
    PATH: /sbin
    PATH: /usr/local/bin


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

    configure:1886: checking for a BSD-compatible install
    configure:1942: result: /usr/bin/install -c
    configure:1953: checking whether build environment is sane
    configure:1996: result: yes
    configure:2024: checking for a thread-safe mkdir -p
    configure:2063: result: ./install-sh -c -d
    configure:2076: checking for gawk
    configure:2106: result: no
    configure:2076: checking for mawk
    configure:2106: result: no
    configure:2076: checking for nawk
    configure:2106: result: no
    configure:2076: checking for awk
    configure:2092: found /usr/bin/awk
    configure:2103: result: awk
    configure:2114: checking whether make sets $(MAKE)
    configure:2135: result: yes
    configure:2206: checking for i686-apple-darwin-strip
    configure:2236: result: no
    configure:2246: checking for strip
    configure:2262: found /usr/bin/strip
    configure:2273: result: strip
    configure:2324: checking build system type
    configure:2342: result: i386-apple-darwin12.0.0
    configure:2364: checking host system type
    configure:2379: result: i686-apple-darwin
    configure:2428: checking for style of include used by make
    configure:2456: result: GNU
    configure:2486: checking for i686-apple-darwin-gcc
    configure:2513: result: /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
    configure:2791: checking for C compiler version
    configure:2798: /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 --version >&5
    ./configure: line 2799: /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2: No such file or directory
    configure:2801: $? = 127
    configure:2808: /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -v >&5
    ./configure: line 2809: /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2: No such file or directory
    configure:2811: $? = 127
    configure:2818: /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -V >&5
    ./configure: line 2819: /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2: No such file or directory
    configure:2821: $? = 127
    configure:2844: checking for C compiler default output file name
    configure:2871: /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i686 -pipe -Os -gdwarf-2 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000 -arch i686 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk conftest.c >&5
    ./configure: line 2872: /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2: No such file or directory
    configure:2874: $? = 127
    configure:2912: result:
    configure: failed program was:
    | /* confdefs.h. */
    | #define PACKAGE_NAME "sphinxbase"
    | #define PACKAGE_TARNAME "sphinxbase"
    | #define PACKAGE_VERSION "0.7"
    | #define PACKAGE_STRING "sphinxbase 0.7"
    | #define PACKAGE_BUGREPORT ""
    | /* end confdefs.h. */
    |
    | int
    | main ()
    | {
    |
    | ;
    | return 0;
    | }
    configure:2919: error: C compiler cannot create executables
    See `config.log' for more details.

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

    ac_cv_build=i386-apple-darwin12.0.0
    ac_cv_env_CC_set=set
    ac_cv_env_CC_value=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
    ac_cv_env_CFLAGS_set=set
    ac_cv_env_CFLAGS_value='-arch i686 -pipe -Os -gdwarf-2 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000'
    ac_cv_env_CPPFLAGS_set=
    ac_cv_env_CPPFLAGS_value=
    ac_cv_env_CPP_set=set
    ac_cv_env_CPP_value=/Developer/usr/bin/cpp-4.2
    ac_cv_env_LDFLAGS_set=set
    ac_cv_env_LDFLAGS_value='-arch i686 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk'
    ac_cv_env_LIBS_set=
    ac_cv_env_LIBS_value=
    ac_cv_env_PKG_CONFIG_set=
    ac_cv_env_PKG_CONFIG_value=
    ac_cv_env_SNDFILE_CFLAGS_set=
    ac_cv_env_SNDFILE_CFLAGS_value=
    ac_cv_env_SNDFILE_LIBS_set=
    ac_cv_env_SNDFILE_LIBS_value=
    ac_cv_env_YACC_set=
    ac_cv_env_YACC_value=
    ac_cv_env_build_alias_set=
    ac_cv_env_build_alias_value=
    ac_cv_env_host_alias_set=set
    ac_cv_env_host_alias_value=i686-apple-darwin
    ac_cv_env_target_alias_set=
    ac_cv_env_target_alias_value=
    ac_cv_host=i686-apple-darwin
    ac_cv_path_install='/usr/bin/install -c'
    ac_cv_prog_AWK=awk
    ac_cv_prog_CC=/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
    ac_cv_prog_ac_ct_STRIP=strip
    ac_cv_prog_make_make_set=yes

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

    ACLOCAL='${SHELL} /Users/Cube/Desktop/SphinxCMU/SphinxBase/missing --run aclocal-1.10'
    AMDEPBACKSLASH='\'
    AMDEP_FALSE='#'
    AMDEP_TRUE=''
    AMTAR='${SHELL} /Users/Cube/Desktop/SphinxCMU/SphinxBase/missing --run tar'
    AR=''
    AUTOCONF='${SHELL} /Users/Cube/Desktop/SphinxCMU/SphinxBase/missing --run autoconf'
    AUTOHEADER='${SHELL} /Users/Cube/Desktop/SphinxCMU/SphinxBase/missing --run autoheader'
    AUTOMAKE='${SHELL} /Users/Cube/Desktop/SphinxCMU/SphinxBase/missing --run automake-1.10'
    AWK='awk'
    BUILD_CYTHON_FALSE=''
    BUILD_CYTHON_TRUE=''
    BUILD_DOXYGEN_FALSE=''
    BUILD_DOXYGEN_TRUE=''
    BUILD_PYTHON_FALSE=''
    BUILD_PYTHON_TRUE=''
    CC='/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2'
    CCDEPMODE=''
    CFLAGS='-arch i686 -pipe -Os -gdwarf-2 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -D__IPHONE_OS_VERSION_MIN_REQUIRED=50000'
    CPP='/Developer/usr/bin/cpp-4.2'
    CPPFLAGS=''
    CYGPATH_W='echo'
    DEFS=''
    DEPDIR='.deps'
    DLLTOOL=''
    DSYMUTIL=''
    DUMPBIN=''
    ECHO_C='ECHO_N=''
    ECHO_T=''
    EGREP=''
    EXEEXT=''
    FGREP=''
    FIXED_POINT_FALSE=''
    FIXED_POINT_TRUE=''
    GREP=''
    HAVE_CYTHON=''
    HAVE_DOXYGEN=''
    HAVE_PKGCONFIG=''
    INSTALL_DATA='${INSTALL} -m 644'
    INSTALL_PROGRAM='${INSTALL}'
    INSTALL_SCRIPT='${INSTALL}'
    INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
    LAPACK_LITE_FALSE=''
    LAPACK_LITE_TRUE=''
    LD=''
    LDFLAGS='-arch i686 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk'
    LIBICONV=''
    LIBOBJS=''
    LIBS=''
    LIBTOOL=''
    LIPO=''
    LN_S=''
    LTLIBICONV=''
    LTLIBOBJS=''
    MAKEINFO='${SHELL} /Users/Cube/Desktop/SphinxCMU/SphinxBase/missing --run makeinfo'
    MANIFEST_TOOL=''
    NM=''
    NMEDIT=''
    OBJDUMP=''
    OBJEXT=''
    OTOOL64=''
    OTOOL=''
    PACKAGE='sphinxbase'
    PACKAGE_BUGREPORT=''
    PACKAGE_NAME='sphinxbase'
    PACKAGE_STRING='sphinxbase 0.7'
    PACKAGE_TARNAME='sphinxbase'
    PACKAGE_VERSION='0.7'
    PATH_SEPARATOR=':'
    PKG_CONFIG=''
    PYTHON=''
    PYTHON_CONFIG=''
    RANLIB=''
    SED=''
    SET_MAKE=''
    SHELL='/bin/sh'
    SNDFILE_CFLAGS=''
    SNDFILE_LIBS=''
    STRIP='strip'
    USE_LAPACK_FALSE=''
    USE_LAPACK_TRUE=''
    USE_THREADS_FALSE=''
    USE_THREADS_TRUE=''
    VERSION='0.7'
    YACC=''
    ac_ct_AR=''
    ac_ct_CC=''
    ac_ct_DUMPBIN=''
    ad_backend=''
    ad_files=''
    ad_libs=''
    am__fastdepCC_FALSE=''
    am__fastdepCC_TRUE=''
    am__include='include'
    am__isrc=''
    am__leading_dot='.'
    am__quote=''
    am__tar='${AMTAR} chof - "$$tardir"'
    am__untar='${AMTAR} xf -'
    bindir='${exec_prefix}/bin'
    build='i386-apple-darwin12.0.0'
    build_alias=''
    build_cpu='i386'
    build_os='darwin12.0.0'
    build_vendor='apple'
    datadir='${datarootdir}'
    datarootdir='${prefix}/share'
    docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
    dvidir='${docdir}'
    exec_prefix='NONE'
    host='i686-apple-darwin'
    host_alias='i686-apple-darwin'
    host_cpu='i686'
    host_os='darwin'
    host_vendor='apple'
    htmldir='${docdir}'
    includedir='${prefix}/include'
    infodir='${datarootdir}/info'
    install_sh='$(SHELL) /Users/Cube/Desktop/SphinxCMU/SphinxBase/install-sh'
    libdir='${exec_prefix}/lib'
    libexecdir='${exec_prefix}/libexec'
    localedir='${datarootdir}/locale'
    localstatedir='${prefix}/var'
    mandir='${datarootdir}/man'
    mkdir_p='$(top_builddir)/./install-sh -c -d'
    oldincludedir='/usr/include'
    pdfdir='${docdir}'
    prefix='/Users/Cube/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk'
    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 "sphinxbase"
    #define PACKAGE_TARNAME "sphinxbase"
    #define PACKAGE_VERSION "0.7"
    #define PACKAGE_STRING "sphinxbase 0.7"
    #define PACKAGE_BUGREPORT ""

    configure: exit 77
    mr_pppoe
        4
    mr_pppoe  
       2012-12-06 11:55:18 +08:00   ❤️ 1
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2: No such file or directory 是这个吧
    $ln -s `which gcc` /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 试试?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1123 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 18:39 · PVG 02:39 · LAX 10:39 · JFK 13:39
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.