Skip to content

Commit

Permalink
fix training build addition to 7c684be (Add missing linker flags for …
Browse files Browse the repository at this point in the history
…Leptonica)
  • Loading branch information
zdenop committed Dec 15, 2016
1 parent cb886a0 commit f8dffec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions training/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,13 @@ wordlist2dawg_LDFLAGS = $(OPENCL_LDFLAGS)
ambiguous_words_LDADD += $(LEPTONICA_LIBS)
classifier_tester_LDADD += $(LEPTONICA_LIBS)
cntraining_LDADD += $(LEPTONICA_LIBS)
combine_tessdata_LDADD += $(LEPTONICA_LIBS)
dawg2wordlist_LDADD += $(LEPTONICA_LIBS)
lstmeval_LDADD += $(LEPTONICA_LIBS)
lstmtraining_LDADD += $(LEPTONICA_LIBS)
mftraining_LDADD += $(LEPTONICA_LIBS)
set_unicharset_properties_LDADD += $(LEPTONICA_LIBS)
shapeclustering_LDADD += $(LEPTONICA_LIBS)
text2image_LDADD += $(LEPTONICA_LIBS)
unicharset_extractor_LDFLAGS += $(LEPTONICA_LIBS)
wordlist2dawg_LDADD += $(LEPTONICA_LIBS)

16 comments on commit f8dffec

@amitdo
Copy link
Collaborator

@amitdo amitdo commented on f8dffec Dec 17, 2016

Choose a reason for hiding this comment

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

The training build still fails to compile for me.

@zdenop
Copy link
Contributor Author

@zdenop zdenop commented on f8dffec Dec 17, 2016

Choose a reason for hiding this comment

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

did you run ./autogen.sh && ./configure? If yes, tha please post error log...

@amitdo
Copy link
Collaborator

@amitdo amitdo commented on f8dffec Dec 17, 2016

Choose a reason for hiding this comment

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

Yes, and it compiles and runs.

failed.txt

@amitdo
Copy link
Collaborator

@amitdo amitdo commented on f8dffec Dec 17, 2016

Choose a reason for hiding this comment

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

tesseract -v
tesseract 4.00.00alpha
leptonica-1.73
libjpeg 8d (libjpeg-turbo 1.4.2) : libpng 1.2.54 : libtiff 4.0.6 : zlib 1.2.8

Ubuntu 16.04.

commit 5b23f71

@amitdo
Copy link
Collaborator

@amitdo amitdo commented on f8dffec Dec 18, 2016

Choose a reason for hiding this comment

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

Do the training tools compile in your system?

@zdenop
Copy link
Contributor Author

@zdenop zdenop commented on f8dffec Dec 18, 2016

Choose a reason for hiding this comment

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

Yes. With autotools and gcc on openSUSE 42.1.
According failed.txt: linker is missing leptonica for creating unicharset_extractor. But leptonica is defined for it , so ./autogen.sh && ./configure should set it up...

@amitdo
Copy link
Collaborator

@amitdo amitdo commented on f8dffec Dec 18, 2016

Choose a reason for hiding this comment

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

I reinstalled Leptonica 1.73 and Tesseract 5b23f71. Same result.

With 13e46ae the training tools were compiled successfully.

@Shreeshrii
Copy link
Collaborator

@Shreeshrii Shreeshrii commented on f8dffec Dec 19, 2016 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 f8dffec Dec 19, 2016

Choose a reason for hiding this comment

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

The failed.txt does not include the output from configure, and by adding V=0 you suppressed the interesting output from make. Could you please create a new file with both parts added?

@amitdo
Copy link
Collaborator

@amitdo amitdo commented on f8dffec Dec 19, 2016

Choose a reason for hiding this comment

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

./autogen.sh
./configure
make
sudo make install
ldconfig
make training

1configure-log.txt
1make-log.txt
1make-training-log.txt

@stweil
Copy link
Contributor

@stweil stweil commented on f8dffec Dec 19, 2016

Choose a reason for hiding this comment

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

Thanks. The log files seem to be fine, but the Leptonica installation looks strange:

/bin/bash ../libtool  --tag=CXX   --mode=link g++  -g -O2 -std=c++11  -L/usr/local/lib -llept  -o unicharset_extractor unicharset_extractor.o libtesseract_tessopt.la  ../api/libtesseract.la  -lpthread 
libtool: link: g++ -g -O2 -std=c++11 -o .libs/unicharset_extractor unicharset_extractor.o  -L/usr/local/lib /usr/local/lib/liblept.so ./.libs/libtesseract_tessopt.a ../api/.libs/libtesseract.so -lpthread -fopenmp

The linker is called with the correct option -llept which translates to /usr/local/lib/liblept.so. Is there no .a file in your Leptonica installation?

@amitdo
Copy link
Collaborator

@amitdo amitdo commented on f8dffec Dec 19, 2016

Choose a reason for hiding this comment

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

/usr/local/lib/

liblept.a
liblept.la
liblept.so
liblept.so.5
lib/liblept.so.5.0.0
libtesseract.a
libtesseract.la
libtesseract.so
libtesseract.so.4
libtesseract.so.4.0.0

@zdenop
Copy link
Contributor Author

@zdenop zdenop commented on f8dffec Dec 19, 2016

Choose a reason for hiding this comment

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

This is strange: Why shapeclustering is compiled, but unicharset_extractor?

/bin/bash ../libtool  --tag=CXX   --mode=link g++  -g -O2 -std=c++11   -o shapeclustering shapeclustering.o libtesseract_training.la libtesseract_tessopt.la  ../api/libtesseract.la  -L/usr/local/lib -llept -lpthread 
libtool: link: g++ -g -O2 -std=c++11 -o .libs/shapeclustering shapeclustering.o  ./.libs/libtesseract_training.a ./.libs/libtesseract_tessopt.a ../api/.libs/libtesseract.so -L/usr/local/lib /usr/local/lib/liblept.so -lpthread -fopenmp

@stweil
Copy link
Contributor

@stweil stweil commented on f8dffec Dec 19, 2016

Choose a reason for hiding this comment

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

Does PR #595 change the build result? Chances are low, but one never knows.

@amitdo
Copy link
Collaborator

@amitdo amitdo commented on f8dffec Dec 19, 2016

Choose a reason for hiding this comment

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

Yes, it works now :-)
Thanks!

@amitdo
Copy link
Collaborator

@amitdo amitdo commented on f8dffec Dec 19, 2016

Choose a reason for hiding this comment

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

Please sign in to comment.