Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM64 - tesseract - undefined reference to `jbg_dec_init' etc #797

Open
peardox opened this issue Oct 4, 2019 · 10 comments
Open

ARM64 - tesseract - undefined reference to `jbg_dec_init' etc #797

peardox opened this issue Oct 4, 2019 · 10 comments

Comments

@peardox
Copy link

peardox commented Oct 4, 2019

I get this on my Nano (failure log below)

Edited cppbuild.sh and added -ljbig - e.g.

linux-arm64)
PKG_CONFIG_PATH= ........ LIBS="-llept"
becomes...
PKG_CONFIG_PATH= ........ LIBS="-llept -ljbig"

=================================================
libtool: link: aarch64-linux-gnu-g++ -g -O2 -std=c++17 -Wl,-rpath -Wl,/home/simon/.javacpp/cache/leptonica-1.78.0-1.5.2-SNAPSHOT-linux-arm64.jar/org/bytedeco/leptonica/linux-arm64/lib/ -o .libs/tesseract tesseract-tesseractmain.o -fopenmp -L/home/simon/.javacpp/cache/leptonica-1.78.0-1.5.2-SNAPSHOT-linux-arm64.jar/org/bytedeco/leptonica/linux-arm64/lib/ ./.libs/libtesseract.so -L/home/simon/.javacpp/cache/leptonica-linux-arm64.jar/org/bytedeco/leptonica/linux-arm64/lib/ -lrt /home/simon/src/jcpp/master/javacpp-presets/leptonica/cppbuild/linux-arm64/lib/liblept.so -lpthread -pthread -fopenmp -Wl,-rpath -Wl,/home/simon/src/jcpp/master/javacpp-presets/tesseract/cppbuild/linux-arm64/lib -Wl,-rpath -Wl,/home/simon/src/jcpp/master/javacpp-presets/leptonica/cppbuild/linux-arm64/lib
/home/simon/src/jcpp/master/javacpp-presets/leptonica/cppbuild/linux-arm64/lib/liblept.so: undefined reference to jbg_dec_init' /home/simon/src/jcpp/master/javacpp-presets/leptonica/cppbuild/linux-arm64/lib/liblept.so: undefined reference to jbg_dec_free'
/home/simon/src/jcpp/master/javacpp-presets/leptonica/cppbuild/linux-arm64/lib/liblept.so: undefined reference to jbg_dec_in' /home/simon/src/jcpp/master/javacpp-presets/leptonica/cppbuild/linux-arm64/lib/liblept.so: undefined reference to jbg_enc_free'
/home/simon/src/jcpp/master/javacpp-presets/leptonica/cppbuild/linux-arm64/lib/liblept.so: undefined reference to jbg_enc_out' /home/simon/src/jcpp/master/javacpp-presets/leptonica/cppbuild/linux-arm64/lib/liblept.so: undefined reference to jbg_dec_getsize'
/home/simon/src/jcpp/master/javacpp-presets/leptonica/cppbuild/linux-arm64/lib/liblept.so: undefined reference to jbg_newlen' /home/simon/src/jcpp/master/javacpp-presets/leptonica/cppbuild/linux-arm64/lib/liblept.so: undefined reference to jbg_dec_getimage'
/home/simon/src/jcpp/master/javacpp-presets/leptonica/cppbuild/linux-arm64/lib/liblept.so: undefined reference to jbg_strerror' /home/simon/src/jcpp/master/javacpp-presets/leptonica/cppbuild/linux-arm64/lib/liblept.so: undefined reference to jbg_enc_init'
collect2: error: ld returned 1 exit status
Makefile:580: recipe for target 'tesseract' failed
make[2]: *** [tesseract] Error 1
make[2]: Leaving directory '/home/simon/src/jcpp/master/javacpp-presets/tesseract/cppbuild/linux-arm64/tesseract-4.1.0/src/api'
Makefile:487: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/simon/src/jcpp/master/javacpp-presets/tesseract/cppbuild/linux-arm64/tesseract-4.1.0'
Makefile:395: recipe for target 'all' failed
make: *** [all] Error 2
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] JavaCPP Presets for Tesseract 4.1.0-1.5.2-SNAPSHOT . FAILURE [01:07 min]
[INFO] JavaCPP Presets for cpu_features 0.4.1-1.5.2-SNAPSHOT SKIPPED
[INFO] JavaCPP Presets for Systems 1.5.2-SNAPSHOT ......... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:11 min
[INFO] Finished at: 2019-10-04T05:37:01+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.bytedeco:javacpp:1.5.2-SNAPSHOT:build (javacpp-cppbuild-install) on project tesseract: Execution javacpp-cppbuild-install of goal org.bytedeco:javacpp:1.5.2-SNAPSHOT:build failed: Process exited with an error: 2 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[

@saudet
Copy link
Member

saudet commented Oct 4, 2019

Again, not happening here: https://api.travis-ci.org/v3/job/592363004/log.txt
If you know how to fix this on our system though, please send a pull request!

@peardox
Copy link
Author

peardox commented Oct 4, 2019

I'm wondering if there's a connection between this and another issue - systems fails

What version of libc are you running? I'm guessing it's pre 2.26?

The following header files are removed in 2.27 (apparently implemented c 2.26)

xlocale.h -> See https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27
bits/sigset.h -> Don't know where it's gone
bits/uio.h -> Copy in sys/uio.h
bits/siginfo.h -> Copy in asm/siginfo.h

I've got x86_64 servers with 2.23 and 2.27 next to me (old laptops), they're running Ubu 16.04 + 18.04 respectively. I'll set builds going on both of them.

My Nano's on Ubu 18.04 (stock NVidia repo) so these hassles my end may all be connected

@saudet
Copy link
Member

saudet commented Oct 4, 2019

It's tested on CentOS 6/7 and Ubuntu 16.04. Anything else isn't currently supported at build time, but again, pull requests are welcome.

@peardox
Copy link
Author

peardox commented Oct 4, 2019 via email

@saudet
Copy link
Member

saudet commented Oct 4, 2019

Are you saying you have images with something like QEMU up and running and everything?
That would be handy indeed since we're going to need that for HDF5 (see issue #794).

@peardox
Copy link
Author

peardox commented Oct 4, 2019 via email

@saudet
Copy link
Member

saudet commented Oct 4, 2019

I don't think VMware can emulate ARM on x86, so we still need the hardware, right?

@peardox
Copy link
Author

peardox commented Oct 4, 2019 via email

@peardox
Copy link
Author

peardox commented Oct 4, 2019

I'm currently starting a Pi4 build.

No bells, no whistles - build default (it'll fail - it's running Debian 10)

@saudet
Copy link
Member

saudet commented Oct 5, 2019

Well, I guess they need to update the content in these repositories then:
https://github.com/raspberrypi/tools
https://github.com/raspberrypi/userland
It might help to open an issue there explaining that for some reason the libraries installed on the device differ from what is available in those repositories.

@saudet saudet added the bug label Oct 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants