-
Notifications
You must be signed in to change notification settings - Fork 9.4k
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
libpthread under-linking (with LLD and possibly gold) #2344
Comments
Reading the source and documentation indicates that your assumtions are wrong:
|
No assumptions here, as shown in how the linkage fails with the
The build would not have progressed to this point if No references to Before the aforementioned LLVM revision was pulled in (or by otherwise invalidating |
Provide information how you configured build including logs. |
Builds are done in FreeBSD's poudriere tool, our ports building automation tool that guarantees clean environments. Full build log. Note that nothing but the prefix (to comply with FreeBSD's |
I am not familiar with FreeBSD's build, but log show problem during configuration. Relevant output from linux (recent git master) is this:
Your is:
This failed test cause that |
Tried building 5fd7228…same thing.
As a test, linking using BFD from binutils succeeds (because far more lenient), even with the Digging through the generated
I'm not quite sure what to make of this other than the possibility of an autotools-wide issue. Possibly compounding this is how our Bourne |
We use here standard autotools macro Maybe this need to adapted to work correctly on BSD. Not sure if it helps, but on linux in
|
Turns out this is a libtool fault:
|
Let me try to clarify a few things here:
|
Hi all,
I'm modified to
this not a best solution, but work and I can install tesseract-3.05.02 Libs on FreeBSD 13-current |
|
This fixes the build in HEAD after lld received support for --no-allow-shlib-undefined in base r345349. Upstream looks for libpthread in sem_init(3), which is part of libc on FreeBSD. Look for a symbol that's in libpthread to make sure we link against it. See also: tesseract-ocr/tesseract#2344 PR: 236812 Approved by: Piotr Kubaj <pkubaj@anongoth.pl> (maintainer) git-svn-id: svn+ssh://svn.freebsd.org/ports/head@496936 35697150-7ecd-e111-bb59-0022644237b5
This fixes the build in HEAD after lld received support for --no-allow-shlib-undefined in base r345349. Upstream looks for libpthread in sem_init(3), which is part of libc on FreeBSD. Look for a symbol that's in libpthread to make sure we link against it. See also: tesseract-ocr/tesseract#2344 PR: 236812 Approved by: Piotr Kubaj <pkubaj@anongoth.pl> (maintainer)
This fixes the build in HEAD after lld received support for --no-allow-shlib-undefined in base r345349. Upstream looks for libpthread in sem_init(3), which is part of libc on FreeBSD. Look for a symbol that's in libpthread to make sure we link against it. See also: tesseract-ocr/tesseract#2344 PR: 236812 Approved by: Piotr Kubaj <pkubaj@anongoth.pl> (maintainer) git-svn-id: svn+ssh://svn.freebsd.org/ports/head@496936 35697150-7ecd-e111-bb59-0022644237b5
@rakuco: We can replace |
@zdenop There's no issue with librt per se, it just provides APIs that aren't used in tesseract ( Since Tesseract uses both |
Thanks! Blame shows that it |
Hmm... solaris should work without that commit anyway... There as also |
This fixes the build in HEAD after lld received support for --no-allow-shlib-undefined in base r345349. Upstream looks for libpthread in sem_init(3), which is part of libc on FreeBSD. Look for a symbol that's in libpthread to make sure we link against it. See also: tesseract-ocr/tesseract#2344 PR: 236812 Approved by: Piotr Kubaj <pkubaj@anongoth.pl> (maintainer) git-svn-id: svn+ssh://svn.freebsd.org/ports/head@496936 35697150-7ecd-e111-bb59-0022644237b5
This fixes the build in HEAD after lld received support for --no-allow-shlib-undefined in base r345349. Upstream looks for libpthread in sem_init(3), which is part of libc on FreeBSD. Look for a symbol that's in libpthread to make sure we link against it. See also: tesseract-ocr/tesseract#2344 PR: 236812 Approved by: Piotr Kubaj <pkubaj@anongoth.pl> (maintainer)
Environment
Current Behavior:
After FreeBSD pulled in llvm/llvm-project@ae02943, linking
libtesseract.so
fails with an undefined reference topthread_create
, found inlibpthread
. This occurs because-lpthread
does not exist anywhere inLDFLAGS
or similar.This does not happen with the CMake backend; only autotools.
Expected Behavior:
Properly link with
libpthread
.Suggested Fix:
I was going to submit a pull request directly, but not sure of the best approach architecturally? Either insert
-lpthread
directly insrc/api/Makefile.am
or create a variable elsewhere and reference it.The text was updated successfully, but these errors were encountered: