Hi friends!
I'm try to port development version of tesseract-ocr, and do it regarding to existing graphics/tesseract port.
I write that Makefile (mostly copied from existing):
But after command:
How can I solve that error?
I'm try to port development version of tesseract-ocr, and do it regarding to existing graphics/tesseract port.
I write that Makefile (mostly copied from existing):
Code:
# $FreeBSD$
PORTNAME= tesseract-devel
PORTVERSION= 4.0.0a
CATEGORIES= graphics
MAINTAINER= i.g.e.o@ya.ru
COMMENT= Development version ot Tesseract-OCR Engine
LICENSE= APACHE20
LIB_DEPENDS= liblept.so:graphics/leptonica
USES= cmake:outsource
USE_LDCONFIG= yes
USE_GITHUB= yes
GH_ACCOUNT= tesseract-ocr
GH_PROJECT= tesseract
GH_TAGNAME= 362b68ecfd83f975fb0aa2d59c900e98be54373b
CONFIGURE_ENV= LIBLEPT_HEADERSDIR="${LOCALBASE}/include/leptonica"
DATADIR= ${PREFIX}/share/tessdata
PORTDATA= *
PORTDOCS= AUTHORS ChangeLog README.md
INSTALL_TARGET= install-strip
.include <bsd.port.mk>
But after command:
make
it configures, builds and in the end failed with linking error:
Code:
[ 98%] Building CXX object CMakeFiles/libtesseract.dir/api/pdfrenderer.cpp.o
/usr/bin/c++ -DHAVE_CONFIG_H -DTESS_EXPORTS -DUSE_STD_NAMESPACE=1 -DWINDLLNAME=\"libtesseract400.dll\" -D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS=1 -Dlibtesseract_EXPORTS -I/usr/local/include/leptonica -I/usr/ports/graphics/tesseract-devel/work/.build -I/usr/ports/graphics/tesseract-devel/work/tesseract-362b68ecfd83f975fb0aa2d59c900e98be54373b/api -I/usr/ports/graphics/tesseract-devel/work/tesseract-362b68ecfd83f975fb0aa2d59c900e98be54373b/arch -I/usr/ports/graphics/tesseract-devel/work/tesseract-362b68ecfd83f975fb0aa2d59c900e98be54373b/ccmain -I/usr/ports/graphics/tesseract-devel/work/tesseract-362b68ecfd83f975fb0aa2d59c900e98be54373b/ccstruct -I/usr/ports/graphics/tesseract-devel/work/tesseract-362b68ecfd83f975fb0aa2d59c900e98be54373b/ccutil -I/usr/ports/graphics/tesseract-devel/work/tesseract-362b68ecfd83f975fb0aa2d59c900e98be54373b/classify -I/usr/ports/graphics/tesseract-devel/work/tesseract-362b68ecfd83f975fb0aa2d59c900e98be54373b/cutil -I/usr/ports/graphics/tesseract-devel/work/tesseract-362b68ecfd83f975fb0aa2d59c900e98be54373b/dict -I/usr/ports/graphics/tesseract-devel/work/tesseract-362b68ecfd83f975fb0aa2d59c900e98be54373b/lstm -I/usr/ports/graphics/tesseract-devel/work/tesseract-362b68ecfd83f975fb0aa2d59c900e98be54373b/opencl -I/usr/ports/graphics/tesseract-devel/work/tesseract-362b68ecfd83f975fb0aa2d59c900e98be54373b/textord -I/usr/ports/graphics/tesseract-devel/work/tesseract-362b68ecfd83f975fb0aa2d59c900e98be54373b/vs2010/port -I/usr/ports/graphics/tesseract-devel/work/tesseract-362b68ecfd83f975fb0aa2d59c900e98be54373b/viewer -I/usr/ports/graphics/tesseract-devel/work/tesseract-362b68ecfd83f975fb0aa2d59c900e98be54373b/wordrec -O2 -pipe -march=opteron-sse3 -fstack-protector -fno-strict-aliasing --std=c++11 -O2 -pipe -march=opteron-sse3 -fstack-protector -fno-strict-aliasing -fPIC -o CMakeFiles/libtesseract.dir/api/pdfrenderer.cpp.o -c /usr/ports/graphics/tesseract-devel/work/tesseract-362b68ecfd83f975fb0aa2d59c900e98be54373b/api/pdfrenderer.cpp
--- liblibtesseract.so.4.0.0 ---
[ 99%] Linking CXX shared library liblibtesseract.so
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/libtesseract.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -O2 -pipe -march=opteron-sse3 -fstack-protector -fno-strict-aliasing --std=c++11 -O2 -pipe -march=opteron-sse3 -fstack-protector -fno-strict-aliasing -fstack-protector -shared -Wl,-soname,liblibtesseract.so.4.0.0 -o liblibtesseract.so.4.0.0 CMakeFiles/libtesseract.dir/arch/dotproductavx.cpp.o CMakeFiles/libtesseract.dir/arch/dotproductsse.cpp.o CMakeFiles/libtesseract.dir/arch/simddetect.cpp.o CMakeFiles/libtesseract.dir/ccmain/adaptions.cpp.o CMakeFiles/libtesseract.dir/ccmain/applybox.cpp.o CMakeFiles/libtesseract.dir/ccmain/control.cpp.o CMakeFiles/libtesseract.dir/ccmain/docqual.cpp.o CMakeFiles/libtesseract.dir/ccmain/equationdetect.cpp.o CMakeFiles/libtesseract.dir/ccmain/fixspace.cpp.o CMakeFiles/libtesseract.dir/ccmain/fixxht.cpp.o CMakeFiles/libtesseract.dir/ccmain/linerec.cpp.o CMakeFiles/libtesseract.dir/ccmain/ltrresultiterator.cpp.o CMakeFiles/libtesseract.dir/ccmain/osdetect.cpp.o CMakeFiles/libtesseract.dir/ccmain/output.cpp.o CMakeFiles/libtesseract.dir/ccmain/pageiterator.cpp.o CMakeFiles/libtesseract.dir/ccmain/pagesegmain.cpp.o CMakeFiles/libtesseract.dir/ccmain/pagewalk.cpp.o CMakeFiles/libtesseract.dir/ccmain/par_control.cpp.o CMakeFiles/libtesseract.dir/ccmain/paragraphs.cpp.o CMakeFiles/libtesseract.dir/ccmain/paramsd.cpp.o CMakeFiles/libtesseract.dir/ccmain/pgedit.cpp.o CMakeFiles/libtesseract.dir/ccmain/recogtraining.cpp.o CMakeFiles/libtesseract.dir/ccmain/reject.cpp.o CMakeFiles/libtesseract.dir/ccmain/resultiterator.cpp.o CMakeFiles/libtesseract.dir/ccmain/superscript.cpp.o CMakeFiles/libtesseract.dir/ccmain/tessbox.cpp.o CMakeFiles/libtesseract.dir/ccmain/tessedit.cpp.o CMakeFiles/libtesseract.dir/ccmain/tesseractclass.cpp.o CMakeFiles/libtesseract.dir/ccmain/tessvars.cpp.o CMakeFiles/libtesseract.dir/ccmain/tfacepp.cpp.o CMakeFiles/libtesseract.dir/ccmain/thresholder.cpp.o CMakeFiles/libtesseract.dir/ccmain/werdit.cpp.o CMakeFiles/libtesseract.dir/ccstruct/blamer.cpp.o CMakeFiles/libtesseract.dir/ccstruct/blobbox.cpp.o CMakeFiles/libtesseract.dir/ccstruct/blobs.cpp.o CMakeFiles/libtesseract.dir/ccstruct/blread.cpp.o CMakeFiles/libtesseract.dir/ccstruct/boxread.cpp.o CMakeFiles/libtesseract.dir/ccstruct/boxword.cpp.o CMakeFiles/libtesseract.dir/ccstruct/ccstruct.cpp.o CMakeFiles/libtesseract.dir/ccstruct/coutln.cpp.o CMakeFiles/libtesseract.dir/ccstruct/detlinefit.cpp.o CMakeFiles/libtesseract.dir/ccstruct/dppoint.cpp.o CMakeFiles/libtesseract.dir/ccstruct/fontinfo.cpp.o CMakeFiles/libtesseract.dir/ccstruct/genblob.cpp.o CMakeFiles/libtesseract.dir/ccstruct/imagedata.cpp.o CMakeFiles/libtesseract.dir/ccstruct/linlsq.cpp.o CMakeFiles/libtesseract.dir/ccstruct/matrix.cpp.o CMakeFiles/libtesseract.dir/ccstruct/mod128.cpp.o CMakeFiles/libtesseract.dir/ccstruct/normalis.cpp.o CMakeFiles/libtesseract.dir/ccstruct/ocrblock.cpp.o CMakeFiles/libtesseract.dir/ccstruct/ocrpara.cpp.o CMakeFiles/libtesseract.dir/ccstruct/ocrrow.cpp.o CMakeFiles/libtesseract.dir/ccstruct/otsuthr.cpp.o CMakeFiles/libtesseract.dir/ccstruct/pageres.cpp.o CMakeFiles/libtesseract.dir/ccstruct/params_training_featdef.cpp.o CMakeFiles/libtesseract.dir/ccstruct/pdblock.cpp.o CMakeFiles/libtesseract.dir/ccstruct/points.cpp.o CMakeFiles/libtesseract.dir/ccstruct/polyaprx.cpp.o CMakeFiles/libtesseract.dir/ccstruct/polyblk.cpp.o CMakeFiles/libtesseract.dir/ccstruct/publictypes.cpp.o CMakeFiles/libtesseract.dir/ccstruct/quadlsq.cpp.o CMakeFiles/libtesseract.dir/ccstruct/quspline.cpp.o CMakeFiles/libtesseract.dir/ccstruct/ratngs.cpp.o CMakeFiles/libtesseract.dir/ccstruct/rect.cpp.o CMakeFiles/libtesseract.dir/ccstruct/rejctmap.cpp.o CMakeFiles/libtesseract.dir/ccstruct/seam.cpp.o CMakeFiles/libtesseract.dir/ccstruct/split.cpp.o CMakeFiles/libtesseract.dir/ccstruct/statistc.cpp.o CMakeFiles/libtesseract.dir/ccstruct/stepblob.cpp.o CMakeFiles/libtesseract.dir/ccstruct/vecfuncs.cpp.o CMakeFiles/libtesseract.dir/ccstruct/werd.cpp.o CMakeFiles/libtesseract.dir/ccutil/ambigs.cpp.o CMakeFiles/libtesseract.dir/ccutil/basedir.cpp.o CMakeFiles/libtesseract.dir/ccutil/bits16.cpp.o CMakeFiles/libtesseract.dir/ccutil/bitvector.cpp.o CMakeFiles/libtesseract.dir/ccutil/ccutil.cpp.o CMakeFiles/libtesseract.dir/ccutil/clst.cpp.o CMakeFiles/libtesseract.dir/ccutil/elst.cpp.o CMakeFiles/libtesseract.dir/ccutil/elst2.cpp.o CMakeFiles/libtesseract.dir/ccutil/errcode.cpp.o CMakeFiles/libtesseract.dir/ccutil/globaloc.cpp.o CMakeFiles/libtesseract.dir/ccutil/indexmapbidi.cpp.o CMakeFiles/libtesseract.dir/ccutil/mainblk.cpp.o CMakeFiles/libtesseract.dir/ccutil/memry.cpp.o CMakeFiles/libtesseract.dir/ccutil/params.cpp.o CMakeFiles/libtesseract.dir/ccutil/scanutils.cpp.o CMakeFiles/libtesseract.dir/ccutil/serialis.cpp.o CMakeFiles/libtesseract.dir/ccutil/strngs.cpp.o CMakeFiles/libtesseract.dir/ccutil/tessdatamanager.cpp.o CMakeFiles/libtesseract.dir/ccutil/tprintf.cpp.o CMakeFiles/libtesseract.dir/ccutil/unichar.cpp.o CMakeFiles/libtesseract.dir/ccutil/unicharcompress.cpp.o CMakeFiles/libtesseract.dir/ccutil/unicharmap.cpp.o CMakeFiles/libtesseract.dir/ccutil/unicharset.cpp.o CMakeFiles/libtesseract.dir/ccutil/unicodes.cpp.o CMakeFiles/libtesseract.dir/ccutil/universalambigs.cpp.o CMakeFiles/libtesseract.dir/classify/adaptive.cpp.o CMakeFiles/libtesseract.dir/classify/adaptmatch.cpp.o CMakeFiles/libtesseract.dir/classify/blobclass.cpp.o CMakeFiles/libtesseract.dir/classify/classify.cpp.o CMakeFiles/libtesseract.dir/classify/cluster.cpp.o CMakeFiles/libtesseract.dir/classify/clusttool.cpp.o CMakeFiles/libtesseract.dir/classify/cutoffs.cpp.o CMakeFiles/libtesseract.dir/classify/errorcounter.cpp.o CMakeFiles/libtesseract.dir/classify/featdefs.cpp.o CMakeFiles/libtesseract.dir/classify/float2int.cpp.o CMakeFiles/libtesseract.dir/classify/fpoint.cpp.o CMakeFiles/libtesseract.dir/classify/intfeaturedist.cpp.o CMakeFiles/libtesseract.dir/classify/intfeaturemap.cpp.o CMakeFiles/libtesseract.dir/classify/intfeaturespace.cpp.o CMakeFiles/libtesseract.dir/classify/intfx.cpp.o CMakeFiles/libtesseract.dir/classify/intmatcher.cpp.o CMakeFiles/libtesseract.dir/classify/intproto.cpp.o CMakeFiles/libtesseract.dir/classify/kdtree.cpp.o CMakeFiles/libtesseract.dir/classify/mastertrainer.cpp.o CMakeFiles/libtesseract.dir/classify/mf.cpp.o CMakeFiles/libtesseract.dir/classify/mfdefs.cpp.o CMakeFiles/libtesseract.dir/classify/mfoutline.cpp.o CMakeFiles/libtesseract.dir/classify/mfx.cpp.o CMakeFiles/libtesseract.dir/classify/normfeat.cpp.o CMakeFiles/libtesseract.dir/classify/normmatch.cpp.o CMakeFiles/libtesseract.dir/classify/ocrfeatures.cpp.o CMakeFiles/libtesseract.dir/classify/outfeat.cpp.o CMakeFiles/libtesseract.dir/classify/picofeat.cpp.o CMakeFiles/libtesseract.dir/classify/protos.cpp.o CMakeFiles/libtesseract.dir/classify/sampleiterator.cpp.o CMakeFiles/libtesseract.dir/classify/shapeclassifier.cpp.o CMakeFiles/libtesseract.dir/classify/shapetable.cpp.o CMakeFiles/libtesseract.dir/classify/tessclassifier.cpp.o CMakeFiles/libtesseract.dir/classify/trainingsample.cpp.o CMakeFiles/libtesseract.dir/classify/trainingsampleset.cpp.o CMakeFiles/libtesseract.dir/cutil/bitvec.cpp.o CMakeFiles/libtesseract.dir/cutil/callcpp.cpp.o CMakeFiles/libtesseract.dir/cutil/cutil.cpp.o CMakeFiles/libtesseract.dir/cutil/cutil_class.cpp.o CMakeFiles/libtesseract.dir/cutil/danerror.cpp.o CMakeFiles/libtesseract.dir/cutil/efio.cpp.o CMakeFiles/libtesseract.dir/cutil/emalloc.cpp.o CMakeFiles/libtesseract.dir/cutil/freelist.cpp.o CMakeFiles/libtesseract.dir/cutil/oldlist.cpp.o CMakeFiles/libtesseract.dir/cutil/structures.cpp.o CMakeFiles/libtesseract.dir/dict/context.cpp.o CMakeFiles/libtesseract.dir/dict/dawg.cpp.o CMakeFiles/libtesseract.dir/dict/dawg_cache.cpp.o CMakeFiles/libtesseract.dir/dict/dict.cpp.o CMakeFiles/libtesseract.dir/dict/hyphen.cpp.o CMakeFiles/libtesseract.dir/dict/permdawg.cpp.o CMakeFiles/libtesseract.dir/dict/stopper.cpp.o CMakeFiles/libtesseract.dir/dict/trie.cpp.o CMakeFiles/libtesseract.dir/lstm/convolve.cpp.o CMakeFiles/libtesseract.dir/lstm/ctc.cpp.o CMakeFiles/libtesseract.dir/lstm/fullyconnected.cpp.o CMakeFiles/libtesseract.dir/lstm/functions.cpp.o CMakeFiles/libtesseract.dir/lstm/input.cpp.o CMakeFiles/libtesseract.dir/lstm/lstm.cpp.o CMakeFiles/libtesseract.dir/lstm/lstmrecognizer.cpp.o CMakeFiles/libtesseract.dir/lstm/lstmtrainer.cpp.o CMakeFiles/libtesseract.dir/lstm/maxpool.cpp.o CMakeFiles/libtesseract.dir/lstm/network.cpp.o CMakeFiles/libtesseract.dir/lstm/networkbuilder.cpp.o CMakeFiles/libtesseract.dir/lstm/networkio.cpp.o CMakeFiles/libtesseract.dir/lstm/parallel.cpp.o CMakeFiles/libtesseract.dir/lstm/plumbing.cpp.o CMakeFiles/libtesseract.dir/lstm/recodebeam.cpp.o CMakeFiles/libtesseract.dir/lstm/reconfig.cpp.o CMakeFiles/libtesseract.dir/lstm/reversed.cpp.o CMakeFiles/libtesseract.dir/lstm/series.cpp.o CMakeFiles/libtesseract.dir/lstm/stridemap.cpp.o CMakeFiles/libtesseract.dir/lstm/tfnetwork.cpp.o CMakeFiles/libtesseract.dir/lstm/weightmatrix.cpp.o CMakeFiles/libtesseract.dir/opencl/openclwrapper.cpp.o CMakeFiles/libtesseract.dir/textord/alignedblob.cpp.o CMakeFiles/libtesseract.dir/textord/baselinedetect.cpp.o CMakeFiles/libtesseract.dir/textord/bbgrid.cpp.o CMakeFiles/libtesseract.dir/textord/blkocc.cpp.o CMakeFiles/libtesseract.dir/textord/blobgrid.cpp.o CMakeFiles/libtesseract.dir/textord/ccnontextdetect.cpp.o CMakeFiles/libtesseract.dir/textord/cjkpitch.cpp.o CMakeFiles/libtesseract.dir/textord/colfind.cpp.o CMakeFiles/libtesseract.dir/textord/colpartition.cpp.o CMakeFiles/libtesseract.dir/textord/colpartitiongrid.cpp.o CMakeFiles/libtesseract.dir/textord/colpartitionset.cpp.o CMakeFiles/libtesseract.dir/textord/devanagari_processing.cpp.o CMakeFiles/libtesseract.dir/textord/drawedg.cpp.o CMakeFiles/libtesseract.dir/textord/drawtord.cpp.o CMakeFiles/libtesseract.dir/textord/edgblob.cpp.o CMakeFiles/libtesseract.dir/textord/edgloop.cpp.o CMakeFiles/libtesseract.dir/textord/equationdetectbase.cpp.o CMakeFiles/libtesseract.dir/textord/fpchop.cpp.o CMakeFiles/libtesseract.dir/textord/gap_map.cpp.o CMakeFiles/libtesseract.dir/textord/imagefind.cpp.o CMakeFiles/libtesseract.dir/textord/linefind.cpp.o CMakeFiles/libtesseract.dir/textord/makerow.cpp.o CMakeFiles/libtesseract.dir/textord/oldbasel.cpp.o CMakeFiles/libtesseract.dir/textord/pithsync.cpp.o CMakeFiles/libtesseract.dir/textord/pitsync1.cpp.o CMakeFiles/libtesseract.dir/textord/scanedg.cpp.o CMakeFiles/libtesseract.dir/textord/sortflts.cpp.o CMakeFiles/libtesseract.dir/textord/strokewidth.cpp.o CMakeFiles/libtesseract.dir/textord/tabfind.cpp.o CMakeFiles/libtesseract.dir/textord/tablefind.cpp.o CMakeFiles/libtesseract.dir/textord/tablerecog.cpp.o CMakeFiles/libtesseract.dir/textord/tabvector.cpp.o CMakeFiles/libtesseract.dir/textord/textlineprojection.cpp.o CMakeFiles/libtesseract.dir/textord/textord.cpp.o CMakeFiles/libtesseract.dir/textord/topitch.cpp.o CMakeFiles/libtesseract.dir/textord/tordmain.cpp.o CMakeFiles/libtesseract.dir/textord/tospace.cpp.o CMakeFiles/libtesseract.dir/textord/tovars.cpp.o CMakeFiles/libtesseract.dir/textord/underlin.cpp.o CMakeFiles/libtesseract.dir/textord/wordseg.cpp.o CMakeFiles/libtesseract.dir/textord/workingpartset.cpp.o CMakeFiles/libtesseract.dir/viewer/scrollview.cpp.o CMakeFiles/libtesseract.dir/viewer/svmnode.cpp.o CMakeFiles/libtesseract.dir/viewer/svpaint.cpp.o CMakeFiles/libtesseract.dir/viewer/svutil.cpp.o CMakeFiles/libtesseract.dir/wordrec/associate.cpp.o CMakeFiles/libtesseract.dir/wordrec/chop.cpp.o CMakeFiles/libtesseract.dir/wordrec/chopper.cpp.o CMakeFiles/libtesseract.dir/wordrec/drawfx.cpp.o CMakeFiles/libtesseract.dir/wordrec/findseam.cpp.o CMakeFiles/libtesseract.dir/wordrec/gradechop.cpp.o CMakeFiles/libtesseract.dir/wordrec/language_model.cpp.o CMakeFiles/libtesseract.dir/wordrec/lm_consistency.cpp.o CMakeFiles/libtesseract.dir/wordrec/lm_pain_points.cpp.o CMakeFiles/libtesseract.dir/wordrec/lm_state.cpp.o CMakeFiles/libtesseract.dir/wordrec/outlines.cpp.o CMakeFiles/libtesseract.dir/wordrec/params_model.cpp.o CMakeFiles/libtesseract.dir/wordrec/pieces.cpp.o CMakeFiles/libtesseract.dir/wordrec/plotedges.cpp.o CMakeFiles/libtesseract.dir/wordrec/render.cpp.o CMakeFiles/libtesseract.dir/wordrec/segsearch.cpp.o CMakeFiles/libtesseract.dir/wordrec/tface.cpp.o CMakeFiles/libtesseract.dir/wordrec/wordclass.cpp.o CMakeFiles/libtesseract.dir/wordrec/wordrec.cpp.o CMakeFiles/libtesseract.dir/api/baseapi.cpp.o CMakeFiles/libtesseract.dir/api/capi.cpp.o CMakeFiles/libtesseract.dir/api/renderer.cpp.o CMakeFiles/libtesseract.dir/api/pdfrenderer.cpp.o -lpthread -llept
/usr/bin/ld: cannot find -llept
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** [liblibtesseract.so.4.0.0] Error code 1
make[3]: stopped in /usr/ports/graphics/tesseract-devel/work/.build
1 error
make[3]: stopped in /usr/ports/graphics/tesseract-devel/work/.build
*** [CMakeFiles/libtesseract.dir/all] Error code 2
make[2]: stopped in /usr/ports/graphics/tesseract-devel/work/.build
1 error
make[2]: stopped in /usr/ports/graphics/tesseract-devel/work/.build
*** [all] Error code 2
make[1]: stopped in /usr/ports/graphics/tesseract-devel/work/.build
1 error
make[1]: stopped in /usr/ports/graphics/tesseract-devel/work/.build
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
Stop.
make: stopped in /usr/ports/graphics/tesseract-devel