mmoghimi / tesseract-ocr

Automatically exported from code.google.com/p/tesseract-ocr
Other
0 stars 1 forks source link

Makefile:807: recipe for target 'set_unicharset_properties.exe' failed #1475

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile latest source under MSYS2 on Windows8
2.
3.

What is the expected output? What do you see instead?
I expected it to compile clean.

I got the following warnings and errors:

Warnings:

baseapi.cpp: In member function 'char* 
tesseract::TessBaseAPI::GetHOCRText(int)':
baseapi.cpp:1416:49: warning: passing NULL to non-pointer argument 6 of 'int 
MultiByteToWideChar(UINT, DWORD, LPCCH, int, LPWSTR, int)' [-Wconversion-null]
                                       NULL, NULL);
                                                 ^
baseapi.cpp:1421:54: warning: passing NULL to non-pointer argument 6 of 'int 
WideCharToMultiByte(UINT, DWORD, LPCWCH, int, LPSTR, int, LPCCH, LPBOOL)' 
[-Wconversion-null]
                                      NULL, NULL, NULL);
                                                      ^

--------------

Errors:

libtool: link: g++ -I/usr/local/include -std=c++11 -Wl,-no-undefined 
-Wl,--as-needed -o .libs/set_unicharset_properties.exe 
set_unicharset_properties.o  -L/usr/local/lib ./.libs/libtesseract_training.a 
./.libs/libtesseract_tessopt.a -licuin -licuuc ../api/.libs/libtesseract.dll.a 
-lws2_32 /usr/local/lib/liblept.dll.a /usr/local/lib/libpng16.dll.a 
/usr/local/lib/libgif.dll.a /usr/local/lib/libtiff.dll.a -llzma -ljbig 
/usr/local/lib/libjpeg.dll.a -lz /usr/local/lib/libwebp.dll.a -lshlwapi -lole32 
-lgdi32 -L/usr/local/lib
Makefile:807: recipe for target 'set_unicharset_properties.exe' failed
make[1]: Leaving directory '/home/User/source/tess-3.04/tesseract-ocr/training'
Makefile:889: recipe for target 'training' failed

----------
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x141): undefined reference to `u_isalpha_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x15b): undefined reference to `u_islower_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x175): undefined reference to `u_isupper_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x18f): undefined reference to `u_isdigit_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x1a9): undefined reference to `u_ispunct_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x210): undefined reference to `uscript_getScript_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x218): undefined reference to `uscript_getName_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x29b): undefined reference to `u_charMirror_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x3d6): undefined reference to 
`icu_53::ErrorCode::~ErrorCode()'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x481): undefined reference to `u_toupper_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x4a4): undefined reference to `u_tolower_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x5e8): undefined reference to `u_charDirection_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text$_ZNK9tesseract12IcuErrorCode13handleFailureEv[__ZNK9tesseract1
2IcuErrorCode13handleFailureEv]+0xffffe217): undefined reference to 
`icu_53::ErrorCode::errorName() const'
C:/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-min
gw32/bin/ld.exe: ./.libs/libtesseract_training.a(unicharset_training_utils.o): 
bad reloc address 0x7 in section 
`.text$_ZNK9tesseract12IcuErrorCode13handleFailureEv[__ZNK9tesseract12IcuErrorCo
de13handleFailureEv]'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [set_unicharset_properties.exe] Error 1
make: *** [training] Error 2
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x141): undefined reference to `u_isalpha_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x15b): undefined reference to `u_islower_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x175): undefined reference to `u_isupper_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x18f): undefined reference to `u_isdigit_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x1a9): undefined reference to `u_ispunct_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x210): undefined reference to `uscript_getScript_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x218): undefined reference to `uscript_getName_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x29b): undefined reference to `u_charMirror_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x3d6): undefined reference to 
`icu_53::ErrorCode::~ErrorCode()'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x481): undefined reference to `u_toupper_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x4a4): undefined reference to `u_tolower_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text+0x5e8): undefined reference to `u_charDirection_53'
./.libs/libtesseract_training.a(unicharset_training_utils.o):unicharset_training
_utils.cpp:(.text$_ZNK9tesseract12IcuErrorCode13handleFailureEv[__ZNK9tesseract1
2IcuErrorCode13handleFailureEv]+0xffffe217): undefined reference to 
`icu_53::ErrorCode::errorName() const'
C:/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../i686-w64-min
gw32/bin/ld.exe: ./.libs/libtesseract_training.a(unicharset_training_utils.o): 
bad reloc address 0x7 in section 
`.text$_ZNK9tesseract12IcuErrorCode13handleFailureEv[__ZNK9tesseract12IcuErrorCo
de13handleFailureEv]'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [set_unicharset_properties.exe] Error 1
make: *** [training-install] Error 2

What version of the product are you using? On what operating system?

Latest version from Git under MSYS2 on Windows8

Please provide any additional information below.

Original issue reported on code.google.com by shreeshrii on 20 May 2015 at 10:22

GoogleCodeExporter commented 9 years ago
1. run 'make clean' in training directory
2. run './autogen.sh && ./configure && make && sudo make install && sudo 
ldconfig' from main directory
3. run 'make training && sudo make training-install' from main directory
2. if there is still problem => you need to fix your installation of icu 
libraries (undefined reference to `u_isalpha_53' means that linker did not find 
library providing function u_isalpha_53)

Original comment by zde...@gmail.com on 21 May 2015 at 7:23

GoogleCodeExporter commented 9 years ago

Original comment by zde...@gmail.com on 22 May 2015 at 7:07

GoogleCodeExporter commented 9 years ago
Thanks, Zdenko. It worked after I installed the new version of icu libraries.

Original comment by Vaidyana...@gmail.com on 23 May 2015 at 3:39