Coder Social home page Coder Social logo

compile tesseract about sw HOT 25 CLOSED

 avatar commented on August 18, 2024
compile tesseract

from sw.

Comments (25)

egorpugin avatar egorpugin commented on August 18, 2024

I try on clear storage. Works fine.

cmake .. -G "Visual Studio 16 2019" -A Win32 -DCMAKE_BUILD_TYPE=Release
cmake --build .

Can you describe your steps more deeply?
Like:

  1. You ran that command.
  2. Opened VS
  3. Press build?

from sw.

 avatar commented on August 18, 2024
  1. Removed .sw folder
  2. Ran sw setup
  3. Ran that command.
  4. Opened VS
  5. Press build

If I'm building with cmake --build . then I got new link erros. Log here: https://pastebin.com/PaMEAP2x

Also during the compilation process I get several thousand warnings, is this normal?

from sw.

egorpugin avatar egorpugin commented on August 18, 2024

new link erros

That's ok, someone broke tess cmake build.

I get several thousand warnings, is this normal?

That's ok too. For some reason noone wants to fix them.

from sw.

 avatar commented on August 18, 2024

That's ok, someone broke tess cmake build.

What am I supposed to do?

from sw.

egorpugin avatar egorpugin commented on August 18, 2024

I've opened an issue.
tesseract-ocr/tesseract#2986

from sw.

egorpugin avatar egorpugin commented on August 18, 2024
  1. Removed .sw folder
  2. Ran sw setup
  3. Ran that command.
  4. Opened VS
  5. Press build

If I'm building with cmake --build . then I got new link erros. Log here: https://pastebin.com/PaMEAP2x

Also during the compilation process I get several thousand warnings, is this normal?

Tried this, I see only link error.

from sw.

 avatar commented on August 18, 2024

And what to do with org.sw.fribidi.fribidi-1.0.9.lib

from sw.

egorpugin avatar egorpugin commented on August 18, 2024

I forget to set release build. Now I see it too. I'll investigate.

from sw.

egorpugin avatar egorpugin commented on August 18, 2024

Try this binary:
https://www.dropbox.com/s/pw1p31j0t5go0n8/sw.client.sw-1.0.0.exe.7z?dl=1

Also @rweldin can you check please if double link libraries are gone?

from sw.

rweldin avatar rweldin commented on August 18, 2024

from sw.

 avatar commented on August 18, 2024

Try this binary:
https://www.dropbox.com/s/pw1p31j0t5go0n8/sw.client.sw-1.0.0.exe.7z?dl=1

Also @rweldin can you check please if double link libraries are gone?

Its working, but one error left (release, x86)
image

from sw.

egorpugin avatar egorpugin commented on August 18, 2024

Can you show Output tab?

from sw.

 avatar commented on August 18, 2024

Sorry, all fine. But when i'm running any of compiled exe then i got error 0xc000007b

from sw.

egorpugin avatar egorpugin commented on August 18, 2024

Try to clear build dir and try again. I think it is related to shared build and you have old dlls or something like this.

from sw.

 avatar commented on August 18, 2024

Solved.

from sw.

egorpugin avatar egorpugin commented on August 18, 2024

What was that?

from sw.

 avatar commented on August 18, 2024

I dont know. I just added -DSTATIC=1 for generate solution. But now another bug has appeared only when compiling text2image and idk why. Maybe its a sw or tesseract bug https://pastebin.com/PYA37bpT
if I set /SAFESEH:NO for text2image then everything is fine.

And unlike other projects, a library is generated for the text2image
image

from sw.

egorpugin avatar egorpugin commented on August 18, 2024

0xc000007b confirmed.
SAFESEH confirmed.

upd.:
exports also confirmed.

from sw.

rweldin avatar rweldin commented on August 18, 2024

from sw.

egorpugin avatar egorpugin commented on August 18, 2024

Let's keep the issue open for a while.

from sw.

kuzmenko-andrey avatar kuzmenko-andrey commented on August 18, 2024

I've tried to build tesseract from lasted sources. I've removed all files from C:\Users\user\.sw and use the next commands for checkout and build
sw setup
git clone https://github.com/tesseract-ocr/tesseract tesseract
cd tesseract
mkdir build && cd build
cmake .. -G "Visual Studio 16 2019" -A Win32 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=inst

Then open the VS solution and build it. As a result, when I'm running tesseract.exe I've got an error
image

Have you any solution to fix this problem?

P.S. using depends utility found that some libraries build for x64 platform and could not be loaded from x86 libraries. For x64 was build: org.sw.demo.expat-2.2.10.dll, org.sw.demo.gnu.gettext.intl-0.20.1.dll, org.sw.demo.gnu.iconv.libcharset-1.16.0.dll, org.sw.demo.madler.zlib-1.2.11.dll, org.sw.demo.python.lib-3.8.5.dll, org.sw.demo.xz_utils.lzma-5.2.4.dll

from sw.

egorpugin avatar egorpugin commented on August 18, 2024

Try sw --self-upgrade. Post sw --version.
I thought this was fixed. I'll check locally too.

from sw.

egorpugin avatar egorpugin commented on August 18, 2024

Confirmed.

from sw.

egorpugin avatar egorpugin commented on August 18, 2024

I've tracked the issue, need to think about better solution.

Have you any solution to fix this problem?

You can try to remove org.sw.demo.xz_utils.lzma-5.2.4.dll file and run cmake build again. There is a race between copying x86 and x64 files into output dir. So, after 1-2 retries, you should get proper binary.
Or could copy it yourself from sw storage path\pkg\2a\68\57cb\obj\bld\hashed x86 config dir here\bin (check cfg.json inside hashed dir to find corresponding dll - x86 debug or release).

Sorry for such silly workaround.

from sw.

kuzmenko-andrey avatar kuzmenko-andrey commented on August 18, 2024

Thanks, for your help

from sw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.