Where can I find cross compiling for aarch64?


(Sekarpdkt) #41
  4748:     find library=libpthread.so.0 [0]; searching
  4748:      search cache=/etc/ld.so.cache
  4748:       trying file=/lib/aarch64-linux-gnu/libpthread.so.0
  4748:
  4748:     find library=libdl.so.2 [0]; searching
  4748:      search cache=/etc/ld.so.cache
  4748:       trying file=/lib/aarch64-linux-gnu/libdl.so.2
  4748:
  4748:     find library=libutil.so.1 [0]; searching
  4748:      search cache=/etc/ld.so.cache
  4748:       trying file=/lib/aarch64-linux-gnu/libutil.so.1
  4748:
  4748:     find library=libexpat.so.1 [0]; searching
  4748:      search cache=/etc/ld.so.cache
  4748:       trying file=/lib/aarch64-linux-gnu/libexpat.so.1
  4748:
  4748:     find library=libz.so.1 [0]; searching
  4748:      search cache=/etc/ld.so.cache
  4748:       trying file=/lib/aarch64-linux-gnu/libz.so.1
  4748:
  4748:     find library=libm.so.6 [0]; searching
  4748:      search cache=/etc/ld.so.cache
  4748:       trying file=/lib/aarch64-linux-gnu/libm.so.6
  4748:
  4748:     find library=libc.so.6 [0]; searching
  4748:      search cache=/etc/ld.so.cache
  4748:       trying file=/lib/aarch64-linux-gnu/libc.so.6
  4748:
  4748:
  4748:     calling init: /lib/aarch64-linux-gnu/libpthread.so.0
  4748:
  4748:
  4748:     calling init: /lib/aarch64-linux-gnu/libc.so.6
  4748:
  4748:
  4748:     calling init: /lib/aarch64-linux-gnu/libm.so.6
  4748:
  4748:
  4748:     calling init: /lib/aarch64-linux-gnu/libz.so.1
  4748:
  4748:
  4748:     calling init: /lib/aarch64-linux-gnu/libexpat.so.1
  4748:
  4748:
  4748:     calling init: /lib/aarch64-linux-gnu/libutil.so.1
  4748:
  4748:
  4748:     calling init: /lib/aarch64-linux-gnu/libdl.so.2
  4748:
  4748:
  4748:     initialize program: python3
  4748:
  4748:
  4748:     transferring control: python3
  4748:
  4748:     find library=libblas.so.3 [0]; searching
  4748:      search cache=/etc/ld.so.cache
  4748:       trying file=/usr/lib/aarch64-linux-gnu/libblas.so.3
  4748:
  4748:
  4748:     calling init: /usr/lib/aarch64-linux-gnu/libblas.so.3
  4748:
  4748:
  4748:     calling init: /home/sekar/.local/lib/python3.6/site-packages/numpy/core/multiarray.cpython-36m-aarch64-linux-gnu.so
  4748:
  4748:
  4748:     calling init: /home/sekar/.local/lib/python3.6/site-packages/numpy/core/umath.cpython-36m-aarch64-linux-gnu.so
  4748:
  4748:     find library=libffi.so.6 [0]; searching
  4748:      search cache=/etc/ld.so.cache
  4748:       trying file=/usr/lib/aarch64-linux-gnu/libffi.so.6
  4748:
  4748:
  4748:     calling init: /usr/lib/aarch64-linux-gnu/libffi.so.6
  4748:
  4748:
  4748:     calling init: /usr/lib/python3.6/lib-dynload/_ctypes.cpython-36m-aarch64-linux-gnu.so
  4748:
  4748:     find library=libbz2.so.1.0 [0]; searching
  4748:      search cache=/etc/ld.so.cache
  4748:       trying file=/lib/aarch64-linux-gnu/libbz2.so.1.0
  4748:
  4748:
  4748:     calling init: /lib/aarch64-linux-gnu/libbz2.so.1.0
  4748:
  4748:
  4748:     calling init: /usr/lib/python3.6/lib-dynload/_bz2.cpython-36m-aarch64-linux-gnu.so
  4748:
  4748:     find library=liblzma.so.5 [0]; searching
  4748:      search cache=/etc/ld.so.cache
  4748:       trying file=/lib/aarch64-linux-gnu/liblzma.so.5
  4748:
  4748:
  4748:     calling init: /lib/aarch64-linux-gnu/liblzma.so.5
  4748:
  4748:
  4748:     calling init: /usr/lib/python3.6/lib-dynload/_lzma.cpython-36m-aarch64-linux-gnu.so
  4748:
  4748:     find library=libcrypto.so.1.1 [0]; searching
  4748:      search cache=/etc/ld.so.cache
  4748:       trying file=/usr/lib/aarch64-linux-gnu/libcrypto.so.1.1
  4748:
  4748:
  4748:     calling init: /usr/lib/aarch64-linux-gnu/libcrypto.so.1.1
  4748:
  4748:
  4748:     calling init: /usr/lib/python3.6/lib-dynload/_hashlib.cpython-36m-aarch64-linux-gnu.so
  4748:
  4748:     find library=liblapack.so.3 [0]; searching
  4748:      search cache=/etc/ld.so.cache
  4748:       trying file=/usr/lib/aarch64-linux-gnu/liblapack.so.3
  4748:
  4748:     find library=libgfortran.so.4 [0]; searching
  4748:      search cache=/etc/ld.so.cache
  4748:       trying file=/usr/lib/aarch64-linux-gnu/libgfortran.so.4
  4748:
  4748:     find library=libgcc_s.so.1 [0]; searching
  4748:      search cache=/etc/ld.so.cache
  4748:       trying file=/lib/aarch64-linux-gnu/libgcc_s.so.1
  4748:
  4748:
  4748:     calling init: /lib/aarch64-linux-gnu/libgcc_s.so.1
  4748:
  4748:
  4748:     calling init: /usr/lib/aarch64-linux-gnu/libgfortran.so.4
  4748:
  4748:
  4748:     calling init: /usr/lib/aarch64-linux-gnu/liblapack.so.3
  4748:
  4748:
  4748:     calling init: /home/sekar/.local/lib/python3.6/site-packages/numpy/linalg/lapack_lite.cpython-36m-aarch64-linux-gnu.so
  4748:
  4748:
  4748:     calling init: /home/sekar/.local/lib/python3.6/site-packages/numpy/linalg/_umath_linalg.cpython-36m-aarch64-linux-gnu.so
  4748:
  4748:     find library=libmpdec.so.2 [0]; searching
  4748:      search cache=/etc/ld.so.cache
  4748:       trying file=/usr/lib/aarch64-linux-gnu/libmpdec.so.2
  4748:
  4748:
  4748:     calling init: /usr/lib/aarch64-linux-gnu/libmpdec.so.2
  4748:
  4748:
  4748:     calling init: /usr/lib/python3.6/lib-dynload/_decimal.cpython-36m-aarch64-linux-gnu.so
  4748:
  4748:
  4748:     calling init: /home/sekar/.local/lib/python3.6/site-packages/numpy/core/_multiarray_tests.cpython-36m-aarch64-linux-gnu.so
  4748:
  4748:
  4748:     calling init: /home/sekar/.local/lib/python3.6/site-packages/numpy/fft/fftpack_lite.cpython-36m-aarch64-linux-gnu.so
  4748:
  4748:
  4748:     calling init: /home/sekar/.local/lib/python3.6/site-packages/numpy/random/mtrand.cpython-36m-aarch64-linux-gnu.so
  4748:
  4748:
  4748:     calling init: /usr/lib/python3.6/lib-dynload/audioop.cpython-36m-aarch64-linux-gnu.so
  4748:

Traceback (most recent call last):
File “/home/sekar/.local/lib/python3.6/site-packages/deepspeech/impl.py”, line 14, in swig_import_helper
return importlib.import_module(mname)
File “/usr/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘deepspeech._impl’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “client.py”, line 12, in
from deepspeech import Model, printVersions
File “/home/sekar/.local/lib/python3.6/site-packages/deepspeech/init.py”, line 4, in
from deepspeech.impl import AudioToInputVector as audioToInputVector
File “/home/sekar/.local/lib/python3.6/site-packages/deepspeech/impl.py”, line 17, in
_impl = swig_import_helper()
File “/home/sekar/.local/lib/python3.6/site-packages/deepspeech/impl.py”, line 16, in swig_import_helper
return importlib.import_module(’_impl’)
File “/usr/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named ‘_impl’
4748:
4748: calling fini: python3 [0]
4748:
4748:
4748: calling fini: /lib/aarch64-linux-gnu/libutil.so.1 [0]
4748:
4748:
4748: calling fini: /lib/aarch64-linux-gnu/libexpat.so.1 [0]
4748:
4748:
4748: calling fini: /lib/aarch64-linux-gnu/libz.so.1 [0]
4748:
4748:
4748: calling fini: /home/sekar/.local/lib/python3.6/site-packages/numpy/core/multiarray.cpython-36m-aarch64-linux-gnu.so [0]
4748:
4748:
4748: calling fini: /home/sekar/.local/lib/python3.6/site-packages/numpy/core/umath.cpython-36m-aarch64-linux-gnu.so [0]
4748:
4748:
4748: calling fini: /usr/lib/python3.6/lib-dynload/_ctypes.cpython-36m-aarch64-linux-gnu.so [0]
4748:
4748:
4748: calling fini: /usr/lib/aarch64-linux-gnu/libffi.so.6 [0]
4748:
4748:
4748: calling fini: /usr/lib/python3.6/lib-dynload/_bz2.cpython-36m-aarch64-linux-gnu.so [0]
4748:
4748:
4748: calling fini: /lib/aarch64-linux-gnu/libbz2.so.1.0 [0]
4748:
4748:
4748: calling fini: /usr/lib/python3.6/lib-dynload/_lzma.cpython-36m-aarch64-linux-gnu.so [0]
4748:
4748:
4748: calling fini: /lib/aarch64-linux-gnu/liblzma.so.5 [0]
4748:
4748:
4748: calling fini: /usr/lib/python3.6/lib-dynload/_hashlib.cpython-36m-aarch64-linux-gnu.so [0]
4748:
4748:
4748: calling fini: /usr/lib/aarch64-linux-gnu/libcrypto.so.1.1 [0]
4748:
4748:
4748: calling fini: /lib/aarch64-linux-gnu/libdl.so.2 [0]
4748:
4748:
4748: calling fini: /home/sekar/.local/lib/python3.6/site-packages/numpy/linalg/lapack_lite.cpython-36m-aarch64-linux-gnu.so [0]
4748:
4748:
4748: calling fini: /home/sekar/.local/lib/python3.6/site-packages/numpy/linalg/_umath_linalg.cpython-36m-aarch64-linux-gnu.so [0]
4748:
4748:
4748: calling fini: /usr/lib/aarch64-linux-gnu/liblapack.so.3 [0]
4748:
4748:
4748: calling fini: /usr/lib/aarch64-linux-gnu/libgfortran.so.4 [0]
4748:
4748:
4748: calling fini: /lib/aarch64-linux-gnu/libgcc_s.so.1 [0]
4748:
4748:
4748: calling fini: /usr/lib/aarch64-linux-gnu/libblas.so.3 [0]
4748:
4748:
4748: calling fini: /usr/lib/python3.6/lib-dynload/_decimal.cpython-36m-aarch64-linux-gnu.so [0]
4748:
4748:
4748: calling fini: /lib/aarch64-linux-gnu/libpthread.so.0 [0]
4748:
4748:
4748: calling fini: /usr/lib/aarch64-linux-gnu/libmpdec.so.2 [0]
4748:
4748:
4748: calling fini: /home/sekar/.local/lib/python3.6/site-packages/numpy/core/_multiarray_tests.cpython-36m-aarch64-linux-gnu.so [0]
4748:
4748:
4748: calling fini: /home/sekar/.local/lib/python3.6/site-packages/numpy/fft/fftpack_lite.cpython-36m-aarch64-linux-gnu.so [0]
4748:
4748:
4748: calling fini: /home/sekar/.local/lib/python3.6/site-packages/numpy/random/mtrand.cpython-36m-aarch64-linux-gnu.so [0]
4748:
4748:
4748: calling fini: /usr/lib/python3.6/lib-dynload/audioop.cpython-36m-aarch64-linux-gnu.so [0]
4748:
4748:
4748: calling fini: /lib/aarch64-linux-gnu/libm.so.6 [0]
4748:


(Lissyx) #42

Ok, that might be my fault. Check the logs when you build the wheel, but I’m sure you see an error / warning about some “ldd” not being found.

You should do someting like: cp "native_client/xldd" "${toolchain}ldd" && chmod +x "${toolchain}ldd" so that there’s a ldd binary in your toolchain (tensorflow side)

Check what maybe_install_xldd does in tc-tests-utils.sh you need to do the same


(Lissyx) #43

We rely on ldd to detect deps to copy into the wheel, and default toolchains don’t have it. You can see that there is no libdeepspeech.so inside you wheel, while there should be one :slight_smile:


(Sekarpdkt) #44

Ok… Let me try. Thanks for all help. Once successful, I will share my docker file.


(Sekarpdkt) #45

Steps followed

export DS_DSDIR=/DeepSpeech
export DS_TFDIR=/tensorflow
export SYSTEM_TARGET=rpi3-armv8
toolchain=$(make -s -C ${DS_DSDIR}/native_client/ TARGET=${SYSTEM_TARGET} TFDIR=${DS_TFDIR} print-toolchain)
if [ ! -x "${toolchain}ldd" ]; then
    cp "${DS_DSDIR}/native_client/xldd" "${toolchain}ldd" && chmod +x "${toolchain}ldd"
fi

after above, found /tensorflow/bazel-tensorflow/external/LinaroAarch64Gcc72/bin/aarch64-linux-gnu-ldd added. Now zlib info has libdeepspeech.so inside the whl.

sekar@aml:~/deepspeech/bin/v0.3.0$ zipinfo -l ./deepspeech-0.4.0a0-cp36-cp36m-linux_aarch64.whl Archive: ./deepspeech-0.4.0a0-cp36-cp36m-linux_aarch64.whl
Zip file size: 16310730 bytes, number of entries: 10
-rw-r–r-- 2.0 unx 1670 b- 509 defN 18-Nov-26 03:07 deepspeech/init.py
-rwxr-xr-x 2.0 unx 253520 b- 90382 defN 18-Nov-26 16:41 deepspeech/_impl.cpython-36m-x86_64-linux-gnu.so
-rw-r–r-- 2.0 unx 4355 b- 1735 defN 18-Nov-26 03:07 deepspeech/client.py
-rw-r–r-- 2.0 unx 4509 b- 1351 defN 18-Nov-26 16:41 deepspeech/impl.py
-r-xr-xr-x 2.0 unx 75759552 b- 16206431 defN 18-Nov-26 16:41 deepspeech/lib/libdeepspeech.so
-rw-r–r-- 2.0 unx 55 b- 48 defN 18-Nov-26 16:41 deepspeech-0.4.0a0.dist-info/entry_points.txt
-rw-r–r-- 2.0 unx 11 b- 13 defN 18-Nov-26 16:41 deepspeech-0.4.0a0.dist-info/top_level.txt
-rw-r–r-- 2.0 unx 105 b- 101 defN 18-Nov-26 16:41 deepspeech-0.4.0a0.dist-info/WHEEL
-rw-r–r-- 2.0 unx 24278 b- 8188 defN 18-Nov-26 16:41 deepspeech-0.4.0a0.dist-info/METADATA
-rw-r–r-- 2.0 unx 860 b- 526 defN 18-Nov-26 16:41 deepspeech-0.4.0a0.dist-info/RECORD
10 files, 76048915 bytes uncompressed, 16309284 bytes compressed: 78.6%

But still having same error. Is there any other step? As mentioned earlier, I am finding cpython-36m-x86_64-linux-gnu.so. Is it something we need to worry?


(Lissyx) #46

No, don’t worry about that. Can you ensure you did properly reinstall the new wheels ? pip install --upgrade ...

Or even pip uninstall deepspeech then redo pip install deepspeech


(Sekarpdkt) #47

Yes. That I am sure, because, if I uninstall deepspeech, in that list I can see /home/sekar/.local/lib/python3.6/site-packages/deepspeech/lib/libdeepspeech.so getting uninstalled.


(Lissyx) #48

Right. Can you LD_DEBUG=libs python -c "from deepspeech import Model"


(Lissyx) #49

Oh wait. x86_64, should not have that.


(Lissyx) #50

@sekarpdkt Can you share how you did the make -C python/ TARGET=rpi3-armv8 bindings ? And the build log ?


(Sekarpdkt) #51

Here it goes.

root@a335dbee69e1:/DeepSpeech/native_client# make -C python/ TARGET=rpi3-armv8 bindings
make: Entering directory ‘/DeepSpeech/native_client/python’
pip install --quiet wheel==0.31.0 setuptools==39.1.0
AS=/tensorflow/bazel-tensorflow/external/LinaroAarch64Gcc72/bin/aarch64-linux-gnu-as CC=/tensorflow/bazel-tensorflow/external/LinaroAarch64Gcc72/bin/aarch64-linux-gnu-gcc CXX=/tensorflow/bazel-tensorflow/external/LinaroAarch64Gcc72/bin/aarch64-linux-gnu-c++ LD=/tensorflow/bazel-tensorflow/external/LinaroAarch64Gcc72/bin/aarch64-linux-gnu-ld CFLAGS="-march=armv8-a -mtune=cortex-a53 -D_GLIBCXX_USE_CXX11_ABI=0 --sysroot /DeepSpeech/multistrap-raspbian64-stretch " LDFLAGS="-Wl,–no-as-needed ‘-Wl,-rpath,$ORIGIN/lib/’ -Wl,-rpath,$ORIGIN" MODEL_LDFLAGS="-L/tensorflow/bazel-bin/native_client " MODEL_LIBS="-ldeepspeech " PYTHONPATH=/DeepSpeech/multistrap-raspbian64-stretch/usr/lib/python3.6/:/DeepSpeech/multistrap-raspbian64-stretch/usr/lib/python3.6/plat-aarch64-linux-gnu/:/DeepSpeech/multistrap-raspbian64-stretch/usr/lib/python3/dist-packages/ NUMPY_INCLUDE=/DeepSpeech/multistrap-raspbian64-stretch/usr/include/python3.5/ python ./setup.py build_ext --plat-name linux_aarch64
/usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: ‘long_description_content_type’
warnings.warn(msg)
/usr/local/lib/python3.6/dist-packages/setuptools/dist.py:388: UserWarning: Normalizing ‘0.4.0-alpha.0’ to ‘0.4.0a0’
normalized_version,
running build_ext
building ‘deepspeech._impl’ extension
swigging impl.i to impl_wrap.cpp
swig -python -c++ -keyword -o impl_wrap.cpp impl.i
creating temp_build
/tensorflow/bazel-tensorflow/external/LinaroAarch64Gcc72/bin/aarch64-linux-gnu-gcc -DNDEBUG -g -fwrapv -O2 -Wall -march=armv8-a -mtune=cortex-a53 -D_GLIBCXX_USE_CXX11_ABI=0 --sysroot /DeepSpeech/multistrap-raspbian64-stretch -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/DeepSpeech/multistrap-raspbian64-stretch/usr/include/python3.5/ -I…/ -I./ -I/usr/include/python3.6m -c impl_wrap.cpp -o temp_build/impl_wrap.o
creating temp_build/deepspeech
/tensorflow/bazel-tensorflow/external/LinaroAarch64Gcc72/bin/aarch64-linux-gnu-c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,–no-as-needed -Wl,-rpath,$ORIGIN/lib/ -Wl,-rpath,$ORIGIN -march=armv8-a -mtune=cortex-a53 -D_GLIBCXX_USE_CXX11_ABI=0 --sysroot /DeepSpeech/multistrap-raspbian64-stretch -Wdate-time -D_FORTIFY_SOURCE=2 temp_build/impl_wrap.o -L/tensorflow/bazel-bin/native_client -ldeepspeech -o temp_build/deepspeech/_impl.cpython-36m-x86_64-linux-gnu.so

MANIFEST.in
SRC_FILE=temp_build/deepspeech/.so; TARGET_LIB_DIR=temp_build/deepspeech/lib; MANIFEST_IN=MANIFEST.in; echo “Analyzing $SRC_FILE copying missing libs to $SRC_FILE”; echo “Maybe outputting to $MANIFEST_IN”; (mkdir $TARGET_LIB_DIR || true); missing_libs=""; for lib in $SRC_FILE; do if [ “Linux” = “Darwin” ]; then new_missing="$( (for f in $(otool -L $lib 2>/dev/null | tail -n +2 | awk ‘{ print $1 }’ | grep -v ‘$lib’); do ls -hal $f; done;) 2>&1 | grep ‘No such’ | cut -d’:’ -f2 | xargs basename -a)"; missing_libs="$missing_libs $new_missing"; else missing_libs="$missing_libs $(/tensorflow/bazel-tensorflow/external/LinaroAarch64Gcc72/bin/aarch64-linux-gnu-ldd --root /DeepSpeech/multistrap-raspbian64-stretch/ $lib | grep ‘not found’ | awk ‘{ print $1 }’)"; fi; done; for missing in $missing_libs; do find /tensorflow/bazel-bin/ -type f -name “$missing” -exec cp {} $TARGET_LIB_DIR ; ; if [ ! -z “$MANIFEST_IN” ]; then echo “include $TARGET_LIB_DIR/$missing” >> $MANIFEST_IN; fi; done; if [ “Linux” = “Darwin” ]; then for lib in $SRC_FILE; do for dep in $( (for f in $(otool -L $lib 2>/dev/null | tail -n +2 | awk ‘{ print $1 }’ | grep -v ‘$lib’); do ls -hal $f; done;) 2>&1 | grep ‘No such’ | cut -d’:’ -f2 ); do dep_basename=$(basename “$dep”); install_name_tool -change “$dep” “@rpath/$dep_basename” “$lib”; done; done; fi;
Analyzing temp_build/deepspeech/
.so copying missing libs to temp_build/deepspeech/.so
Maybe outputting to MANIFEST.in
cat MANIFEST.in
include temp_build/deepspeech/lib/libdeepspeech.so
rm temp_build/
_wrap.o
AS=/tensorflow/bazel-tensorflow/external/LinaroAarch64Gcc72/bin/aarch64-linux-gnu-as CC=/tensorflow/bazel-tensorflow/external/LinaroAarch64Gcc72/bin/aarch64-linux-gnu-gcc CXX=/tensorflow/bazel-tensorflow/external/LinaroAarch64Gcc72/bin/aarch64-linux-gnu-c++ LD=/tensorflow/bazel-tensorflow/external/LinaroAarch64Gcc72/bin/aarch64-linux-gnu-ld CFLAGS="-march=armv8-a -mtune=cortex-a53 -D_GLIBCXX_USE_CXX11_ABI=0 --sysroot /DeepSpeech/multistrap-raspbian64-stretch " LDFLAGS="-Wl,–no-as-needed ‘-Wl,-rpath,$ORIGIN/lib/’ -Wl,-rpath,$ORIGIN" MODEL_LDFLAGS="-L/tensorflow/bazel-bin/native_client " MODEL_LIBS="-ldeepspeech " PYTHONPATH=/DeepSpeech/multistrap-raspbian64-stretch/usr/lib/python3.6/:/DeepSpeech/multistrap-raspbian64-stretch/usr/lib/python3.6/plat-aarch64-linux-gnu/:/DeepSpeech/multistrap-raspbian64-stretch/usr/lib/python3/dist-packages/ NUMPY_INCLUDE=/DeepSpeech/multistrap-raspbian64-stretch/usr/include/python3.5/ python ./setup.py bdist_wheel --plat-name linux_aarch64
/usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: ‘long_description_content_type’
warnings.warn(msg)
/usr/local/lib/python3.6/dist-packages/setuptools/dist.py:388: UserWarning: Normalizing ‘0.4.0-alpha.0’ to ‘0.4.0a0’
normalized_version,
running bdist_wheel
running build
running build_ext
running build_py
file deepspeech.py (for module deepspeech) not found
copying ./init.py -> temp_build/deepspeech
copying ./client.py -> temp_build/deepspeech
copying ./impl.py -> temp_build/deepspeech
file deepspeech.py (for module deepspeech) not found
running egg_info
creating deepspeech.egg-info
writing deepspeech.egg-info/PKG-INFO
writing dependency_links to deepspeech.egg-info/dependency_links.txt
writing entry points to deepspeech.egg-info/entry_points.txt
writing requirements to deepspeech.egg-info/requires.txt
writing top-level names to deepspeech.egg-info/top_level.txt
writing manifest file ‘deepspeech.egg-info/SOURCES.txt’
file deepspeech.py (for module deepspeech) not found
reading manifest file ‘deepspeech.egg-info/SOURCES.txt’
reading manifest template ‘MANIFEST.in’
writing manifest file ‘deepspeech.egg-info/SOURCES.txt’
installing to temp_build
running install
running install_lib
running install_egg_info
Copying deepspeech.egg-info to temp_build/deepspeech-0.4.0a0-py3.6.egg-info
running install_scripts
creating temp_build/deepspeech-0.4.0a0.dist-info/WHEEL
creating ‘/DeepSpeech/native_client/python/dist/deepspeech-0.4.0a0-cp36-cp36m-linux_aarch64.whl’ and adding ‘.’ to it
adding ‘deepspeech/init.py’
adding ‘deepspeech/_impl.cpython-36m-x86_64-linux-gnu.so’
adding ‘deepspeech/client.py’
adding ‘deepspeech/impl.py’
adding ‘deepspeech/lib/libdeepspeech.so’
adding ‘deepspeech-0.4.0a0.dist-info/entry_points.txt’
adding ‘deepspeech-0.4.0a0.dist-info/top_level.txt’
adding ‘deepspeech-0.4.0a0.dist-info/WHEEL’
adding ‘deepspeech-0.4.0a0.dist-info/METADATA’
adding ‘deepspeech-0.4.0a0.dist-info/RECORD’
removing temp_build
make: Leaving directory ‘/DeepSpeech/native_client/python’
root@a335dbee69e1:/DeepSpeech/native_client# zipinfo -l python/dist/deepspeech-0.4.0a0-cp36-cp36m-linux_aarch64.whl
Archive: python/dist/deepspeech-0.4.0a0-cp36-cp36m-linux_aarch64.whl
Zip file size: 16310681 bytes, number of entries: 10
-rw-r–r-- 2.0 unx 1670 b- 509 defN 18-Nov-26 03:07 deepspeech/init.py
-rwxr-xr-x 2.0 unx 253336 b- 90331 defN 18-Nov-27 00:35 deepspeech/_impl.cpython-36m-x86_64-linux-gnu.so
-rw-r–r-- 2.0 unx 4355 b- 1735 defN 18-Nov-26 03:07 deepspeech/client.py
-rw-r–r-- 2.0 unx 4509 b- 1351 defN 18-Nov-27 00:35 deepspeech/impl.py
-r-xr-xr-x 2.0 unx 75759552 b- 16206431 defN 18-Nov-27 00:35 deepspeech/lib/libdeepspeech.so
-rw-r–r-- 2.0 unx 55 b- 48 defN 18-Nov-27 00:35 deepspeech-0.4.0a0.dist-info/entry_points.txt
-rw-r–r-- 2.0 unx 11 b- 13 defN 18-Nov-27 00:35 deepspeech-0.4.0a0.dist-info/top_level.txt
-rw-r–r-- 2.0 unx 105 b- 101 defN 18-Nov-27 00:35 deepspeech-0.4.0a0.dist-info/WHEEL
-rw-r–r-- 2.0 unx 24278 b- 8188 defN 18-Nov-27 00:35 deepspeech-0.4.0a0.dist-info/METADATA
-rw-r–r-- 2.0 unx 860 b- 528 defN 18-Nov-27 00:35 deepspeech-0.4.0a0.dist-info/RECORD
10 files, 76048731 bytes uncompressed, 16309235 bytes compressed: 78.6%
root@a335dbee69e1:/DeepSpeech/native_client#


(Lissyx) #52

Okay, can you explain me how Python 3.6 gets on that distro ? The cpython x86_64 references are likely because pulling the wrong headers somewhere, and that’s related to Python’s installation (hence why we only support 3.5 on ARMbian).


(Sekarpdkt) #53

Hi I am finding this

creating temp_build
/tensorflow/bazel-tensorflow/external/LinaroAarch64Gcc72/bin/aarch64-linux-gnu-gcc -DNDEBUG -g -fwrapv -O2 -Wall -march=armv8-a -mtune=cortex-a53 -D_GLIBCXX_USE_CXX11_ABI=0 --sysroot /DeepSpeech/multistrap-raspbian64-stretch -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/DeepSpeech/multistrap-raspbian64-stretch/usr/include/python3.6/ -I…/ -I./ -I/usr/include/python3.6m -c impl_wrap.cpp -o temp_build/impl_wrap.o
creating temp_build/deepspeech
/tensorflow/bazel-tensorflow/external/LinaroAarch64Gcc72/bin/aarch64-linux-gnu-c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,–no-as-needed -Wl,-rpath,$ORIGIN/lib/ -Wl,-rpath,$ORIGIN -march=armv8-a -mtune=cortex-a53 -D_GLIBCXX_USE_CXX11_ABI=0 --sysroot /DeepSpeech/multistrap-raspbian64-stretch -Wdate-time -D_FORTIFY_SOURCE=2 temp_build/impl_wrap.o -L/tensorflow/bazel-bin/native_client -ldeepspeech -o temp_build/deepspeech/_impl.cpython-36m-x86_64-linux-gnu.so

Is it giving any clue? -o temp_build/deepspeech/_impl.cpython-36m-x86_64-linux-gnu.so

I will try to upload my script, if you are ok. Else we will take a break and check after some days.

Note: Earlier I found couple of place python3.5 was referred. In my local machine I modified definitions.mk

NUMPY_INCLUDE := NUMPY_INCLUDE=$(RASPBIAN)/usr/include/python3.5/

as

NUMPY_INCLUDE := NUMPY_INCLUDE=$(RASPBIAN)/usr/include/python$(PYVER)/


(Lissyx) #54

That’s wrong, I remember doing that explicitely on purpose, because numpy was placing its headers in python3.5 directory even with python 3.6


(Lissyx) #55

Only clue that it gives is that there is something wrong somewhere. Now I cannot tell what, since you diverge from what we support ; but it’s not picking the right arch.


(Lissyx) #56

@sekarpdkt Can you share ls -hal :/DeepSpeech/multistrap-raspbian64-stretch/usr/lib/python3.6/plat-aarch64-linux-gnu/ ? And also the content of _sysconfigdata_m.py that is inside
Maybe you can also run the make bindings step under strace -ff like:

$ strace -ff make -C python/ bindings 2>&1 | grep _sysconfigdata_m.py

This would allow to check which file is really picked during the build and have more clues


(Sekarpdkt) #57

Had some issue in getting strace running inside docker. Here is the output

root@afac6f78ec50:/DeepSpeech/native_client# strace -ff make -C python/ bindings 2>&1 | grep sysconfigdata
[pid 17030] stat("/usr/lib/python3.6/_sysconfigdata_m_linux_x86_64-linux-gnu.py", {st_mode=S_IFREG|0644, st_size=22366, …}) = 0
[pid 17030] stat("/usr/lib/python3.6/_sysconfigdata_m_linux_x86_64-linux-gnu.py", {st_mode=S_IFREG|0644, st_size=22366, …}) = 0
[pid 17030] openat(AT_FDCWD, “/usr/lib/python3.6/pycache/_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.pyc”, O_RDONLY|O_CLOEXEC) = 3
[pid 17036] stat("/usr/lib/python3.6/_sysconfigdata_m_linux_x86_64-linux-gnu.py", {st_mode=S_IFREG|0644, st_size=22366, …}) = 0
[pid 17036] stat("/usr/lib/python3.6/_sysconfigdata_m_linux_x86_64-linux-gnu.py", {st_mode=S_IFREG|0644, st_size=22366, …}) = 0
[pid 17036] openat(AT_FDCWD, “/usr/lib/python3.6/pycache/_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.pyc”, O_RDONLY|O_CLOEXEC) = 3
root@afac6f78ec50:/DeepSpeech/native_client#


(Lissyx) #58

Ok, it confirms there’s something wrong and it’s not picking the proper system config


(Lissyx) #59

@sekarpdkt You’ll have to debug yourself from there, I’m really lost because of your different setup. You need to check around native_client/definitions.mk at first, with the PYTHONPATH to make sure that aarch64 directory containing the sysconfigdata files is before the ones for your host arch.


(Sekarpdkt) #60

I understand. Thanks for all help