srvk / eesen

The official repository of the Eesen project
http://arxiv.org/abs/1507.08240
Apache License 2.0
824 stars 342 forks source link

Fix compilation on new macOS and new clang #162

Closed JulianSlzr closed 6 years ago

JulianSlzr commented 6 years ago

First, the src/configure script does not accept recent versions of Mac OS X:

...
On Darwin: checking for Accelerate framework ...
Configuring for OS X version 10.12 ...
***configure failed: OS X version '10.12' not supported ***

I modify the script to permissively accept 10.11+ using the right .mk.

Then, the following cast cannot be done implicitly in recent clang:

...
49 warnings generated.
clang++ -msse -msse2 -Wall -I.. -pthread -DKALDI_DOUBLEPRECISION=0 -DHAVE_POSIX_MEMALIGN -Wno-sign-compare -Winit-self -DHAVE_EXECINFO_H=1 -DHAVE_CXXABI_H -DHAVE_CLAPACK -I/Users/julsal/eesen/tools/openfst/include -DHAVE_OPENFST_GE_10400 -std=c++0x -Wno-sign-compare -g  -Wno-mismatched-tags   -c -o push-lattice.o push-lattice.cc
push-lattice.cc:97:52: error: ordered comparison between pointer and zero ('int32 *' (aka 'int *') and 'int')
    if (num_arcs + (is_final ? 1 : 0) > 1 && shift > 0) {
                                             ~~~~~ ^ ~

so we make it explicit.