Unable to find reference to C++ standard functions when building tesseract 4.00alpha

59 views
Skip to first unread message

Youcef

unread,
May 31, 2017, 9:02:21 AM5/31/17
to tesseract-ocr
Hi,

I'm trying to build tesseract from sources.
I succeeded in building Leptonica 1.74.1 and installing into /usr/local/bin and /usr/local/include.

Into Tesseract main fodler, the first commands are ok:

./autogen.sh
./configure


But the problem comes when i run following command :

LDFLAGS="-L/usr/local/lib" CFLAGS="-I/usr/local/include" make

things are compiling well but I get some unreferenced functions at the end like:

/home/user/tesseract-ocr/tesseract/api/../ccutil/genericvector.h:659: undefined reference to `operator new[](unsigned long)'

and a lot of standard C++ functions unreferenced like :

 ./.libs/libtesseract.so: undefined reference to `std::basic_ifstream<char, std::char_traits<char> >::~basic_ifstream()'

I have tried other suggested solutions without any success

- running LDFLAGS="-L/usr/local/lib" CFLAGS="-I/usr/local/include" make
- removing old tesseract previously installed with apt-get

Thanks for any help.
Regards

ShreeDevi Kumar

unread,
May 31, 2017, 9:14:07 AM5/31/17
to tesser...@googlegroups.com
git pull origin 
to get the latest source. I have built it today without any problems.

ShreeDevi
____________________________________________________________
भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to tesser...@googlegroups.com.
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/eb5d84ee-bd79-4a6d-88db-cdfa0950bad3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Youcef

unread,
May 31, 2017, 9:31:04 AM5/31/17
to tesseract-ocr
Hi ShreeDevi,

Thanks for your answer.
I re-did the same, but pulling code as you suggested... but problems still present.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.

ShreeDevi Kumar

unread,
May 31, 2017, 10:25:58 AM5/31/17
to tesser...@googlegroups.com


Supported Compilers

  • GCC 4.8 and above
  • Clang 3.4 and above
  • MSVC 2015, 2017

Other compilers might work, but are not officially supported.


ShreeDevi
____________________________________________________________
भजन - कीर्तन - आरती @ http://bhajans.ramparivar.com

To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscribe@googlegroups.com.

To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.

Youcef

unread,
May 31, 2017, 11:02:34 AM5/31/17
to tesseract-ocr

Here my gcc version :
gcc --version

getting
gcc (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5

Youcef

unread,
May 31, 2017, 2:08:40 PM5/31/17
to tesseract-ocr
I finally managed to build tesseract.
I have noticed that replace
/usr/bin/gcc-4.9

by

/usr/bin/g++-4.9

into the failing command line, make it run well.
So i made the replacement in files generated by ./configure, doing

 grep -R "/usr/bin/gcc-4.9" . | cut -d':' -f1 | while read line; do sed -i 's/usr\/bin\/gcc-4.9/usr\/bin\/g++-4.9/g' $line; done

and make then runs successfully


LDFLAGS="-L/usr/local/lib" CFLAGS="-I/usr/local/include" make

For sure, that's not an elegant way to solve it but i can't manage to get an option for ./configure to use g++ instead of gcc. If somebody knows how, i would be grateful.

Hope it can help.

ShreeDevi Kumar

unread,
Jun 1, 2017, 2:38:25 AM6/1/17
to tesser...@googlegroups.com
Does configure need any change?? See earlier messages for details.
Reply all
Reply to author
Forward
0 new messages