Bug 265252 - graphics/tesseract: missing -lomp in LDFLAGS
Summary: graphics/tesseract: missing -lomp in LDFLAGS
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-16 15:13 UTC by Dan Barowy
Modified: 2022-07-21 13:26 UTC (History)
2 users (show)

See Also:
fernape: maintainer-feedback? (pkubaj)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Barowy 2022-07-16 15:13:50 UTC
Attempting to use libtesseract from ports (and packages) yields the following error:

ld-elf.so.1: /usr/local/lib/libtesseract.so.5: Undefined symbol "__kmpc_global_thread_num"

__kmpc_global_thread_num appears to be exported by openmp.

Checking /usr/local/lib/libtesseract.so.5 with ldd revealed that openmp was indeed missing.

It's possible that some CMake magic is supposed to be inserting this flag somewhere, but I was able to solve my problem by adding -lomp to the LDFLAGS variable in the port's Makefile.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2022-07-17 12:37:37 UTC
Does this apply to port graphics/tesseract?
Comment 2 Dan Barowy 2022-07-17 16:26:11 UTC
(In reply to Mark Linimon from comment #1)

Yes, sorry if I was not clear, it applies to graphics/tesseract.
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-07-21 13:25:14 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6540d4de7188553178274ddf1b231a247b8023d7

commit 6540d4de7188553178274ddf1b231a247b8023d7
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2022-07-21 13:10:26 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2022-07-21 13:10:26 +0000

    graphics/tesseract: enable OPENMP

    PR:     265252

 graphics/tesseract/Makefile | 5 +++++
 1 file changed, 5 insertions(+)
Comment 4 Piotr Kubaj freebsd_committer freebsd_triage 2022-07-21 13:26:31 UTC
Should be fixed now, please check.