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

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

我相信这个问题在这个论坛上已经被问过很多次了,但我还是问这个问题,因为我的背景不同。我试图安装Julius 语音识别在我的 Windows 10 PC 上。当然,我首先必须安装 Linux(Ubuntu)。然后我安装了所有构建必需的库,并将 git 存储库克隆到mnt/c/Users/hp/source/repos/julius。然后我移动到所述julius目录并尝试使用命令对其进行配置./configure --enable-words-int

Linux 命令窗口显示以下内容:

root@LAPTOP-8U352SVT:/mnt/c/Users/hp/source/repos/julius# ./configure --enable-words-int  
checking build system type... x86_64-unknown-linux-gnu  
checking host system type... x86_64-unknown-linux-gnu  
checking host specific optimization flag... support/cflags.x86_64-unknown-linux-gnu  
checking for gcc... gcc  
checking whether the C compiler works... no  
configure: error: in '/mnt/c/Users/hp/source/repos/julius':  
configure: error: C compiler cannot create executables  
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 configure, which was  
generated by GNU Autoconf 2.69.  Invocation command line was  
  $ ./configure --enable-words-int  
## --------- ##  
## Platform. ##  
## --------- ##  
hostname = LAPTOP-8U352SVT  
uname -m = x86_64  
uname -r = 5.15.90.1-microsoft-standard-WSL2  
uname -s = Linux  
uname -v = #1 SMP Fri Jan 27 02:56:13 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: /usr/lib/wsl/lib  
PATH: /mnt/c/Program   Files/WindowsApps/CanonicalGroupLimited.Ubuntu22.04LTS_2204.2.47.0_x64__79rhkp1fndgsc  
PATH: /mnt/c/Users/hp/AppData/Local/Programs/Python/Python310  
PATH: /mnt/c/Program Files (x86)/Common Files/Oracle/Java/javapath  
PATH: /mnt/c/ProgramData/Oracle/Java/javapath  
PATH: /mnt/c/Program Files (x86)/Intel/iCLS Client/  
PATH: /mnt/c/Program Files/Intel/iCLS Client/  
PATH: /mnt/c/WINDOWS/system32  
PATH: /mnt/c/WINDOWS  
PATH: /mnt/c/WINDOWS/System32/Wbem  
PATH: /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/  
PATH: /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL  
PATH: /mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL  
PATH: /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT  
PATH: /mnt/c/Program Files/Intel/Intel(R) Management Engine Components/IPT  
PATH: /mnt/c/WINDOWS/System32/OpenSSH/  
PATH: /mnt/c/MinGW/bin  
PATH: /mnt/c/Users/hp/AppData/Local/Microsoft/WindowsApps  
PATH: /mnt/c/Program Files/MATLAB/R2021b/runtime/win64  
PATH: /mnt/c/Program Files/MATLAB/R2021b/bin  
PATH: /mnt/c/Users/hp/AppData/Local/Programs/Python/Python310/Scripts  
PATH: /mnt/c/Program Files/Microsoft SQL Server/150/Tools/Binn/  
PATH: /mnt/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn/  
PATH: /mnt/c/Program Files/dotnet/  
PATH: /mnt/c/Users/hp/.dotnet/tools  
PATH: /snap/bin  
## ----------- ##  
## Core tests. ##  
## ----------- ##  
configure:1643: checking build system type  
configure:1656: result: x86_64-unknown-linux-gnu  
configure:1674: checking host system type  
configure:1686: result: x86_64-unknown-linux-gnu  
configure:1704: checking host specific optimization flag  
configure:1710: result: support/cflags.x86_64-unknown-linux-gnu  
configure:1765: checking for gcc  
configure:1781: found /usr/bin/gcc  
configure:1791: result: gcc  
configure:2001: checking for C compiler version  
configure:2010: gcc --version >&5  
gcc (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0  
Copyright (C) 2021 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:2021: $? = 0  
configure:2010: gcc -v >&5  
Using built-in specs.  
COLLECT_GCC=gcc  
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/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 11.3.0-1ubuntu1~22.04.1' -- with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --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-bootstrap --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-11-aYxV0E/gcc-11-11.3.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-aYxV0E/gcc-11-11.3.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix  
Supported LTO compression algorithms: zlib zstd  
gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04.1)   
... rest of stderr output deleted ...  
configure:2021: $? = 0  
configure:2010: gcc -V >&5  
gcc: error: unrecognized command-line option '-V'  
gcc: fatal error: no input files  
compilation terminated.  
configure:2021: $? = 1  
configure:2010: gcc -qversion >&5  
gcc: error: unrecognized command-line option '-qversion'; did you mean '--version'?  
gcc: fatal error: no input files  
compilation terminated.  
configure:2021: $? = 1  
configure:2038: checking whether the C compiler works  
configure:2057: gcc -O6 -fomit-frame-pointer  
   conftest.c  >&5  
gcc: error: unrecognized command-line option '-fomit-frame-pointer  
'; did you mean '-fomit-frame-pointer'?  
configure:2061: $? = 1  
configure:2098: 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:2102: error: in `/mnt/c/Users/hp/source/repos/julius':  
configure:2104: error: C compiler cannot create executables  
See `config.log' for more details  

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

ac_cv_build=x86_64-unknown-linux-gnu  
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_host=x86_64-unknown-linux-gnu  
ac_cv_prog_ac_ct_CC=gcc  

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

CC='gcc'  
CFLAGS='-O6 -fomit-frame-pointer  
'  
CPP=''  
CPPFLAGS=''  
DEFS=''   
ECHO_C=''  
ECHO_N='-n'  
ECHO_T=''  
EXEEXT=''  
INSTALL_DATA=''  
INSTALL_PROGRAM=''  
INSTALL_SCRIPT=''   
LDFLAGS=''  
LIBOBJS=''  
LIBS=''  
LTLIBOBJS=''  
OBJEXT=''  
PACKAGE_BUGREPORT=''  
PACKAGE_NAME=''  
PACKAGE_STRING=''  
PACKAGE_TARNAME=''  
PACKAGE_URL=''  
PACKAGE_VERSION=''  
PATH_SEPARATOR=':'  
RM=''  
SHELL='/bin/bash'  
ac_ct_CC='gcc'   
bindir='${exec_prefix}/bin'  
build='x86_64-unknown-linux-gnu'  
build_alias=''  
build_cpu='x86_64'  
build_os='linux-gnu'  
build_vendor='unknown'  
datadir='${datarootdir}'   
datarootdir='${prefix}/share'  
docdir='${datarootdir}/doc/${PACKAGE}'  
dvidir='${docdir}'  
exec_prefix='NONE'  
host='x86_64-unknown-linux-gnu'  
host_alias=''  
host_cpu='x86_64'  
host_os='linux-gnu'  
host_vendor='unknown'  
htmldir='${docdir}'  
includedir='${prefix}/include'  
infodir='${datarootdir}/info'  
libdir='${exec_prefix}/lib'  
libexecdir='${exec_prefix}/libexec'  
localedir='${datarootdir}/locale'  
localstatedir='${prefix}/var'  
mandir='${datarootdir}/man'  
oldincludedir='/usr/include'  
pdfdir='${docdir}'  
prefix='NONE'  
program_transform_name='s,x,x,'   
psdir='${docdir}'  
runstatedir='${localstatedir}/run'  
sbindir='${exec_prefix}/sbin'  
sharedstatedir='${prefix}/com'  
subdirs=' adintool mkgshmm gramtools jcontrol mkbingram julius libjulius libsent'  
sysconfdir='${prefix}/etc'  
target_alias=''  

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

/* confdefs.h */   
#define PACKAGE_NAME ""  
#define PACKAGE_TARNAME ""  
#define PACKAGE_VERSION ""  
#define PACKAGE_STRING ""  
#define PACKAGE_BUGREPORT ""  
#define PACKAGE_URL ""  

configure: exit 77   

请指导我该怎么做。谢谢。

答案1

root@LAPTOP-8U352SVT:/mnt/c/Users/hp/source/repos/julius# ./configure --enable-words-int

不要将源存储库保存在 Windows 驱动器上。它很慢,而且很多东西都可能出错 - 这就是您所观察到的。例如,将其移动到/home/username

附注:如果您想在 Windows 下运行该软件,则必须在 Windows 上编译它(或使用交叉编译器)。您最终得到的是可以在 Linux 上运行的软件。

相关内容