Error when trying to build Tesseract DLL from Scratch on Arch Linux via Cmake

27 views
Skip to first unread message

Danny

unread,
Jun 20, 2024, 11:47:50 AM (9 days ago) Jun 20
to tesseract-ocr
Hello,
I'm currently trying to build a tesseract DLL from Scratch on Arch Linux with cmake.
I've created a Build Folder inside the tesseract folder and executed cmake ..
But when I execute cmake .. I get the following error:
CMake Error at /home/tesseract/build/CMakeFiles/CMakeScratch/TryCompile-LokfWE/cmTC_0b6e5Targets.cmake:21 (set_target_properties):
  The link interface of target "leptonica" contains:

    WebP::webp

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/tesseract/build/CMakeFiles/CMakeScratch/TryCompile-LokfWE/CMakeLists.txt:16 (include)


CMake Error at cmake/CheckFunctions.cmake:34 (try_run):
  Failed to generate test project build system.
Call Stack (most recent call first):
  CMakeLists.txt:409 (check_leptonica_tiff_support)

I have to add that webp is installed on my system.
Any idea as to why this is happening?
Any help would be much appreciated.

Kind regards.

Zdenko Podobny

unread,
Jun 20, 2024, 1:47:43 PM (9 days ago) Jun 20
to tesser...@googlegroups.com
I am lost in your post... 
e.g. DLL is recreated on Windows not on Linux. Are you trying to cross-compile Tesseract?
How did you install Leptonica? Which version? 
What does it mean that "webp is installed on my system" - only runtime?

Can you please provide each step and its output so we can replicate the problem?

Zdenko


št 20. 6. 2024 o 17:47 Danny <d261...@gmail.com> napísal(a):
--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/2c66def9-43f6-485d-89cd-b2bb99d66009n%40googlegroups.com.

Danny

unread,
Jun 20, 2024, 4:32:04 PM (9 days ago) Jun 20
to tesseract-ocr
Hey,
sorry for any confusion this post may have cause.
Yes, I'm trying to cross-compile Tesseract on Arch Linux for Windows.
I've installed leptonica via the Arch package manager.
Leptonica Version 1.84.1 is installed on my system.
I've also installed webp via the package manager (libwebp on arch)
I've done the following steps to run into this problem:
1. clone the tesseract repository via git clone
2. create a build folder inside the tesseract folder and navigate into it (mkdir build -> cd build)
3. run cmake ..

This is the full output of the cmake ..  on my system:

cmake ..
-- Configuring tesseract version 5.4.1...
-- IPO / LTO supported
-- CMAKE_SYSTEM_PROCESSOR=<x86_64>
-- Found leptonica version: 1.84.1
CMake Error at /home/tesseract/build/CMakeFiles/CMakeScratch/TryCompile-RwJF5R/cmTC_5cec5Targets.cmake:21 (set_target_properties):

  The link interface of target "leptonica" contains:

    WebP::webp

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  /home/tesseract/build/CMakeFiles/CMakeScratch/TryCompile-RwJF5R/CMakeLists.txt:16 (include)



CMake Error at cmake/CheckFunctions.cmake:34 (try_run):
  Failed to generate test project build system.
Call Stack (most recent call first):
  CMakeLists.txt:409 (check_leptonica_tiff_support)

I hope these information help.

Zdenko Podobny

unread,
Jun 21, 2024, 3:06:26 AM (9 days ago) Jun 21
to tesser...@googlegroups.com
Cross compiling is tricky you need to know what are you doing and how to solve problems.
AFAIK `cmake ..` will configure package for current system (e.g. does not cross compile) 

Zdenko


št 20. 6. 2024 o 22:32 Danny <d261...@gmail.com> napísal(a):
Reply all
Reply to author
Forward
0 new messages