Skip to content
Snippets Groups Projects
Commit fc333ed7 authored by Dogan Can's avatar Dogan Can Committed by Daniel Povey
Browse files

Resolve conflicts due to cross compilation changes in master (#1400)


* [build]: resolving OpenFst compilation issue with  gcc-6.x (#1392)

* [egs] Add new graphemic system for Gale Arabic, with newer nnet scripts (#1298)

* [build] Windows build: generate missing base/version.h; cosmetic changes (#1397)

* [build]: Enable cross compilation, including to android. (#726)

If a user has a number of tool chains installed and they do not want to
use the default, they must currently edit the kaldi.mk file after
running configure to change the CC, CXX, AR, AS, and RANLIB variables.
This is something that should be exposed via the configure script. This
patch exposes an option to set the host triple for the desired tool
chain in the configure script.

Building Kaldi on my Raspberry Pi boards is not particularly fast.  I
have been using the following patch to build kaldi executables for use
on the Pi boards for the better part of a year.  A typical invocation
for me is something like:

$ ./configure --static --atlas-root=/opt/cross/armv8hf \
--fst-root=/opt/cross/armv8hf --host=armv8-rpi3-linux-gnueabihf \
--fst-version=1.4.1

This way I can build on my much faster x86 desktop, but still run
experiments on ARM.

I have included support for cross compiling for ppc64le and it works for
me (at least it produces binaries for ppc64le I don't have a ppc64
machine to test it).

Signed-off-by: default avatarEric B Munson <eric@cobaltspeech.com>

* Add mk file and configure options for building for Android

Building for Android requires a toolchain that can be built using the
Android NDK.  It works similiarly to the linux build except that it only
uses clang, only supports the openBLAS math library, and requires an
additional include directory for the system C++ headers.

A typical configure invocation looks like:

./configure --static --openblas-root=/opt/cross/arm-linux-androideabi \
--fst-root=/opt/cross/arm-linux-androideabi \
--host=arm-linux-androideabi --fst-version=1.4.1 \
--android-includes=/opt/cross/arm-linux-androideabi/sysroot/usr/include

Signed-off-by: default avatarEric B Munson <eric@cobaltspeech.com>

* Make pthread cancel symbols noops for Android

The Android C library does not support cancelling pthreads so the
symbols PTHREAD_CANCEL_STATE and pthread_setcancelstate are undefined.
Because a pthread cannot be cancelled in Android, it is reasonable to
make the pthread_setcancelstate() call a noop.

Signed-off-by: default avatarEric B Munson <eric@cobaltspeech.com>

* A few small fixes for configure

* Reword the clang++ requirement for android builds.
parent 60d1c788
No related branches found
No related tags found
No related merge requests found
Showing
with 704 additions and 12 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment