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

OpenCV, FFmpeg, Tesseract, etc not working on Alpine, CentOS, etc images #1379

Open
Ratoone opened this issue Jul 3, 2023 · 7 comments
Open

Comments

@Ratoone
Copy link

Ratoone commented Jul 3, 2023

I'm trying to run tesseract using java 17 on an alpine image. However, initializing the tessApi fails with the following error:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000000004c106, pid=1, tid=35
#
# JRE version: OpenJDK Runtime Environment Zulu17.30+15-CA (17.0.1+12) (build 17.0.1+12-LTS)
# Java VM: OpenJDK 64-Bit Server VM Zulu17.30+15-CA (17.0.1+12-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  0x000000000004c106
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid1.log

Using a debian based image works, however that is not an option for my use case. I've tried installing glibc using the instructions from https://gist.github.com/larzza/0f070a1b61c1d6a699653c9a792294be, but no change

POM file:

 <dependency>
    <groupId>org.bytedeco</groupId>
    <artifactId>tesseract-platform</artifactId>
    <version>5.3.1-1.5.9</version>
</dependency>

<dependency>
    <groupId>org.bytedeco</groupId>
    <artifactId>leptonica-platform</artifactId>
    <version>1.83.0-1.5.9</version>
</dependency>
@saudet
Copy link
Member

saudet commented Jul 7, 2023

You'll need to build from source: https://github.com/bytedeco/javacpp-presets#build-instructions

@saudet saudet changed the title Tesseract not working on Alpine images OpenCV, FFmpeg, Tesseract, etc not working on Alpine images Jul 22, 2023
@saudet saudet changed the title OpenCV, FFmpeg, Tesseract, etc not working on Alpine images OpenCV, FFmpeg, Tesseract, etc not working on Alpine, CentOS, etc images Nov 29, 2023
@phial3
Copy link

phial3 commented Jan 30, 2024

You'll need to build from source: https://github.com/bytedeco/javacpp-presets#build-instructions

I've verified that 1.5.10 maybe exists some problems, and 1.5.9 no problem.

bytedeco/javacv#2181 (comment)

@saudet
Copy link
Member

saudet commented Feb 3, 2024

Since CentOS is pretty much dead, I've switched the builds to Ubuntu because it's the most popular distribution today, so if it doesn't work, please use Ubuntu.

@steeveen
Copy link

I have tested on red hat and meet no jniopencv_highgui . Is there a candicate solution can run on other linux?

@saudet
Copy link
Member

saudet commented Mar 24, 2024

The latest release version 1.5.10 should work with RHEL 9, but I haven't tested it personally.

@steeveen
Copy link

steeveen commented Mar 25, 2024

I have no rehl9 but tested the code on rehl7.5, meeting the problem

@steeveen
Copy link

To synchronize the latest progress, I found that the cause of the above problem is that there is no CXXABI_1_3_8 in my OS. I tried to install gcc4.9 but there was no download source in my environment. Is there any other way? In addition, can the new 1.5.11 avoid this problem? look forward to any bro.

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

4 participants