Closed shihengW closed 7 years ago
that documentation is not up-to-date -- see #1536 But for compilation of the current master, you will need OpenFST 1.6.x (and you won't need any patches) from https://github.com/jtrmal/openfst But unless you have a lot of experience, do not even attempt to go through the process y.
On Wed, Nov 1, 2017 at 4:53 AM, shihengW notifications@github.com wrote:
In [https://github.com/kaldi-asr/kaldi/blob/master/windows/INSTALL.md] step 5 says "...to patch the OpenFST(win) ... location is tools/extras/openfstwin-1.3.4.patch", but that file does not exist.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/1990, or mute the thread https://github.com/notifications/unsubscribe-auth/AKisX8Kckum3bCdW07A-YLWcV4RxHm_-ks5syDFtgaJpZM4QN6OA .
Or maybe better yet https://github.com/kkm000/openfst -- I just fixed a bug I introduced in the port, just a few days ago :)
@jtrmal, are there changes wrt mine? I'll give you write access if you prefer. I am doing my best to maintain it. Or maybe move the repo to the kaldi-asr org -- @dpovey, up to you? I'd tweak a couple lines in the original code as well (Intel compiler gives an error, clang level 1 warning on constexpr virtual
).
Yes, or that one, sorry. I can create the PR or you can cherry pick my changes. It will be better if you will keep maintaining it, no matter where it will be located -- if you'd prefer, we can move it to kaldi-asr/openfst, I don't think Dan would mind or care. I don't think I did any significant changes to the code base, just set up to project so even the extensions will get compiled. Actually, I just recalled, there were tiny changes w.r.t. to the compilation of the extensions. Plus converted to Cmake. Not sure if you care about that or not, but seemed easier to maintain than the native MSVC project y.
On Wed, Nov 1, 2017 at 2:10 PM, Kirill Katsnelson notifications@github.com wrote:
Or maybe better yet https://github.com/kkm000/openfst -- I just fixed a bug I introduced in the port, just a few days ago :)
@jtrmal https://github.com/jtrmal, are there changes wrt mine? I'll give you write access if you prefer. I am doing my best to maintain it. Or maybe move the repo to the kaldi-asr org -- @dpovey https://github.com/dpovey, up to you? I'd tweak a couple lines in the original code as well (Intel compiler gives an error, clang level 1 warning on constexpr virtual).
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/1990#issuecomment-341191465, or mute the thread https://github.com/notifications/unsubscribe-auth/AKisX1dwAH_DvgUtJu6brCOujVwadmNbks5syLQFgaJpZM4QN6OA .
If we were to include that as a repo at kaldi-asr.org we should probably call it something that makes clear that it relates to Windows. And decide whether it's better to do it as a repo or a patch against OpenFst or some kind of script (I don't know how many changes were reuired). I don't have strong opinion though, @jtrmal is managing the Windows-related issues and I'd rather have him decide.
On Wed, Nov 1, 2017 at 2:20 PM, jtrmal notifications@github.com wrote:
Yes, or that one, sorry. I can create the PR or you can cherry pick my changes. It will be better if you will keep maintaining it, no matter where it will be located -- if you'd prefer, we can move it to kaldi-asr/openfst, I don't think Dan would mind or care. I don't think I did any significant changes to the code base, just set up to project so even the extensions will get compiled. Actually, I just recalled, there were tiny changes w.r.t. to the compilation of the extensions. Plus converted to Cmake. Not sure if you care about that or not, but seemed easier to maintain than the native MSVC project y.
On Wed, Nov 1, 2017 at 2:10 PM, Kirill Katsnelson < notifications@github.com> wrote:
Or maybe better yet https://github.com/kkm000/openfst -- I just fixed a bug I introduced in the port, just a few days ago :)
@jtrmal https://github.com/jtrmal, are there changes wrt mine? I'll give you write access if you prefer. I am doing my best to maintain it. Or maybe move the repo to the kaldi-asr org -- @dpovey https://github.com/dpovey, up to you? I'd tweak a couple lines in the original code as well (Intel compiler gives an error, clang level 1 warning on constexpr virtual).
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/1990#issuecomment-341191465, or mute the thread https://github.com/notifications/unsubscribe-auth/AKisX1dwAH_ DvgUtJu6brCOujVwadmNbks5syLQFgaJpZM4QN6OA
.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/1990#issuecomment-341194582, or mute the thread https://github.com/notifications/unsubscribe-auth/ADJVu0LIT9LNEV7S0Cff7xz-v9F_KCm2ks5syLaJgaJpZM4QN6OA .
I am successfully able to build openfst from https://github.com/kkm000/openfst on VS2015. But kaldi build gives me an error "LNK1181: cannot open inputfile openfst64.lib" I am using the instruction from https://github.com/kaldi-asr/kaldi/blob/master/windows/INSTALL.md with OpenBLAS and VS 2015, just replacing the openfst repo from 1.3 to 1.6
either the location of the library or the name of the library is different (it might be named openfst.lib, for example). I don't recall from the top of my head. y.
On Tue, Nov 21, 2017 at 5:48 AM, AniketDhar notifications@github.com wrote:
I am successfully able to build openfst from https://github.com/kkm000/ openfst on VS2015. But kaldi build gives me an error "LNK1181: cannot open inputfile openfst64.lib" I am using the instruction from https://github.com/kaldi-asr/ kaldi/blob/master/windows/INSTALL.md with OpenBLAS and VS 2015, just replacing the openfst repo from 1.3 to 1.6
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/1990#issuecomment-345988859, or mute the thread https://github.com/notifications/unsubscribe-auth/AKisXxlikSuvEn3n3K3R8IQETYaPnuepks5s4qp7gaJpZM4QN6OA .
On building openfst I get a lib called libfst.lib
at 'kaldi-master\kaldi\tools\openfst\x64\Release\' and in variables.prop
I have given the paths as:
<OPENFST>C:\Users\A\Downloads\kaldi-master\kaldi\tools\openfst\</OPENFST>
<OPENFSTLIB>C:\Users\A\Downloads\kaldi-master\kaldi\tools\openfst\x64\</OPENFSTLIB>
Kindly let me know if I have done any step wrong. I mean clearly the name of the libs are different but where should I change things?
ok, in that case you might need to change line 12 the file openfstwin_release.props so that it says
openfstwin_release.props:12:
instead of openfstwin_release.props:12:
You might need to do similar thing for openfstwin_debug.props (after you compiled the Debug library as well) y.
On Tue, Nov 21, 2017 at 11:21 AM, AniketDhar notifications@github.com wrote:
On building openfst I get a lib called libfst.lib at 'kaldi-master\kaldi\tools\openfst\x64\Release' and in variables.prop I have given the paths as:
C:\Users\A\Downloads\kaldi-master\kaldi\tools\openfst\ C:\Users\A\Downloads\kaldi-master\kaldi\tools\openfst\x64\ — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/1990#issuecomment-346079510, or mute the thread https://github.com/notifications/unsubscribe-auth/AKisXwvQIuL2jpeJ8MTSR0bPtyVmW3n1ks5s4viBgaJpZM4QN6OA .
Haha I was exactly going to do that. But was not sure if it will break something else. Thanks.
sorry, it should (obviously) say
<AdditionalDependencies>libfst.lib;%(AdditionalDependencies)</AdditionalDependencies>
but I guess you guessed that ;)
Yes. Don't worry :)
Sorry to bother again but I get linking errors trying to find kaldi-decoder.lib
and kaldi-lat.lib
. But those libs do not exist for me.
fatal error LNK1181: cannot open input file 'C:\Users\A\Downloads\kaldi-master\kaldi\kaldiwin_vs2015_OPENBLAS\x64\Release\kaldi-decoder.lib'
fatal error LNK1181: cannot open input file 'C:\Users\A\Downloads\kaldi-master\kaldi\kaldiwin_vs2015_OPENBLAS\x64\Release\kaldi-lat.lib'
Edit: I tried building kaldi-decoder
. Getting the following error:
kaldi\tools\openfst\src\include\fst/queue.h(528): error C2975: '_Test': invalid template argument for 'std::conditional', expected compile-time constant expression
Is this a compiler issue?
my guess is that there were errors before and you didn't notice it. try to build kaldi-decoder and kaldi-lat manually (select "build" from the context menu in the solution explorer) y.
On Wed, Nov 22, 2017 at 3:35 AM, AniketDhar notifications@github.com wrote:
Sorry to bother again but I get linking errors trying to find kaldi-decoder.lib and kaldi-lat.lib. But those libs do not exist for me. fatal error LNK1181: cannot open input file 'C:\Users\A\Downloads\kaldi- master\kaldi\kaldiwin_vs2015_OPENBLAS\x64\Release\kaldi-decoder.lib' fatal error LNK1181: cannot open input file 'C:\Users\A\Downloads\kaldi- master\kaldi\kaldiwin_vs2015_OPENBLAS\x64\Release\kaldi-lat.lib'
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/1990#issuecomment-346279360, or mute the thread https://github.com/notifications/unsubscribe-auth/AKisXwZJ-0eKzPd6b4caNKxJy2SC2gM7ks5s49y_gaJpZM4QN6OA .
I think you missed my edit on the previous comment.
I tried to build them separately and both fail at line 528 of queue.h
in kaldi\tools\openfst\src\include\fst
Error being error C2975: '_Test': invalid template argument for 'std::conditional', expected compile-time constant expression
This is line number 528
using Less = typename std::conditional<(Weight::Properties() & kPath) == kPath, NaturalLess<Weight>, TrivialLess>::type;
So I was wondering if it is a compiler issue? And do I need to configure anything or set any flags? I am using Microsoft Visual Studio Community 2015 Version 14.0.25431.01 Update 3
Also, I would like to reiterate, when I build openfst it does not give any error and provides one lib only called libfst.lib
It's either code or compiler c++11 compliance issue I'll have a look today Y.
On Nov 22, 2017 07:44, "AniketDhar" notifications@github.com wrote:
I think you missed my edit on the previous comment. I tried to build them separately and both fail at line 528 of queue.h in kaldi\tools\openfst\src\include\fst Error being error C2975: '_Test': invalid template argument for 'std::conditional', expected compile-time constant expression
the last line is line number 528 using Less = typename std::conditional<(Weight::Properties() & kPath) == kPath, NaturalLess
, TrivialLess>::type; So I was wondering if it is a compiler issue? And do I need to configure anything or set any flags?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/1990#issuecomment-346339728, or mute the thread https://github.com/notifications/unsubscribe-auth/AKisX0_Jq22Rt1PaKUT2hAo6Za3nCZP3ks5s5BcygaJpZM4QN6OA .
Thanks a lot 👍 :)
Btw, as a reminder, are you using the latest visual studio? Y.
On Nov 22, 2017 08:07, "AniketDhar" notifications@github.com wrote:
Thanks a lot 👍 :)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/1990#issuecomment-346344979, or mute the thread https://github.com/notifications/unsubscribe-auth/AKisX1OFaMC1-qQEABcEry18ldIw9QEgks5s5ByOgaJpZM4QN6OA .
I am using Microsoft Visual Studio Community 2015 Version 14.0.25431.01 Update 3
You should update to 2017, the c++11 support was very bad in 2015 Y.
On Nov 22, 2017 08:13, "AniketDhar" notifications@github.com wrote:
I am using Microsoft Visual Studio Community 2015 Version 14.0.25431.01 Update 3
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/1990#issuecomment-346346465, or mute the thread https://github.com/notifications/unsubscribe-auth/AKisX7nVFqdWoMw-3TnImT6guoWG1MFKks5s5B4PgaJpZM4QN6OA .
Can I try it on VS 2017? The generate_solution.pl
file does not recognize any version beyond 2015 it seems.
Yes, you can open the solution in 2017 and it should ask you if you want to upgrade it to 2017 solution
On Nov 22, 2017 08:19, "AniketDhar" notifications@github.com wrote:
Can I try it on VS 2017? The generate_solution.pl file does not recognize any version beyond 2015 it seems.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/1990#issuecomment-346347823, or mute the thread https://github.com/notifications/unsubscribe-auth/AKisXyVVYGOZs59leekjtHzh1amqC3l0ks5s5B9tgaJpZM4QN6OA .
I tried with VS 2017. Getting the same errors. Compiler Error C2975 which basically says you can not have a variable between angled brackets. I don't know how to go forward. I will try again tomorrow. Kindly have a look if you get time. Thanks.
Which source (.cc) file is being compiled when you are getting the error?
It's not enough to know the .cc file, the entire error message needs to be shown.
On Wed, Nov 22, 2017 at 6:55 PM, Kirill Katsnelson <notifications@github.com
wrote:
Which source (.cc) file is being compiled when you are getting the error?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/1990#issuecomment-346503957, or mute the thread https://github.com/notifications/unsubscribe-auth/ADJVu0Z3JJAsc1yfYgoTXb_6mGflMRwSks5s5LRjgaJpZM4QN6OA .
I think it's not a problem in the code -- I just compiled while master from scratch My wild guess is that he probably didn't upgrade the solution to 2017 toolset (or modified some files). y.
On Wed, Nov 22, 2017 at 7:03 PM, Daniel Povey notifications@github.com wrote:
It's not enough to know the .cc file, the entire error message needs to be shown.
On Wed, Nov 22, 2017 at 6:55 PM, Kirill Katsnelson < notifications@github.com
wrote:
Which source (.cc) file is being compiled when you are getting the error?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/1990#issuecomment-346503957, or mute the thread https://github.com/notifications/unsubscribe- auth/ADJVu0Z3JJAsc1yfYgoTXb_6mGflMRwSks5s5LRjgaJpZM4QN6OA .
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/1990#issuecomment-346505105, or mute the thread https://github.com/notifications/unsubscribe-auth/AKisX_kjmQWiFDf2eHsk3QxsKlViaqmgks5s5LZZgaJpZM4QN6OA .
@shihengW I updated both the build system and the installation instructions in #2032 HTH -- I was able to compile everything, so I'm not sure what is the issue.
I think a better guess would be it has to do with the weights defined in Kaldi code. Since @jtrmal's CMake script builds all tools with OpenFST own weights, Kaldi-defined weights is probably the only thing never instantiated with this template before. And the class in question is AutoQueue
, which is used all over all algorithms, so it has to have been compiled before.
@AniketDhar: If nothing helps, pull OpenFST from the tag win/1.6.3.1, the previous version.
git checkout win/1.6.3.1
This one is known to compile.
OK, but I still only link to the "same" library (i.e. library built from the same sources). And so far we don't know how to do autoload for windows (everything is compiled statically anyway). So I'm not saying you are not right, I just don't see how this could have happen. y.
On Wed, Nov 22, 2017 at 7:10 PM, Kirill Katsnelson <notifications@github.com
wrote:
I think a better guess would be it has to do with the weights defined in Kaldi code. Since @jtrmal https://github.com/jtrmal's CMake script builds all tools with OpenFST own weights, Kaldi-defined weights is probably the only thing never instantiated with this template before. And the class in question is AutoQueue, which is used all over all algorithms, so it has to have been compiled before.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/1990#issuecomment-346506000, or mute the thread https://github.com/notifications/unsubscribe-auth/AKisX1y3_WVF7B_Wo_3sMMM9u3GsK-c-ks5s5LgHgaJpZM4QN6OA .
@jtrmal So can you compile the whole set of Kaldi sources with the latest version of OpenFST?
yep some of the tests will fail linking, but that I believe is the deficiency of the perl script that generates the solution (it dowsn't add the library itself as a dependecy). I will look at it later. But as long as only compilation is involved, everything seems fine... y.
On Wed, Nov 22, 2017 at 8:21 PM, Kirill Katsnelson <notifications@github.com
wrote:
@jtrmal https://github.com/jtrmal So can you compile the whole set of Kaldi sources with this version of OpenFST?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/1990#issuecomment-346513580, or mute the thread https://github.com/notifications/unsubscribe-auth/AKisXzS6R5DY9bpgCenk_1RiuFeBbWjbks5s5Mh9gaJpZM4QN6OA .
@jtrmal I see. That's not what I though it was then.
@AniketDhar: please double-check you are compiling the latest Kaldi, and also post the full error message. We need to see what file fails to compile, and the full error message. To make it both concise and complete, compile just one file (right click on it in Solution Explorer then Compile), and then post full output.
Sorry guys. It worked on VS 2017. I probably missed some step yesterday. I cloned latest kaldi again and repeated the whole process from scratch today and it worked. Thanks :)
Hi.... i am trying to apply extras/openfstwin-1.3.4.patch ... since i am working on windows i am using git apply command rather than patch command... i get the following result D:\gurjot_shared\Language2018\KALDI_SAME_VER_AS_UNIX\kaldi\tools\openfst\src\inc lude\fst>git apply --whitespace=nowarn ........\extras\openfstwin-1.3.4.patch
error: patch failed: src/include/fst/compat.h:23 error: src/include/fst/compat.h: patch does not apply
Can somebody suggest some solution?
sorry, not much to say, you are probably trying to patch a wrong version of openfst or using an incorrect tool (I'm not sure how selective the git apply is about the format of the patch). But we stopped supporting (and using) openfst 1.3.4 quite a long time ago anyway, so I don't think this deserves my or your or anyone else's effort anyway. y.
On Thu, May 31, 2018 at 2:31 AM GurjotSingh179 notifications@github.com wrote:
Hi.... i am trying to apply extras/openfstwin-1.3.4.patch ... since i am working on windows i am using git apply command rather than patch command... i get the following result
D:\gurjot_shared\Language2018\KALDI_SAME_VER_AS_UNIX\kaldi\tools\openfst\src\inc lude\fst>git apply --whitespace=nowarn ........\extras\openfstwin-1.3.4.patch
error: patch failed: src/include/fst/compat.h:23 error: src/include/fst/compat.h: patch does not apply
Can somebody suggest some solution?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/1990#issuecomment-393421862, or mute the thread https://github.com/notifications/unsubscribe-auth/AKisX0j7Fydbj9fS3LXb6BNDvzYUuXVRks5t344rgaJpZM4QN6OA .
Hi, I'm trying to build Kaldi and openfst1.3.4 with Visual Studio 2015. But I've getting many compile errors. Could you tell me how I can build it successfully?
@luysennarak, current Kaldi probably won't compile with the old version of OpenFST, and 1.3.4 is old.
We support a Windows port of practically all Kaldi-related functionality here: https://github.com/kkm000/openfst. However, it is possible that you won't be able to compile it with VS 2015 (toolset 14.0), because some changes made upstream may be indigestible by the older compiler. I just cannot tell if it will compile; give it a try. Do not miss the config file in the "READ ME..." solution folder.
Best of all upgrade to the current VS2017 with its newer 14.1 toolchain. If you absolutely have to use VS2015, another option is install clang support into it, and use that toolset to compile OpenFST. There is a Visual Studio setup option for clang, marked experimental and off by default. The clang that comes with it is a regular clang++ frontend, but uses the Microsoft c2 second-pass codegen as its backend, and thus produces objects and binaries inherently compatible with the default toolset compiler, cl. Set the toolset to v140_clang_c2
in the configuration file mentioned above, like
<PlatformToolset>v140_clang_c2</PlatformToolset>
(Do not miss removing the Condition="false"
if tweaking existing settings!)
Feel free to open an issue in that repository, and I'll try to help.
Thanks for your helping response. I'll try to do that.
On Thu, Oct 4, 2018 at 5:42 AM Kirill Katsnelson notifications@github.com wrote:
@luysennarak https://github.com/luysennarak, current Kaldi probably won't compile with the old version of OpenFST, and 1.3.4 is old.
We support a Windows port of practically all Kaldi-related functionality here: https://github.com/kkm000/openfst. However, it is possible that you won't be able to compile it with VS 2015 (toolset 14.0), because some changes made upstream may be indigestible by the older compiler. I just cannot tell if it will compile; give it a try. Do not miss the config file in the "READ ME..." solution folder.
Best of all upgrade to the current VS2017 with its newer 14.1 toolchain. If you absolutely have to use VS2015, another option is install clang support into it, and use that toolset to compile OpenFST. There is a Visual Studio setup option for clang, marked experimental and off by default. The clang that comes with it is a regular clang++ frontend, but uses the Microsoft c2 second-pass codegen as its backend, and thus produces objects and binaries inherently compatible with the default toolset compiler, cl. Set the toolset to v140_clang_c2 in the configuration file mentioned above, like
v140_clang_c2 (Do not miss removing the Condition="false" if tweaking existing settings!)
Feel free to open an issue in that repository, and I'll try to help.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/1990#issuecomment-426812420, or mute the thread https://github.com/notifications/unsubscribe-auth/AYWtn1I4knx-sriIh3Bwd-P9yJ-8GvR5ks5uhS9agaJpZM4QN6OA .
The windows build instruction step 5 says "...to patch the OpenFST(win) ... location is tools/extras/openfstwin-1.3.4.patch", but that file does not exist.