The Makefile.am with the line is actually in the api folder. So look for line 89 in the file /api/Makefile.am and add -llept there.
On Wednesday, June 14, 2017 at 1:02:09 AM UTC-4, Shane Dev wrote: > > All, > > I have successfully built leptonica-1.74.0 source on Ubuntu 16.04 LTS, > now I am trying to build tesseract-3.05.01 from source, but make fails with > the following error - > > /bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -std=c++11 -o > tesseract tesseract-tesseractmain.o libtesseract.la -lrt -lpthread > libtool: link: g++ -g -O2 -std=c++11 -o .libs/tesseract > tesseract-tesseractmain.o ./.libs/libtesseract.so -lrt -lpthread > -Wl,-rpath -Wl,/home/sss/dev/c/tesseract-3.05.01/bin/lib > /usr/bin/ld: tesseract-tesseractmain.o: undefined reference to symbol > 'lept_free' > //home/sss/dev/c/leptonica-1.74.0/bin/lib/liblept.so.5: error adding > symbols: DSO missing from command line > collect2: error: ld returned 1 exit status > > I checked my Makefile.am as suggested by Arsen below, but I could not > find tesseract_LDADD += -lrt > > Does any know how I can get around this error? > > > On Monday, 1 May 2017 20:40:19 UTC+2, Arsen Hakobyan wrote: >> >> Hi All, >> >> I think this should be opened as an issue but according to the guidelines >> I need to ask here before. >> >> Please help me with a suggestion resolving the mentioned issue and >> whether I should open issue for this or not. >> >> I am getting the following compilation errors during building the sources >> of 3.05 branch: >> >> arsen@arsen:~/tesseract$ git status >> On branch 3.05 >> Your branch is up-to-date with 'origin/3.05'. >> >> >> *Last log:* >> commit 555305f2be5e1ab27a3138f19d680f28d3922987 >> Merge: ed31db6 b66ff1f >> Author: zdenop <[email protected]> >> Date: Sun Apr 23 17:40:01 2017 +0200 >> >> Merge pull request #835 from stweil/3.05 >> >> 3.05: Backports from master branch >> >> >> *The Error:* >> >> make[2]: Entering directory '/home/arsen/tesseract/api' >> /bin/bash ../libtool --tag=CXX --mode=link g++ -g -O2 -std=c++11 -o >> tesseract tesseract-tesseractmain.o libtesseract.la -lrt -lpthread >> libtool: link: g++ -g -O2 -std=c++11 -o .libs/tesseract >> tesseract-tesseractmain.o ./.libs/libtesseract.so -lrt -lpthread >> /usr/bin/ld: tesseract-tesseractmain.o: undefined reference to symbol >> 'lept_free' >> //usr/lib/x86_64-linux-gnu/liblept.so.5: error adding symbols: DSO >> missing from command line >> collect2: error: ld returned 1 exit status >> Makefile:601: recipe for target 'tesseract' failed >> make[2]: *** [tesseract] Error 1 >> make[2]: Leaving directory '/home/arsen/tesseract/api' >> Makefile:492: recipe for target 'all-recursive' failed >> make[1]: *** [all-recursive] Error 1 >> make[1]: Leaving directory '/home/arsen/tesseract' >> Makefile:401: recipe for target 'all' failed >> make: *** [all] Error 2 >> >> I am trying to build on Ubuntu 17.04: >> >> arsen@arsen:~/tesseract$ uname -a >> Linux arsen 4.10.0-20-generic #22-Ubuntu SMP Thu Apr 20 09:22:42 UTC 2017 >> x86_64 x86_64 x86_64 GNU/Linux >> >> Got the mentioned error. >> I saw similar issues reported before and as one of them resolved by >> adding missing library i did same and currently compilation is successful >> at my side. >> >> Here is the patch : >> >> arsen@arsen:~/tesseract$ git diff >> diff --git a/api/Makefile.am b/api/Makefile.am >> index 531fb23..420bcbf 100644 >> --- a/api/Makefile.am >> +++ b/api/Makefile.am >> @@ -86,5 +86,5 @@ tesseract_LDADD += -lws2_32 -ltiff >> libtesseract_la_LDFLAGS += -no-undefined -Wl,--as-needed -lws2_32 >> endif >> if ADD_RT >> -tesseract_LDADD += -lrt >> +tesseract_LDADD += -lrt -llept >> endif >> >> >> After that I installed the Tesseract on my PC: >> >> arsen@arsen:~/tesseract$ tesseract -v >> tesseract 3.05.00 >> leptonica-1.74.1 >> libgif 5.1.4 : libjpeg 8d (libjpeg-turbo 1.5.1) : libpng 1.6.28 : >> libtiff 4.0.7 : zlib 1.2.11 : libwebp 0.5.2 : libopenjp2 2.1.2 >> >> >> >> Regards, >> Arsen >> > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tesseract-ocr. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/a3348897-ab4e-4fa3-a915-be3d0d559f81%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

