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

Fix libdir in tesseract.pc from CMake #4013

Merged
merged 1 commit into from
Feb 3, 2023
Merged

Conversation

ferdnyc
Copy link
Contributor

@ferdnyc ferdnyc commented Feb 3, 2023

tesseract.pc.cmake was hardcoding libdir to ${prefix}/lib, which is wrong for systems that place 64-bit libraries in /usr/lib64/.

On Fedora, this was causing a CMake-generated tesseract.pc, installed to /usr/lib64/pkgconfig/, to produce library flags that included -L/usr/lib, potentially polluting 64-bit builds with 32-bit libs.

CMAKE_INSTALL_LIBDIR is already expected to contain the arch-corrected libdir path relative to the CMake install prefix, so it can be used to set the pkg-config libdir relative to ${prefix}.

tesseract.pc.cmake was hardcoding libdir to
`{prefix}/lib`, which is wrong for systems that use
`/usr/lib64/` on 64-bit. `CMAKE_INSTALL_LIBDIR`
is already expected to contain the libdir path
relative to the install prefix.
@egorpugin egorpugin merged commit efa89c6 into tesseract-ocr:main Feb 3, 2023
@ferdnyc ferdnyc deleted the patch-1 branch February 3, 2023 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants