kaldi icon indicating copy to clipboard operation
kaldi copied to clipboard

kaldi fails to build with openfst-1.8.3

Open yurivict opened this issue 1 year ago • 6 comments

In file included from /usr/ports/audio/kaldi/work/kaldi-4a8b7f6/src/matrix/compressed-matrix.cc:22:
In file included from /usr/ports/audio/kaldi/work/kaldi-4a8b7f6/src/matrix/../matrix/compressed-matrix.h:24:
In file included from /usr/ports/audio/kaldi/work/kaldi-4a8b7f6/src/matrix/../matrix/kaldi-matrix.h:29:
In file included from /usr/ports/audio/kaldi/work/kaldi-4a8b7f6/src/matrix/../matrix/matrix-common.h:26:
In file included from /usr/ports/audio/kaldi/work/kaldi-4a8b7f6/src/matrix/../base/kaldi-common.h:35:
In file included from /usr/ports/audio/kaldi/work/kaldi-4a8b7f6/src/matrix/../base/kaldi-error.h:34:
/usr/ports/audio/kaldi/work/kaldi-4a8b7f6/src/matrix/../base/kaldi-types.h:55:10: fatal error: 'fst/types.h' file not found
   55 | #include <fst/types.h>
      |          ^~~~~~~~~~~~~
1 error generated.

FreeBSD 14.1

yurivict avatar Oct 31 '24 04:10 yurivict

fst/types.h does not exist in openfst 1.8.3. Can you show the g++ line from the build output? I think we never tried to compile under freebsd. Did you run make in tools/?

y.

On Thu, Oct 31, 2024 at 5:33 AM @.*** @.***> wrote:

In file included from /usr/ports/audio/kaldi/work/kaldi-4a8b7f6/src/matrix/compressed-matrix.cc:22: In file included from /usr/ports/audio/kaldi/work/kaldi-4a8b7f6/src/matrix/../matrix/compressed-matrix.h:24: In file included from /usr/ports/audio/kaldi/work/kaldi-4a8b7f6/src/matrix/../matrix/kaldi-matrix.h:29: In file included from /usr/ports/audio/kaldi/work/kaldi-4a8b7f6/src/matrix/../matrix/matrix-common.h:26: In file included from /usr/ports/audio/kaldi/work/kaldi-4a8b7f6/src/matrix/../base/kaldi-common.h:35: In file included from /usr/ports/audio/kaldi/work/kaldi-4a8b7f6/src/matrix/../base/kaldi-error.h:34: /usr/ports/audio/kaldi/work/kaldi-4a8b7f6/src/matrix/../base/kaldi-types.h:55:10: fatal error: 'fst/types.h' file not found 55 | #include <fst/types.h> | ^~~~~~~~~~~~~ 1 error generated.

FreeBSD 14.1

— Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/issues/4956, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUKYXZVAVA6DI5FW26JKBTZ6GXH7AVCNFSM6AAAAABQ5QLSQ2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGYZDKOJUG4ZDCNY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jtrmal avatar Oct 31 '24 07:10 jtrmal

Add to your compilation command line -DOPENFST_VER=10803. @jtrmal IIRC, we just fake the lack of fst/types.h using our custom one in kaldi-types.h. Specifically, we have this check #if OPENFST_VER >= 10800 to detect if OpenFST is higher than 1.8.0 (doesn't have a fst/types.h anymore). Should we document this better? @yurivict

msqr1 avatar Nov 13 '24 04:11 msqr1

Yeah, but that variable should be already set up automatically, thats why I'm confused. Or is this person also working on the WASM port?

jtrmal avatar Nov 13 '24 06:11 jtrmal

I'd also like to point out that OpenFST doesn't compile with g++-14. Appending CXX=g++-13 to all the make/configure steps helps this. It would be nice if this was mentioned somewhere.

danijel3 avatar Nov 26 '24 21:11 danijel3

This issue has been automatically marked as stale by a bot solely because it has not had recent activity. Please add any comment (simply 'ping' is enough) to prevent the issue from being closed for 60 more days if you believe it should be kept open.

stale[bot] avatar Apr 26 '25 02:04 stale[bot]

Hello, so I didn't quite understand how to solve the missing types.h issue. What exactly do I need to do?

Paulmp avatar Jun 30 '25 09:06 Paulmp