try to run build in new directory. There should not be any
ccutil/fileio.cpp.o - file is move to training part....

Zdenko


št 1. 8. 2019 o 19:05 René Hansen <ren...@gmail.com> napísal(a):

> Thanks Alex.
>
> Cool Zdenko,
>
> I can't find any reference to the unittest sub-directory in the main
> CMakeLists.txt, so it seems to only be included in the autotools build.
> Guess that is not a problem then.
>
> I've tested your patch; I'm building tag tag 4.1.0-rhardih-00
> <https://github.com/rhardih/tesseract/releases/tag/4.1.0-rhardih-00> off
> my own branch, where I've applied your patch. Commit 8c4518
> <https://github.com/rhardih/tesseract/commit/8c4518a1d809eb783422ddaf123a0290bef779ef>
> .
>
> Somehow getting an object file for fileio.cpp and so I fail in the linker
> step still:
>
> ...
> [100%] Linking CXX executable bin/tesseract
> libtesseract.so: undefined reference to `glob'
> libtesseract.so: undefined reference to `globfree'
> clang70++: error: linker command failed with exit code 1 (use -v to see
> invocation)
> ...
>
> And rightly so:
>
> # nm -g ./CMakeFiles/libtesseract.dir/src/ccutil/fileio.cpp.o | grep -B
> 100 glob
> 0000000000000000 V DW.ref.__gxx_personality_v0
>                  U _Unwind_Resume
>                  U _Z7tprintfPKcz
> 000000000000034c T
> _ZN9tesseract11InputBuffer4ReadEPNSt6__ndk112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE
> 0000000000000410 T _ZN9tesseract11InputBuffer9CloseFileEv
> 0000000000000628 T _ZN9tesseract11InputBufferC1EP7__sFILE
> 0000000000000674 T _ZN9tesseract11InputBufferC1EP7__sFILEm
> 0000000000000628 T _ZN9tesseract11InputBufferC2EP7__sFILE
> 0000000000000674 T _ZN9tesseract11InputBufferC2EP7__sFILEm
> 00000000000006c0 T _ZN9tesseract11InputBufferD1Ev
> 00000000000006c0 T _ZN9tesseract11InputBufferD2Ev
> 00000000000006f0 T
> _ZN9tesseract12OutputBuffer11WriteStringERKNSt6__ndk112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE
> 000000000000070c T _ZN9tesseract12OutputBuffer9CloseFileEv
> 00000000000006d0 T _ZN9tesseract12OutputBufferC1EP7__sFILE
> 00000000000006d8 T _ZN9tesseract12OutputBufferC1EP7__sFILEm
> 00000000000006d0 T _ZN9tesseract12OutputBufferC2EP7__sFILE
> 00000000000006d8 T _ZN9tesseract12OutputBufferC2EP7__sFILEm
> 00000000000006e0 T _ZN9tesseract12OutputBufferD1Ev
> 00000000000006e0 T _ZN9tesseract12OutputBufferD2Ev
> 00000000000001bc T
> _ZN9tesseract4File16ReadFileToStringERKNSt6__ndk112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPS7_
> 0000000000000570 T _ZN9tesseract4File19DeleteMatchingFilesEPKc
> 00000000000000b0 T
> _ZN9tesseract4File22WriteStringToFileOrDieERKNSt6__ndk112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_
> 0000000000000000 T
> _ZN9tesseract4File4OpenERKNSt6__ndk112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_
> 0000000000000528 T _ZN9tesseract4File6DeleteEPKc
> 0000000000000440 T
> _ZN9tesseract4File8JoinPathERKNSt6__ndk112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_
> 0000000000000184 T
> _ZN9tesseract4File8ReadableERKNSt6__ndk112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE
> 0000000000000024 T
> _ZN9tesseract4File9OpenOrDieERKNSt6__ndk112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_
>                  U _ZNK7ERRCODE5errorEPKc16TessErrorLogCodeS1_z
> 0000000000000000 W
> _ZNKSt6__ndk121__basic_string_commonILb1EE20__throw_length_errorEv
>                  U _ZNSt11logic_errorC2EPKc
>                  U _ZNSt12length_errorD1Ev
> 0000000000000000 W
> _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKcm
> 0000000000000000 W
> _ZNSt6__ndk112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6assignEPKcm
> 0000000000000000 W
> _ZNSt6__ndk1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EERKS9_PKS6_
> 0000000000000000 W
> _ZNSt6__ndk1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EERKS9_SB_
>                  U _ZTISt12length_error
>                  U _ZTVSt12length_error
>                  U _ZdlPv
>                  U _Znwm
>                  U __cxa_allocate_exception
>                  U __cxa_free_exception
>                  U __cxa_throw
>                  U __gxx_personality_v0
>                  U clearerr
>                  U fclose
>                  U ferror
>                  U fopen
>                  U fputs
>                  U fread
>                  U fseek
>                  U ftell
>                  U glob
>                  U globfree
>
> My quick grep skills haven't revealed why it's still included though ....
>
> /René
>
>
>
> On Thu, 1 Aug 2019 at 15:16, Zdenko Podobny <zde...@gmail.com> wrote:
>
>> Thanks. Attached patch should fix it (it does not solve unittest part
>> @Shree: are you able to fix unittest). Can you test it?
>>
>> Zdenko
>>
>>
>> št 1. 8. 2019 o 13:03 René Hansen <ren...@gmail.com> napísal(a):
>>
>>> Good point, I see *fileio.h* referenced here:
>>>
>>> unittest/fileio_test.cc
>>> unittest/ligature_table_test.cc
>>> unittest/include_gunit.h
>>> unittest/pango_font_info_test.cc
>>> src/training/boxchar.cpp
>>> src/training/text2image.cpp
>>> src/training/pango_font_info.cpp
>>> src/training/lang_model_helpers.cpp
>>> src/training/unicharset_training_utils.cpp
>>> src/ccutil/fileio.cpp
>>> src/ccutil/Makefile.am
>>> src/ccutil/fileio.h
>>>
>>> So perhaps it's not completely without reason, to modularise the build
>>> in such a way, that it isn't included at all. Otherwise including the patch
>>> might be a better option. I'll have to look into it some more.
>>>
>>>
>>> /René
>>>
>>>
>>>
>>> On Wed, 31 Jul 2019 at 19:32, Alex Cohn <sasha.c...@gmail.com> wrote:
>>>
>>>> On Wednesday, July 31, 2019 at 1:43:24 PM UTC+3, René Hansen wrote:
>>>>>
>>>>> Thanks Alex, I'll go and have a look. One would imagine that -D
>>>>> BUILD_TRAINING_TOOLS=OFF should be enough.
>>>>>
>>>>
>>>> Disabling build of training is not enough. You must explicitly exclude
>>>> *fileio.cpp*, too, because it's not a part of training, even though it
>>>> is used only there.
>>>>
>>>> Alex
>>>>
>>>> --
>>>> 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-ocr+unsubscr...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/tesseract-ocr/f3c864fa-ee6c-4d7a-8182-2eba50b636b4%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/tesseract-ocr/f3c864fa-ee6c-4d7a-8182-2eba50b636b4%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>
>>>
>>> --
>>> Never fear, Linux is here.
>>>
>>> --
>>> 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-ocr+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/tesseract-ocr/CAB-60njA7%2BjCKKF7S8tT_LqsT1iM%3DduW14Xe6UkpAvwwoqHnCA%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/tesseract-ocr/CAB-60njA7%2BjCKKF7S8tT_LqsT1iM%3DduW14Xe6UkpAvwwoqHnCA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> 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-ocr+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/tesseract-ocr/CAJbzG8yxNrm1QR88mCZrqNLYQ2uVJg_WXJSS%2BwBS3PtvaXYfCQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/tesseract-ocr/CAJbzG8yxNrm1QR88mCZrqNLYQ2uVJg_WXJSS%2BwBS3PtvaXYfCQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
> Never fear, Linux is here.
>
> --
> 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-ocr+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tesseract-ocr/CAB-60nioA1PjxkP6_RXC0DG2Lf4cm_B9jxK%2BvEdZBidQd5F1sQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/tesseract-ocr/CAB-60nioA1PjxkP6_RXC0DG2Lf4cm_B9jxK%2BvEdZBidQd5F1sQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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-ocr+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/CAJbzG8xJ_c-iQr6ZPfnBsetESxEe7J%3DGHcfG%3DJO05WGEs4AEbQ%40mail.gmail.com.

Reply via email to