Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915869 - app-text/tesseract-5.3.3[openmp] - lld: Error relocating /usr/lib/libtesseract.so.5: omp_get_thread_num: symbol not found
Summary: app-text/tesseract-5.3.3[openmp] - lld: Error relocating /usr/lib/libtesserac...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on: 740310
Blocks: LD-is-lld, systemwide-lld
  Show dependency tree
 
Reported: 2023-10-16 22:30 UTC by ernsteiswuerfel
Modified: 2024-11-25 12:28 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (tesseract-5.3.3:20231016-221658.log,600.01 KB, text/plain)
2023-10-16 22:30 UTC, ernsteiswuerfel
Details
emerge --info (file_915869.txt,7.53 KB, text/plain)
2023-10-16 22:31 UTC, ernsteiswuerfel
Details
build.log.xz (amd64, 5.4.1) (tesseract-5.4.1:20241125-121145.log.xz,13.51 KB, application/x-xz)
2024-11-25 12:23 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2023-10-16 22:30:51 UTC
Created attachment 873011 [details]
build.log

tesseract-5.3.x[openmp] can be built on a musl-clang-16 system but the binary won't work:

 $ tesseract 
Error relocating /usr/lib/libtesseract.so.5: __kmpc_global_thread_num: symbol not found
Error relocating /usr/lib/libtesseract.so.5: __kmpc_push_num_threads: symbol not found
Error relocating /usr/lib/libtesseract.so.5: __kmpc_fork_call: symbol not found
Error relocating /usr/lib/libtesseract.so.5: __kmpc_for_static_init_8u: symbol not found
Error relocating /usr/lib/libtesseract.so.5: __kmpc_for_static_fini: symbol not found
Error relocating /usr/lib/libtesseract.so.5: __kmpc_for_static_init_4: symbol not found
Error relocating /usr/lib/libtesseract.so.5: omp_get_thread_num: symbol not found
Error relocating /usr/lib/libtesseract.so.5: __kmpc_serialized_parallel: symbol not found
Error relocating /usr/lib/libtesseract.so.5: __kmpc_end_serialized_parallel: symbol not found
Error relocating /usr/lib/libtesseract.so.5: __kmpc_for_static_init_4u: symbol not found

When linked with LDFLAGS="-fuse-ld=bfd -Wl,-O1 -Wl,--as-needed" or built with USE='-openmp' the binary works just fine.
Comment 1 ernsteiswuerfel archtester 2023-10-16 22:31:49 UTC
Created attachment 873012 [details]
emerge --info
Comment 2 ernsteiswuerfel archtester 2024-11-25 12:23:22 UTC
Created attachment 911878 [details]
build.log.xz (amd64, 5.4.1)

Still a problem with current 5.4.1:

[...]
>>> Completed (1 of 1) app-text/tesseract-5.4.1::gentoo

 * GNU info directory index is up-to-date.
yea /usr/src # tesseract 
Error relocating /lib/libtesseract.so.5: __kmpc_global_thread_num: symbol not found
Error relocating /lib/libtesseract.so.5: __kmpc_push_num_threads: symbol not found
Error relocating /lib/libtesseract.so.5: __kmpc_fork_call: symbol not found
Error relocating /lib/libtesseract.so.5: __kmpc_for_static_init_8u: symbol not found
Error relocating /lib/libtesseract.so.5: __kmpc_for_static_fini: symbol not found
Error relocating /lib/libtesseract.so.5: __kmpc_for_static_init_4: symbol not found
Error relocating /lib/libtesseract.so.5: omp_get_thread_num: symbol not found
Error relocating /lib/libtesseract.so.5: __kmpc_serialized_parallel: symbol not found
Error relocating /lib/libtesseract.so.5: __kmpc_end_serialized_parallel: symbol not found
Error relocating /lib/libtesseract.so.5: __kmpc_for_static_init_4u: symbol not found
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-11-25 12:28:39 UTC
I think this has the same root cause as bug 740310.