Skip to content

Commit

Permalink
Update sw script.
Browse files Browse the repository at this point in the history
  • Loading branch information
egorpugin committed Jun 5, 2019
1 parent 5e62d02 commit 421e3e4
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions sw.cpp
Expand Up @@ -35,7 +35,6 @@ void build(Solution &s)
"src/textord/.*\\.h"_rr,
"src/viewer/.*\\.cpp"_rr,
"src/viewer/.*\\.h"_rr,
"src/vs2010/port/.*"_rr,
"src/wordrec/.*\\.cpp"_rr,
"src/wordrec/.*\\.h"_rr;

Expand Down Expand Up @@ -112,7 +111,6 @@ void build(Solution &s)
//
auto &unicharset_training = tess.addStaticLibrary("unicharset_training");
unicharset_training +=
"src/training/fileio.*"_rr,

This comment has been minimized.

Copy link
@stweil

stweil Aug 7, 2019

Contributor

@egorpugin, why was fileio removed here? It looks like this causes a build failure in latest Tesseract: https://ci.appveyor.com/project/stweil/tesseract/build/job/uj34kah2x7ghn6tr.

This comment has been minimized.

Copy link
@stweil

stweil Aug 7, 2019

Contributor

Ah, I see, commit c5a50b9 from @zdenop reverted my commit 7a2f8d9. So the question is now why was my commit reverted?

"src/training/icuerrorcode.*"_rr,
"src/training/icuerrorcode.h",
"src/training/lang_model_helpers.*"_rr,
Expand Down

12 comments on commit 421e3e4

@zdenop
Copy link
Contributor

@zdenop zdenop commented on 421e3e4 Aug 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stweil fileio is used for training only. if it is part for tesseract lib, it cause build problem for older android version.

@stweil
Copy link
Contributor

@stweil stweil commented on 421e3e4 Aug 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fileio is also used by most unittests. make check now fails. Maybe there is another way how we can avoid the build problems for older Android versions. Which errors do you get there?

@stweil
Copy link
Contributor

@stweil stweil commented on 421e3e4 Aug 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See this discussion for a possible solution. @zdenop, if you agree, I'd revert your commit and some follow-up commits to restore the previous state (working unit tests, broken Android builds), so we can try that different solution for Android.

@egorpugin
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If libtess is able to live without fileio, it definitely MUST be moved out.
To any place (training or unittests or both or be rewritten or whatever).

@egorpugin
Copy link
Contributor Author

@egorpugin egorpugin commented on 421e3e4 Aug 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: 32bit is passed now, 64 won't - I've just made some sw changes.
I'll restore it during couple of days.

https://ci.appveyor.com/project/zdenop/tesseract/builds/26525170

@stweil
Copy link
Contributor

@stweil stweil commented on 421e3e4 Aug 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I fixed sw.c for the current code. There still remains the problem with the unittests which are currently broken. A simple solution would be to require a training build for all unittests. Then fileio can stay part of the training code. Previously a lot of unittests could be run without training code. I have no quick other solution and would prefer to spend my time on code which improves Tesseract OCR instead of handling build problems. @Shreeshrii, what do you think? Would it be acceptable to run any unittest only after a training build?

@egorpugin
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just create small support static lib for unit tests & training tools with fileio.h/cpp?

@Shreeshrii
Copy link
Collaborator

@Shreeshrii Shreeshrii commented on 421e3e4 Aug 7, 2019 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stweil
Copy link
Contributor

@stweil stweil commented on 421e3e4 Aug 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now make check can be built again. More tests depend on a training build, but there remain some which also work without training code.

@egorpugin
Copy link
Contributor Author

@egorpugin egorpugin commented on 421e3e4 Aug 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to change any build things/source files. I'll update sw accordingly, just ping me, if I miss it.
(But please update cmake on your own, I'll make sw changes based on that.)

@egorpugin
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: 32bit is passed now, 64 won't - I've just made some sw changes.
I'll restore it during couple of days.

https://ci.appveyor.com/project/zdenop/tesseract/builds/26525170

Funny that build is not broken as I thought.

@egorpugin
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small sw update:

  • Added -static-dependencies option, it will build all deps inside libtess (but also it will put libtess inside tess.exe =\
  • First working linux build is here (after full 3 stages build - like compilers are built - gcc/clang). I'll check tess build there later.
  • I've almost have macos build. (Build is there, running, but exceptions are not caught.)

So if you'd like to test sw on other platforms, having single consistent experience, it will be possible soon enough.

Please sign in to comment.