Skip to content

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