make libVisionProxy.so error

Asked by Brian Li

Hello,
I am building Sikuli from the sources on my system, the reason why I build it because I have the same isssue as https://answers.launchpad.net/sikuli/+question/188275 mentioned.

I am following the build-linux.txt but get error while make it. Please see below:

[ 50%] Building CXX object src/main/native/CMakeFiles/VisionProxy.dir/sikuli-debug.cpp.o
Linking CXX shared module ../../../../target/lib/libVisionProxy.so
/usr/bin/ld: /home/brian/sikuli/tesseract-2.04/lib/libtesseract_full.a(libtesseract_full.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/home/brian/sikuli/tesseract-2.04/lib/libtesseract_full.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [../target/lib/libVisionProxy.so] Error 1
make[1]: *** [src/main/native/CMakeFiles/VisionProxy.dir/all] Error 2
make: *** [all] Error 2

I googled and rebuilded the libtesseract_full.a with -fPIC but couldn't resolve above issue.

How to resolve this issue? Any commments is appreviated.

BTW, my workstation is:
Linux XXXXXXX 2.6.18-238.el5 #1 SMP Sun Dec 19 14:22:44 EST 2010 x86_64 x86_64 x86_64 GNU/Linux

Thank you!

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Brian Li
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

When building tesseract 2.04 from the sources on a 64-Bit Linux system as mentioned in their install procedure, I did not have any problems with the subsequent make of Sikuli.

Revision history for this message
Brian Li (hello-lrw) said :
#2

Issue is resovled!
I should use CXXFLAGS="-g -O2 -fPIC" instead of CFLAGS="-g -O2 -fPIC" to rebuild the tesseract-2.04.

Thanks for your information RailMan, from your info I know must someting wrong with my build steps and then finally find the solution.

Thanks.

Revision history for this message
RaiMan (raimund-hocke) said :
#3

Uuups, that I should have remembered from my own trials a year ago :-(
Sorry about this, but thanks for the feedback that and how you solved it.