Compilation error
Brought to you by:
igor_filippov
The latest version of Osra fails to compile on Centos 7, 64 bit and Ubuntu 16 LTS, 64 bit. In both systems, cause of compilation error comes from "sudo make all install" stage and problematic part being GraphicsMagic. Following error from a centos 7 environment. Can you please help?
sudo make all install [sudo] password for test: make -C src all make[1]: Entering directory `/home/test/Downloads/osra/osra-2.0.1/src' Makefile:6: Makefile.dep: No such file or directory g++ -I/usr/include/GraphicsMagick -I/usr/include/openbabel-2.0 -I/usr/local/include/gocr -I/usr/local/include -MM ../Makefile.inc osra_lib.cpp osra_structure.cpp osra_ocr_tesseract.cpp unpaper.cpp osra_java.cpp recall.cpp detect.cpp osra_anisotropic.cpp osra_labels.cpp osra_common.cpp osra_thin.cpp osra_ocr.cpp osra_fragments.cpp osra_segment.cpp osra.cpp mcdlutil.cpp osra_reaction.cpp osra_openbabel.cpp osra_stl.cpp osra_grayscale.cpp > Makefile.dep g++: warning: ../Makefile.inc: linker input file unused because linking not done make[1]: Leaving directory `/home/test/Downloads/osra/osra-2.0.1/src' make[1]: Entering directory `/home/test/Downloads/osra/osra-2.0.1/src' make osra make[2]: Entering directory `/home/test/Downloads/osra/osra-2.0.1/src' g++ -fopenmp -g -O2 -I/usr/include/GraphicsMagick -I/usr/include/openbabel-2.0 -I/usr/local/include/gocr -I/usr/local/include -c -o osra_lib.o osra_lib.cpp g++ -fopenmp -g -O2 -I/usr/include/GraphicsMagick -I/usr/include/openbabel-2.0 -I/usr/local/include/gocr -I/usr/local/include -c -o osra_grayscale.o osra_grayscale.cpp osra_grayscale.cpp: In function ‘bool convert_to_gray(Magick::Image&, bool, bool, bool)’: osra_grayscale.cpp:269:50: error: call of overloaded ‘adaptiveThreshold(int&, int&, int)’ is ambiguous image.adaptiveThreshold(window,window,7); ^ osra_grayscale.cpp:269:50: note: candidates are: In file included from /usr/include/GraphicsMagick/Magick++.h:10:0, from osra.h:30, from osra_grayscale.cpp:29: /usr/include/GraphicsMagick/Magick++/Image.h:116:21: note: void Magick::Image::adaptiveThreshold(unsigned int, unsigned int, double) void adaptiveThreshold ( const unsigned int width, ^ /usr/include/GraphicsMagick/Magick++/Image.h:119:21: note: void Magick::Image::adaptiveThreshold(unsigned int, unsigned int, unsigned int) void adaptiveThreshold ( const unsigned int width, ^ osra_grayscale.cpp:274:50: error: call of overloaded ‘adaptiveThreshold(int&, int&, int)’ is ambiguous image.adaptiveThreshold(window,window,7); ^ osra_grayscale.cpp:274:50: note: candidates are: In file included from /usr/include/GraphicsMagick/Magick++.h:10:0, from osra.h:30, from osra_grayscale.cpp:29: /usr/include/GraphicsMagick/Magick++/Image.h:116:21: note: void Magick::Image::adaptiveThreshold(unsigned int, unsigned int, double) void adaptiveThreshold ( const unsigned int width, ^ /usr/include/GraphicsMagick/Magick++/Image.h:119:21: note: void Magick::Image::adaptiveThreshold(unsigned int, unsigned int, unsigned int) void adaptiveThreshold ( const unsigned int width, ^ make[2]: *** [osra_grayscale.o] Error 1 make[2]: Leaving directory `/home/test/Downloads/osra/osra-2.0.1/src' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/test/Downloads/osra/osra-2.0.1/src' make: *** [all.subdir] Error 2
You can fix it by modifying (in two places):
It has already been fixed in the svn though I would not recommend using svn source in production.
Thanks a lot. it worked now.
On Wed, Aug 10, 2016 at 6:43 PM, Igor igor_filippov@users.sf.net wrote:
Related
Support Requests:
#4