sclite(SCTK)安装,无法识别文件,无法识别文件格式,Cygwin [英] sclite (SCTK) install, file not recognized, file format not recognized, Cygwin
问题描述
我目前正在尝试安装NIST的sclite
,它是SCTK 2.4.0的一部分( github 或当前版本).我正在尝试在bash
中的Cygwin
上进行安装.使用make
完成安装.
I am currently trying to install NIST's sclite
, which is part of SCTK 2.4.0 (github or current version). I am attempting the install on Cygwin
in bash
. The installation is done using make
.
我为安装创建了一个目录,并导航到该目录
I made a directory for the install and navigated to that directory
mkdir sctk2.4.0
cd sctk2.4.0
(您可能需要$ cd /path/to/dir/sctk2.4.0
.)
我从github
git clone https://github.com/chinshr/sctk.git
导航到基本文件夹
cd sctk
然后,我开始按照 INSTALL
文件中的说明进行操作.
then I started following the instructions in the INSTALL
file.
运行
make config
工作正常,但输入后
make all
我得到了下面的输出
(mkdir -p bin)
(cd src; make all)
make[1]: Entering directory '/cygdrive/c/David/programs/sctk2.4.0/sctk/src'
(cd asclite; make all)
make[2]: Entering directory '/cygdrive/c/David/programs/sctk2.4.0/sctk/src/asclite'
(cd core; make all)
make[3]: Entering directory '/cygdrive/c/David/programs/sctk2.4.0/sctk/src/asclite/core'
g++ -o asclite -g -Os alignment.o segment.o sgml_reportgenerator.o alignedsegmentiterator.o reportgenerator.o speechset.o segmentsgroup.o logger.o tokenalignment.o sgml_generic_reportgenerator.o recording.o statistics.o compressedlevenshteinmatrix.o segmentor.o id.o trntrn_segmentor.o linestyle_inputparser.o inputparser.o levenshteinmatrix.o levenshtein.o uemfilter.o speakermatch.o spkrautooverlap.o graphalignedsegment.o rawsys_reportgenerator.o graphalignedtoken.o timedobject.o stt_scorer.o aligner.o arraylevenshteinmatrix.o graph.o main.o trn_inputparser.o alignedspeech.o token.o alignedsegment.o graph_coordinate.o rttm_inputparser.o scorer.o properties.o ctmstmrttm_segmentor.o filter.o speech.o alignedspeechiterator.o stm_inputparser.o checker.o ctm_inputparser.o lzma/LzFind.o lzma/LzmaEnc.o lzma/Alloc.o lzma/LzmaLib.o lzma/LzmaDec.o -lm
alignment.o: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
make[3]: *** [makefile:62: asclite] Error 1
make[3]: Leaving directory '/cygdrive/c/David/programs/sctk2.4.0/sctk/src/asclite/core'
make[2]: *** [makefile:12: all] Error 2
make[2]: Leaving directory '/cygdrive/c/David/programs/sctk2.4.0/sctk/src/asclite'
make[2]: *** [makefile:12: all] Error 2
make[2]: Leaving directory '/cygdrive/c/David/programs/sctk2.4.0/sctk/src'
make: *** [makefile:20: all] Error 2
我查看了这篇SO帖子,但是我确定alignment.o
文件没有损坏.以防万一,我尝试了几个make clean
,甚至从github
重新克隆了该项目,但仍然遇到相同的错误.
I've looked at this SO post, but I've determined that the alignment.o
file is not corrupted. Just in case, I tried a few make clean
and even re-cloned the project from github
, but I still get the same error.
任何人都可以帮助我完成此安装,或者至少要进行下一步吗?
Can anyone help me complete this installation, or at least get to the next step?
$ uname -a
CYGWIN_NT-6.1 MyMachine 2.10.0(0.325/5/3) 2018-02-02 15:16 x86_64 Cygwin
$ bash --version
GNU bash, version 4.4.12(3)-release (x86_64-unknown-cygwin) ...
$ gcc --version
gcc (GCC) 6.4.0 ...
$ g++ --version
g++ (GCC) 6.4.0 ...
$ make --version
GNU Make 4.2.1
Built for x86_64-unknown-cygwin ...
$ systeminfo | sed -n 's/^OS\ *//p'
Name: Microsoft Windows 7 Enterprise
Version: 6.1.7601 Service Pack 1 Build 7601
Manufacturer: Microsoft Corporation
Configuration: Member Workstation
Build Type: Multiprocessor Free
注意
我要问这个问题,然后回答我自己的问题. (我希望StackOverflow允许我们这样做.)希望,这将使人们可以更轻松地帮助我解决在安装过程中遇到的更多问题.
I'm asking about this problem and then giving an answer to my own question. (I like that StackOverflow is allowing us to do that.) Hopefully, this will make it easier for people to help me with the problems I ran into further in the installation.
在此处中讨论了我遇到的下一个问题.您可以在此问题的答案中看到下一个问题.
The next problem I ran into is discussed here. You can see this next problem in the answer to this problem.
推荐答案
更简单的解决方案-利用sclite
以防有人发现此处的答案有用.我知道这里没有投票,但是我只是拿了一个奖杯告诉我这是我的第一个获得1000次观看的问题,因此我将更新答案以显示完成工作的最简单方法.
This is in case someone finds the answer here useful. I know there are no votes here, but I just got a trophy telling me this is my first question to get 1000 views, so I'll update my answer to show the easiest way to get things done.
https://www.nist.gov/itl/iad/mig/tools
https://github.com/usnistgov/SCTK
% cd /the/dir/where/i/want/to/install
% git clone https://github.com/usnistgov/SCTK.git
% cd SCTK
从git
大师自述文件(带引号)加上我的一些评论.
From the git
master README (quoted) with some comments I've put in.
% make config
% sed -i 's#[-]Os#-m64#g' src/asclite/core/makefile
% sed -i 's#[-]Os#-m64#g' src/asclite/test/makefile
% sed -i 's#[-]Os#-m64#g' src/sclite/makefile
% make clean
% ## Possible edit to the `rfilter1 makefile`, which are
% ## described at the end of the answer but were not necessary
% ## for me.
% make all
% make check
% make install
% make doc
我还将可执行文件的目录添加到我的PATH
中,并通过man
命令使文档可用.
I also add the executables' directory to my PATH
and make the documentation available via the man
command.
% pwd
/the/dir/where/i/want/to/install/SCTK
% # back up your `.bashrc`
% cp $HOME/.bashrc "${HOME}/.bashrc.$(date +%Y%m%d-%H%M%S).bak"
% # persistent path changes
% echo -e "\n\n## Allow access to sclite, rfilter, etc" >> $HOME/.bashrc
% # your machine might use something other than `export` for this. CHECK!
% echo 'export PATH='"$(pwd)/bin"':$PATH' >> $HOME/.bashrc
% # make changes availabel this session
% source ~/.bashrc
% # man stuff
% cd doc
% cp -r ./* /usr/man/man1
TL的末尾; DR部分
详细信息
自从我于2018年5月发布此内容以来,终于对该软件进行了一些更新:
END OF THE TL;DR SECTION
Details
Since when I posted this in May 2018, there have finally been some updates made to the software:
我于2018年5月发布了问题,并于2018年秋季进行了更新.这些更新部分地解决了我在这里遇到的问题,但是README
和一些makefiles
中的某些信息在此处有用
I posted my question in May 2018, and the updates were made in Fall 2018. They partly fix the problems I ran into here, but some of the information in the README
and some makefiles
are useful to note here.
可以通过README
找到32到64位的问题(如上所述,将-Os
更改为-m64
).
The 32- to 64- bit issue (changing -Os
to -m64
, as done above) was find-able via the README
.
% cat -n README.md | grep -A 4 "64 bits Compilation"
61 **64 bits Compilation**:
62 With big alignments, sctk needs to be compiled in 64 bits. By default, the C/C++ software are compiled in 32 bits with the options (`-Os`) but can be compiled in 64 bits. To do so, `-m64` is added to the CFLAGS variable in `src/asclite/core/makefile`, `src/asclite/test/makefile`, `src/rfilter1/makefile` and `src/sclite/makefile`.
63
64 Example of `CFLAGS` for OSX 10.4+: `-fast -m64 -arch x86_64 -arch ppc64`
65
这是带有自动换行的第62行
Here is line 62 with word wrap
如果对齐方式很大,则sctk需要以64位进行编译.默认情况下,C/C ++软件使用选项(-Os
)以32位编译,但是可以以64位编译.为此,将-m64
添加到以下位置的CFLAGS变量中:
src/asclite/core/makefile
,
src/asclite/test/makefile
,
src/rfilter1/makefile
和
src/sclite/makefile
.
With big alignments, sctk needs to be compiled in 64 bits. By default, the C/C++ software are compiled in 32 bits with the options (-Os
) but can be compiled in 64 bits. To do so, -m64
is added to the CFLAGS variable in
src/asclite/core/makefile
,
src/asclite/test/makefile
,
src/rfilter1/makefile
and
src/sclite/makefile
.
由于src/rfilter1/makefile
中没有-Os
,因此我没有进行任何更改.
Since there was no -Os
in src/rfilter1/makefile
, I didn't make any changes.
我能够顺利完成安装(包括没有失败的测试).这是我的系统信息.
I was able to finish the installation with no problem (including no failed tests). Here is my system info.
$ uname -a
CYGWIN_NT-10.0 MyMachine 3.0.7(0.338/5/3) 2019-04-30 18:08 x86_64 Cygwin
$ bash --version | head -n 1
GNU bash, version 4.4.12(3)-release (x86_64-unknown-cygwin)
$ gcc --version | head -n 1
gcc (GCC) 7.4.0
$ g++ --version | head -n 1
g++ (GCC) 7.4.0
$ make --version | head -n 2
GNU Make 4.2.1
Built for x86_64-unknown-cygwin
$ systeminfo | sed -n 's/^OS\ *//p'
Name: Microsoft Windows 10 Enterprise
Version: 10.0.17134 N/A Build 17134
Manufacturer: Microsoft Corporation
Configuration: Member Workstation
Build Type: Multiprocessor Free
但是,似乎其他一些尝试在Cygwin
上进行编译的人遇到了问题.这是README
However, it seems that some other people trying to compile on Cygwin
have had issues. Here is some more info from the README
% grep "Special Note to Cygwin users" README.md
*Special Note to Cygwin users:* it has been reported that compilation of `rfilter1` can fail in some case, please read the OPTIONS part of the `rfilter1/makefile` and adapt accordingly before retrying compilation.
好吧,我们来看一下rfilter1
的makefile
,看看你们中有些人可能需要做些什么.
Well, let's look at the makefile
for rfilter1
, and see what some of you might need to do.
% head -n 15 src/rfilter1/makefile | tail -7
########################### Options for compilation #########################
####### If you have an very new version of GCC, the strcmp* family of functions
####### is included in the distribution. Changing the value of OPTIONS to
####### be blank will diable the use of supplied versions of these functions.
####### In particular, this behavior has been noted on some versions of cygwin
OPTIONS=-DNEED_STRCMP=1 $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
因此,如果您遇到rfilter1
编译问题,请将未注释的行更改为
So, if you have rfilter1
compilation problems, change the non-commented line to
OPTIONS= $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
这篇关于sclite(SCTK)安装,无法识别文件,无法识别文件格式,Cygwin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!