kaldi-asr / kaldi

kaldi-asr/kaldi is the official location of the Kaldi project.
http://kaldi-asr.org
Other
14.24k stars 5.32k forks source link

Windows compile issue: generate vs project failed #4579

Closed xiangxyq closed 3 years ago

xiangxyq commented 3 years ago

Hello,

I compile kaldi in windows use the latest code, I met a issue.

In this step generate_solution.pl --vsver vs2019 --enable-cuda --enable-openblas get_version.pl

vs project is not correct generate, generate_solution.pl prase the top-level Makefile failed. 123

After I check src/Makefile, and found this may lead this issue:

SUBDIRS := base bin chain chainbin cudamatrix decoder \ feat featbin fgmmbin fstbin fstext \ gmm gmmbin hmm \ ivector ivectorbin kws kwsbin \ lat latbin lm lmbin matrix \ nnet nnetbin nnet2 nnet2bin nnet3 nnet3bin \ online2 online2bin rnnlm rnnlmbin \ transform tree util

fixed by below code windows compile can pass:

SUBDIRS = base bin chain chainbin cudamatrix decoder

generate vs project successfully: 456

But I am not sure this change whether lead other platform compile issue.

Thanks

danpovey commented 3 years ago

Likely a change in the Makefile means the perl script no longer has the correct regex to parse the Makefile. Can you please try to find a fix to the perl script? May just mean changing = to :=

xiangxyq commented 3 years ago

Likely a change in the Makefile means the perl script no longer has the correct regex to parse the Makefile. Can you please try to find a fix to the perl script? May just mean changing = to :=

change generate_solution.pl like this, it can work: before: ` if (s/^(SUBDIRS|EXT_SUBDIRS)\s+=\s+//) {

print STDERR "here\n";

after : if (s/^(SUBDIRS|EXT_SUBDIRS)\s+:=\s+//) {

print STDERR "here\n";

`

danpovey commented 3 years ago

Is there any chance you could make a pull request? Sorry, I am very busy right now..

On Wed, Jun 23, 2021 at 12:05 PM Xiang XYQ @.***> wrote:

Likely a change in the Makefile means the perl script no longer has the correct regex to parse the Makefile. Can you please try to find a fix to the perl script? May just mean changing = to :=

change generate_solution.pl like this, it can work: before: if (s/^(SUBDIRS|EXT_SUBDIRS)\s+=\s+//) { # print STDERR "here\n"; after : if (s/^(SUBDIRS|EXT_SUBDIRS)\s+:=\s+//) { # print STDERR "here\n";

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/4579#issuecomment-866505086, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZFLO5IUOZGCM7QKNAKJZLTUFMQ5ANCNFSM47E5ZWIQ .

xiangxyq commented 3 years ago

Is there any chance you could make a pull request? Sorry, I am very busy right now..

Hi Dan, I make a pr about this issue, please help me review it.

Thanks

kkm000 commented 3 years ago

Fixed in #4580, thank you @xiangxyq!

FWIW, the script is unmaintained and deprecated an in favor of the new CMake build. Visual Studio has native CMake support since VS2017. For other platforms, VSCode is a good IDE.