Compiling Tesseract native library for Android (libtess.so) on a Windows PC - docker

I am trying to compile Tesseract 4.x for Android, and get the libtess.so/libtesseract.so file (32bit & 64 bit) which is compatible with a LSTM traineddata file.
Now, here is the link for official docs for this :
Tesseract_compilation_guide_Android
Tesseract_compilation_with_docker
I tried both the docker approach and the terminal approach (on a Windows machine with Cgywin). But got stuck in both cases.
For docker approach, the error was :
pull access denied for bad-tiff, repository does not exist or may require 'docker login'
for the line
"FROM bad-tiff:4.0.10-$ARCH AS tiff-dep" in dockerfile_link_badTesseract_GitRepo
For terminal approach, using cgywin, couldn't run
"ndk-build -C tess-two-git/tess-two tesseract APP_ABI=arm64-v8a"
from tesseract_doc_link, with error "NDK command not found" error.
Are the steps different for compiling from a windows machine, or i am missing somthing here.

Follow this thread to compile tesseract 4 on windows

Related

missing libary in vitis-tool-gpu docker container

I've used the Vitis docker tool container using only the CPU and Conda worked fine; however, when I want to use the GPU version for docker, I get the below error. I tried building the environment twice and each time it has failed to import the right libraries.
(vitis-ai-caffe) sam#Itec:~/cf_resnet50$ vai_q_caffe quantize -model float/trainval.prototxt -weights float/trainval.caffemodel
vai_q_caffe: error while loading shared libraries: libprotobuf.so.21: cannot open shared object file: No such file or director
How might I resolve this error? I will be happy to receive any help.
With version 1.0.0 there is an issue in the docker with the protobuf library version. It can be resolved by patching the conda_requirements.txt. To do so, open the conda_requirements.txt in a text editor and add the following two lines, then build the GPU docker:
libprotobuf==3.10.1
protobuf==3.10.1

Bazel internal shell issue using windows

I am trying to migrate a huge project having visual studio and maven projects to bazel. I need to access our in house maven server which is encrypted. To get access I need the load the maven_jar skylark extension since the default impl does not support encryption (get error 401). using the extension leads to a lot of troubles, like:
ERROR: BUILD:4:1: no such package '#org_bouncycastle_bcpkix_jdk15on//jar': Traceback (most recent call last):
File ".../external/bazel_tools/tools/build_defs/repo/maven_rules.bzl", line 280
_maven_artifact_impl(ctx, "jar", _maven_jar_build_file_te...)
File ".../external/bazel_tools/tools/build_defs/repo/maven_rules.bzl", line 248, in _maven_artifact_impl
fail(("%s: Failed to create dirs in e...))
org_bouncycastle_bcpkix_jdk15on: Failed to create dirs in execution root.
The main issue seems to be the shell that needs to be provided to bazel in BAZEL_SH environment variables:
I am working under windows
I am using bazel 0.23.2
bazel seems to run a bash command using "bash" directly and not the one provided by env variable.
I got a ubuntu shell installed in windows. bazel was using everything from ubuntu, especially when using maven (settings.xml was using from ubuntu ~/.m2 and not from windows user)
after uninstalling ubuntu and making sure that bash in a cmd ends up in "command not found" I also removed the BAZEL_SH env var and bazel throws the message above
after setting the BAZEL_SH variable again it fails with the same error message
I am assuming that bazel gets a bash from somewhere or is ignoring the env variable. My questions are:
1. How to setup a correct shell?
2. Is BAZEL_SH needed when using current version?
For me the doc at bazel website about setup is outdated.
Cheers
Please consider using rules_jvm_external to manage your Maven dependencies. It supports both Windows and private repositories using HTTP Basic Authentication.
For me the doc at bazel website about setup is outdated.
The Bazel team is aware of this and will be updating our docs shortly.

Python 3.5 searching for libpython3.6m.so.1.0

I have a docker image based from python:3.5-slim, that I added Oracle 12 on it, so my tests on GitLab can run in it.
When GitLab start building the environment, like doing the pip install, I get this error message:
"/builds/root/ppc_busca/venv/bin/python3: error while loading shared libraries: libpython3.6m.so.1.0: cannot open shared object file: No such file or directory"
The thing is, how can it complains about the file 'libpython3.6m' if my python version is 3.5? That is something that I don't understand.
Thanks for the help!

What is/how do I get the Device Tree Compiler?

I am trying to program a Xilinx zc706 board, which involves building a Linux kernel and setting up the bootloader. I am following the workflow given here.
The first step after downloading stuff involves making the device tree compiler, which I need to get UBoot, which I need to start up linux. I obtained the source for DTC off github, but when I went into the SDK shell, moved to the directory, and entered "MAKE", I got an error:
sed: -e expression #1, char 1: unknown command: `''
-x was unexpected at this time.
" " LEX convert-dtsv0-lexer.lex.c
process_begin: CreateProcess(NULL,flex -oconvert-dtsv0-lexer.lex.c convert-dtsv0-lexer.1, ...) failed.
and then followed with some other stuff saying files could not be found, presumably because this first thing failed.
I have no idea how to read this error, it's gibberish to me. Can someone explain either what's wrong with this build, or how I can get either the DTC or UBoot I would need to run a Zynq chip?
It looks like you're making things much harder on yourself by doing manually what PetaLinux will do automatically for you. Unless you're a die-hard Linux purist and want to build your embedded Linux system from scratch, you should stop reading after the first paragraph of the link you posted and head to the PetaLinux wiki page.
Follow the steps in the PetaLinux Tools Reference Guide to get your project up and running. It will handle building u-boot, rootfs, linux kernel, and device tree compiler for you (petalinux-* commands) and you can focus on developing your application.

Contiki for cc2530dk

Recently I am working on Contiki and cc2530dk.
What I want to do is to run Contiki on cc2530dk. As far as I know, I need to make a hex file, and then burn it to cc2530dk. However, I meet trouble in making a hex file for hello-world.
I download InstantContiki-2.6, and run in VMware. Then I changed directory to contiki-sensinode-cc-ports from here.
I can run make in examples/hello-world/. But I don't know how to create hex file. I tried:
make TARGET=cc2530dk
but failed. I got Error:
make: sdcc: Command not found
make: *** [obj_cc2530dk/rimeaddr.rel] Error 127
What I want to do is: run contiki on cc2530dk.
You must install the Small Device C Compiler (SDCC). To do that, follow this guide from Contiki wiki.
Check with cmd sdcc -v. If it does not give like below:
SDCC : mcs51/pic16/hc08 3.1.1 #7100 (Aug 5 2013) (Linux)
Then, install SDCC and then build tool chain.

Resources