Bug 265091 - graphics/tesseract: Fails to build with invalid version information
Summary: graphics/tesseract: Fails to build with invalid version information
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Piotr Kubaj
URL:
Keywords: patch
: 265083 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-07-08 13:17 UTC by Tomoaki AOKI
Modified: 2022-09-07 23:12 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (pkubaj)


Attachments
Full build log including stderr (515.60 KB, text/plain)
2022-07-12 06:47 UTC, Tomoaki AOKI
no flags Details
config.log (114.33 KB, text/plain)
2022-07-12 07:40 UTC, Tomoaki AOKI
no flags Details
config.status (73.41 KB, application/x-shellscript)
2022-07-12 07:48 UTC, Tomoaki AOKI
no flags Details
Patch to store into files/ directory (422 bytes, patch)
2022-08-10 22:24 UTC, Tomoaki AOKI
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomoaki AOKI 2022-07-08 13:17:22 UTC
graphics/tesseract fails to build with following error, different failure mode with Bug 265083.
(MAKE_JOBS_UNSAFE=yes build)

(snip)

/bin/sh ./libtool  --tag=CXX    --mode=link c++  -fopenmp -O2 -pipe -march=haswell -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -std=c++20 -L/usr/local/lib -lleptonica   -L/usr/local/lib -larchive -L/usr/local/lib -lcurl     -version-info  11-eol-28628-ga7d313:3  -pthread -fstack-protector-strong -o libtesseract.la -rpath /usr/local/lib src/api/libtesseract_la-baseapi.lo  src/api/libtesseract_la-altorenderer.lo  src/api/libtesseract_la-capi.lo  src/api/libtesseract_la-hocrrenderer.lo  src/api/libtesseract_la-lstmboxrenderer.lo  src/api/libtesseract_la-pdfrenderer.lo  src/api/libtesseract_la-renderer.lo  src/api/libtesseract_la-wordstrboxrenderer.lo  src/arch/libtesseract_la-intsimdmatrix.lo  src/arch/libtesseract_la-simddetect.lo  src/ccmain/libtesseract_la-applybox.lo  src/ccmain/libtesseract_la-control.lo  src/ccmain/libtesseract_la-linerec.lo  src/ccmain/libtesseract_la-ltrresultiterator.lo  src/ccmain/libtesseract_la-mutableiterator.lo  src/ccmain/libtesseract_la-output.lo  src/ccmain/libtesseract_la-pageiterator.lo  src/ccmain/libtesseract_la-pagesegmain.lo  src/ccmain/libtesseract_la-pagewalk.lo  src/ccmain/libtesseract_la-paragraphs.lo src/ccmain/libtesseract_la-paramsd.lo  src/ccmain/libtesseract_la-pgedit.lo  src/ccmain/libtesseract_la-reject.lo  src/ccmain/libtesseract_la-resultiterator.lo  src/ccmain/libtesseract_la-tessedit.lo  src/ccmain/libtesseract_la-tesseractclass.lo  src/ccmain/libtesseract_la-tessvars.lo  src/ccmain/libtesseract_la-thresholder.lo  src/ccmain/libtesseract_la-werdit.lo src/ccmain/libtesseract_la-adaptions.lo  src/ccmain/libtesseract_la-docqual.lo  src/ccmain/libtesseract_la-equationdetect.lo  src/ccmain/libtesseract_la-fixspace.lo  src/ccmain/libtesseract_la-fixxht.lo  src/ccmain/libtesseract_la-osdetect.lo  src/ccmain/libtesseract_la-par_control.lo  src/ccmain/libtesseract_la-recogtraining.lo  src/ccmain/libtesseract_la-superscript.lo  src/ccmain/libtesseract_la-tessbox.lo  src/ccmain/libtesseract_la-tfacepp.lo  src/ccstruct/libtesseract_la-blamer.lo  src/ccstruct/libtesseract_la-blobbox.lo  src/ccstruct/libtesseract_la-blobs.lo  src/ccstruct/libtesseract_la-blread.lo  src/ccstruct/libtesseract_la-boxread.lo  src/ccstruct/libtesseract_la-boxword.lo  src/ccstruct/libtesseract_la-ccstruct.lo  src/ccstruct/libtesseract_la-coutln.lo  src/ccstruct/libtesseract_la-detlinefit.lo  src/ccstruct/libtesseract_la-dppoint.lo  src/ccstruct/libtesseract_la-image.lo  src/ccstruct/libtesseract_la-imagedata.lo  src/ccstruct/libtesseract_la-linlsq.lo  src/ccstruct/libtesseract_la-matrix.lo  src/ccstruct/libtesseract_la-mod128.lo  src/ccstruct/libtesseract_la-normalis.lo  src/ccstruct/libtesseract_la-ocrblock.lo  src/ccstruct/libtesseract_la-ocrpara.lo  src/ccstruct/libtesseract_la-ocrrow.lo  src/ccstruct/libtesseract_la-otsuthr.lo  src/ccstruct/libtesseract_la-pageres.lo  src/ccstruct/libtesseract_la-pdblock.lo  src/ccstruct/libtesseract_la-points.lo  src/ccstruct/libtesseract_la-polyaprx.lo  src/ccstruct/libtesseract_la-polyblk.lo  src/ccstruct/libtesseract_la-quadlsq.lo  src/ccstruct/libtesseract_la-quspline.lo  src/ccstruct/libtesseract_la-ratngs.lo  src/ccstruct/libtesseract_la-rect.lo  src/ccstruct/libtesseract_la-rejctmap.lo  src/ccstruct/libtesseract_la-seam.lo  src/ccstruct/libtesseract_la-split.lo  src/ccstruct/libtesseract_la-statistc.lo  src/ccstruct/libtesseract_la-stepblob.lo  src/ccstruct/libtesseract_la-werd.lo src/ccstruct/libtesseract_la-fontinfo.lo  src/ccstruct/libtesseract_la-params_training_featdef.lo  src/classify/libtesseract_la-classify.lo src/classify/libtesseract_la-adaptive.lo  src/classify/libtesseract_la-adaptmatch.lo  src/classify/libtesseract_la-blobclass.lo  src/classify/libtesseract_la-cluster.lo  src/classify/libtesseract_la-clusttool.lo  src/classify/libtesseract_la-cutoffs.lo  src/classify/libtesseract_la-featdefs.lo  src/classify/libtesseract_la-float2int.lo  src/classify/libtesseract_la-fpoint.lo  src/classify/libtesseract_la-intfeaturespace.lo  src/classify/libtesseract_la-intfx.lo  src/classify/libtesseract_la-intmatcher.lo  src/classify/libtesseract_la-intproto.lo  src/classify/libtesseract_la-kdtree.lo  src/classify/libtesseract_la-mf.lo  src/classify/libtesseract_la-mfoutline.lo  src/classify/libtesseract_la-mfx.lo  src/classify/libtesseract_la-normfeat.lo  src/classify/libtesseract_la-normmatch.lo  src/classify/libtesseract_la-ocrfeatures.lo  src/classify/libtesseract_la-outfeat.lo  src/classify/libtesseract_la-picofeat.lo  src/classify/libtesseract_la-protos.lo  src/classify/libtesseract_la-shapeclassifier.lo  src/classify/libtesseract_la-shapetable.lo  src/classify/libtesseract_la-tessclassifier.lo  src/classify/libtesseract_la-trainingsample.lo  src/cutil/libtesseract_la-oldlist.lo  src/dict/libtesseract_la-context.lo  src/dict/libtesseract_la-dawg.lo  src/dict/libtesseract_la-dawg_cache.lo  src/dict/libtesseract_la-dict.lo  src/dict/libtesseract_la-stopper.lo  src/dict/libtesseract_la-trie.lo src/dict/libtesseract_la-hyphen.lo  src/dict/libtesseract_la-permdawg.lo  src/textord/libtesseract_la-alignedblob.lo  src/textord/libtesseract_la-baselinedetect.lo  src/textord/libtesseract_la-bbgrid.lo  src/textord/libtesseract_la-blkocc.lo  src/textord/libtesseract_la-blobgrid.lo  src/textord/libtesseract_la-ccnontextdetect.lo  src/textord/libtesseract_la-cjkpitch.lo  src/textord/libtesseract_la-colfind.lo  src/textord/libtesseract_la-colpartition.lo  src/textord/libtesseract_la-colpartitionset.lo  src/textord/libtesseract_la-colpartitiongrid.lo  src/textord/libtesseract_la-devanagari_processing.lo  src/textord/libtesseract_la-drawtord.lo  src/textord/libtesseract_la-edgblob.lo  src/textord/libtesseract_la-edgloop.lo  src/textord/libtesseract_la-fpchop.lo  src/textord/libtesseract_la-gap_map.lo  src/textord/libtesseract_la-imagefind.lo  src/textord/libtesseract_la-linefind.lo  src/textord/libtesseract_la-makerow.lo  src/textord/libtesseract_la-oldbasel.lo  src/textord/libtesseract_la-pithsync.lo  src/textord/libtesseract_la-pitsync1.lo  src/textord/libtesseract_la-scanedg.lo  src/textord/libtesseract_la-sortflts.lo  src/textord/libtesseract_la-strokewidth.lo  src/textord/libtesseract_la-tabfind.lo  src/textord/libtesseract_la-tablefind.lo  src/textord/libtesseract_la-tabvector.lo  src/textord/libtesseract_la-tablerecog.lo  src/textord/libtesseract_la-textlineprojection.lo  src/textord/libtesseract_la-textord.lo  src/textord/libtesseract_la-topitch.lo  src/textord/libtesseract_la-tordmain.lo  src/textord/libtesseract_la-tospace.lo  src/textord/libtesseract_la-tovars.lo  src/textord/libtesseract_la-underlin.lo  src/textord/libtesseract_la-wordseg.lo  src/textord/libtesseract_la-workingpartset.lo src/textord/libtesseract_la-equationdetectbase.lo  src/viewer/libtesseract_la-scrollview.lo  src/viewer/libtesseract_la-svmnode.lo  src/viewer/libtesseract_la-svutil.lo src/wordrec/libtesseract_la-tface.lo  src/wordrec/libtesseract_la-wordrec.lo src/wordrec/libtesseract_la-associate.lo  src/wordrec/libtesseract_la-chop.lo  src/wordrec/libtesseract_la-chopper.lo  src/wordrec/libtesseract_la-drawfx.lo  src/wordrec/libtesseract_la-findseam.lo  src/wordrec/libtesseract_la-gradechop.lo  src/wordrec/libtesseract_la-language_model.lo  src/wordrec/libtesseract_la-lm_consistency.lo  src/wordrec/libtesseract_la-lm_pain_points.lo  src/wordrec/libtesseract_la-lm_state.lo  src/wordrec/libtesseract_la-outlines.lo  src/wordrec/libtesseract_la-params_model.lo  src/wordrec/libtesseract_la-pieces.lo  src/wordrec/libtesseract_la-plotedges.lo src/wordrec/libtesseract_la-render.lo  src/wordrec/libtesseract_la-segsearch.lo  src/wordrec/libtesseract_la-wordclass.lo libtesseract_ccutil.la libtesseract_lstm.la  libtesseract_native.la          -L/usr/local/lib
libtool:   error: CURRENT '11-eol-28628-ga7d313' must be a nonnegative integer
libtool:   error: '11-eol-28628-ga7d313:3' is not valid version information
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/graphics/tesseract/work/tesseract-5.2.0
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/graphics/tesseract/work/tesseract-5.2.0
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/graphics/tesseract
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/tesseract
egrep: empty (sub)expression
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20220708-98822-ez220e env UPGRADE_TOOL=portupgrade UPGRADE_PORT=tesseract-5.1.0_1 UPGRADE_PORT_VER=5.1.0_1 make DISABLE_VULNERABILITIES=yes MAKE_JOBS_UNSAFE=yes
** Fix the problem and try again.
Comment 1 Tomoaki AOKI 2022-07-12 06:47:14 UTC
Created attachment 235204 [details]
Full build log including stderr

Uploaded full build log (including stderr) with MAKE_JOBS_UNSAFE=yes.

The problematic version string seems to be set at configure phase.

checking Major version... 11-eol-29006-g32aec1e
checking Minor version... e
checking Point version...
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2022-07-12 07:02:19 UTC
Can you check config.log for 11-eol-28628-ga7d313?
Comment 3 Tomoaki AOKI 2022-07-12 07:40:41 UTC
Created attachment 235205 [details]
config.log

Uploaded WRKSRC/config.log

Portions containing problematic version string are:

(snip)

It was created by tesseract configure 11-eol-29006-g32aec1e, which was
generated by GNU Autoconf 2.71.  Invocation command line was

  $ ./configure --enable-training --prefix=/usr/local --localstatedir=/var --mandir=/usr/local/man --disable-silent-rules --infodir=/usr/local/share/info/ --bui
ld=amd64-portbld-freebsd13.1

(snip)

configure:4786: checking Major version
configure:4788: result: 11-eol-29006-g32aec1e
configure:4790: checking Minor version
configure:4792: result: e
configure:4794: checking Point version
configure:4796: result:

(snip)

configure:5693: checking for c++ option to support OpenMP
configure:5715: c++ -c -O2 -pipe -march=haswell -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include   -isyste
m /usr/local/include conftest.cpp >&5
conftest.cpp:19:2: error: "OpenMP not supported"
#error "OpenMP not supported"
 ^
1 error generated.
configure:5715: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "tesseract"
| #define PACKAGE_TARNAME "tesseract"
| #define PACKAGE_VERSION "11-eol-29006-g32aec1e"
| #define PACKAGE_STRING "tesseract 11-eol-29006-g32aec1e"
| #define PACKAGE_BUGREPORT "https://github.com/tesseract-ocr/tesseract/issues"
| #define PACKAGE_URL "https://github.com/tesseract-ocr/tesseract/"
| #define PACKAGE "tesseract"
| #define VERSION "11-eol-29006-g32aec1e"
| #define PACKAGE_NAME "tesseract"
| #define PACKAGE_VERSION "11-eol-29006-g32aec1e"
| #define PACKAGE_YEAR "2022"
| #define PACKAGE_DATE "07/06"
| #define HAVE_FEENABLEEXCEPT 1
| #define FAST_FLOAT 1
| /* end confdefs.h.  */

(snip)

configure:5888: checking for tensorflow/core/framework/graph.pb.h
configure:5888: c++ -c -O2 -pipe -march=haswell -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -isystem
 /usr/local/include conftest.cpp >&5
conftest.cpp:56:10: fatal error: 'tensorflow/core/framework/graph.pb.h' file not found
#include <tensorflow/core/framework/graph.pb.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
configure:5888: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "tesseract"
| #define PACKAGE_TARNAME "tesseract"
| #define PACKAGE_VERSION "11-eol-29006-g32aec1e"
| #define PACKAGE_STRING "tesseract 11-eol-29006-g32aec1e"
| #define PACKAGE_BUGREPORT "https://github.com/tesseract-ocr/tesseract/issues"
| #define PACKAGE_URL "https://github.com/tesseract-ocr/tesseract/"
| #define PACKAGE "tesseract"
| #define VERSION "11-eol-29006-g32aec1e"
| #define PACKAGE_NAME "tesseract"
| #define PACKAGE_VERSION "11-eol-29006-g32aec1e"
| #define PACKAGE_YEAR "2022"
| #define PACKAGE_DATE "07/06"

(snip)

configure:15215: c++ -E -isystem /usr/local/include conftest.cpp
conftest.cpp:30:10: fatal error: 'ac_nonexistent.h' file not found
#include <ac_nonexistent.h>
         ^~~~~~~~~~~~~~~~~~
1 error generated.
configure:15215: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "tesseract"
| #define PACKAGE_TARNAME "tesseract"
| #define PACKAGE_VERSION "11-eol-29006-g32aec1e"
| #define PACKAGE_STRING "tesseract 11-eol-29006-g32aec1e"
| #define PACKAGE_BUGREPORT "https://github.com/tesseract-ocr/tesseract/issues"
| #define PACKAGE_URL "https://github.com/tesseract-ocr/tesseract/"
| #define PACKAGE "tesseract"
| #define VERSION "11-eol-29006-g32aec1e"
| #define PACKAGE_NAME "tesseract"
| #define PACKAGE_VERSION "11-eol-29006-g32aec1e"
| #define PACKAGE_YEAR "2022"
| #define PACKAGE_DATE "07/06"

(snip)

configure:15271: c++ -E -isystem /usr/local/include conftest.cpp
conftest.cpp:30:10: fatal error: 'ac_nonexistent.h' file not found
#include <ac_nonexistent.h>
         ^~~~~~~~~~~~~~~~~~
1 error generated.
configure:15271: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "tesseract"
| #define PACKAGE_TARNAME "tesseract"
| #define PACKAGE_VERSION "11-eol-29006-g32aec1e"
| #define PACKAGE_STRING "tesseract 11-eol-29006-g32aec1e"
| #define PACKAGE_BUGREPORT "https://github.com/tesseract-ocr/tesseract/issues"
| #define PACKAGE_URL "https://github.com/tesseract-ocr/tesseract/"
| #define PACKAGE "tesseract"
| #define VERSION "11-eol-29006-g32aec1e"
| #define PACKAGE_NAME "tesseract"
| #define PACKAGE_VERSION "11-eol-29006-g32aec1e"
| #define PACKAGE_YEAR "2022"
| #define PACKAGE_DATE "07/06"

(snip)

## ---------------------- ##
## Running config.status. ##
## ---------------------- ##

This file was extended by tesseract config.status 11-eol-29006-g32aec1e, which was
generated by GNU Autoconf 2.71.  Invocation command line was

  CONFIG_FILES    = 
  CONFIG_HEADERS  = 
  CONFIG_LINKS    = 
  CONFIG_COMMANDS = 
  $ ./config.status

(snip)

GENERIC_API_VERSION='11-eol-29006-g32aec1e.e'
GENERIC_LIBRARY_NAME='tesseract'
GENERIC_LIBRARY_VERSION='11-eol-29006-g32aec1e:e'
GENERIC_MAJOR_VERSION='11-eol-29006-g32aec1e'
GENERIC_MICRO_VERSION=''
GENERIC_MINOR_VERSION='e'
GENERIC_RELEASE='11-eol-29006-g32aec1e.e'
GENERIC_VERSION='11-eol-29006-g32aec1e.e.'

(snip)

PACKAGE='tesseract'
PACKAGE_BUGREPORT='https://github.com/tesseract-ocr/tesseract/issues'
PACKAGE_DATE='07/06'
PACKAGE_NAME='tesseract'
PACKAGE_STRING='tesseract 11-eol-29006-g32aec1e'
PACKAGE_TARNAME='tesseract'
PACKAGE_URL='https://github.com/tesseract-ocr/tesseract/'
PACKAGE_VERSION='11-eol-29006-g32aec1e'
PACKAGE_YEAR='2022'

(snip)

VERSION='11-eol-29006-g32aec1e'

(snip)

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "tesseract"
#define PACKAGE_TARNAME "tesseract"
#define PACKAGE_VERSION "11-eol-29006-g32aec1e"
#define PACKAGE_STRING "tesseract 11-eol-29006-g32aec1e"
#define PACKAGE_BUGREPORT "https://github.com/tesseract-ocr/tesseract/issues"
#define PACKAGE_URL "https://github.com/tesseract-ocr/tesseract/"
#define PACKAGE "tesseract"
#define VERSION "11-eol-29006-g32aec1e"
#define PACKAGE_NAME "tesseract"
#define PACKAGE_VERSION "11-eol-29006-g32aec1e"
#define PACKAGE_YEAR "2022"
#define PACKAGE_DATE "07/06"

(snip)
Comment 4 Tomoaki AOKI 2022-07-12 07:48:42 UTC
Created attachment 235206 [details]
config.status

To be sure, uploaded WRKSRC/config.status.

Portions containing problematic version string are:

(snip)

exec 6>&1
## ----------------------------------- ##
## Main body of $CONFIG_STATUS script. ##
## ----------------------------------- ##
# Save the log message, to keep $0 and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by tesseract $as_me 11-eol-29006-g32aec1e, which was
generated by GNU Autoconf 2.71.  Invocation command line was

  CONFIG_FILES    = $CONFIG_FILES
  CONFIG_HEADERS  = $CONFIG_HEADERS
  CONFIG_LINKS    = $CONFIG_LINKS
  CONFIG_COMMANDS = $CONFIG_COMMANDS
  $ $0 $@

on `(hostname || uname -n) 2>/dev/null | sed 1q`
"

(snip)

ac_cs_config='--enable-training --prefix=/usr/local --localstatedir=/var --mandir=/usr/local/man --disable-silent-rules --infodir=/usr/local/share/info/ --build
=amd64-portbld-freebsd13.1 build_alias=amd64-portbld-freebsd13.1 CXX=c++ '\''CXXFLAGS=-O2 -pipe -march=haswell -fstack-protector-strong -isystem /usr/local/incl
ude -fno-strict-aliasing  -isystem /usr/local/include '\'' '\''LDFLAGS= -pthread -fstack-protector-strong '\'' LIBS=-L/usr/local/lib '\''CPPFLAGS=-isystem /usr/
local/include'\'' CC=cc '\''CFLAGS=-O2 -pipe -march=haswell  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing '\'' PKG_CONFIG=pkgconf P
KG_CONFIG_LIBDIR=/usr/ports/graphics/tesseract/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/libdata/pkgconfig'
ac_cs_version="\
tesseract config.status 11-eol-29006-g32aec1e
configured by ./configure, generated by GNU Autoconf 2.71,
  with options \"$ac_cs_config\"

(snip)

    PACKAGE='tesseract'
    VERSION='11-eol-29006-g32aec1e'
    RM='rm -f'
    ofile='libtool'

(snip)

S["GENERIC_VERSION"]="11-eol-29006-g32aec1e.e."
S["GENERIC_RELEASE"]="11-eol-29006-g32aec1e.e"
S["GENERIC_LIBRARY_NAME"]="tesseract"
S["GENERIC_LIBRARY_VERSION"]="11-eol-29006-g32aec1e:e"
S["GENERIC_MICRO_VERSION"]=""
S["GENERIC_MINOR_VERSION"]="e"
S["GENERIC_MAJOR_VERSION"]="11-eol-29006-g32aec1e"
S["GENERIC_API_VERSION"]="11-eol-29006-g32aec1e.e"
S["SED"]="/usr/bin/sed"
S["PACKAGE_DATE"]="07/06"
S["PACKAGE_YEAR"]="2022"

(snip)

S["MAKEINFO"]="${SHELL} '/usr/ports/graphics/tesseract/work/tesseract-5.2.0/config/missing' makeinfo"
S["AUTOHEADER"]="${SHELL} '/usr/ports/graphics/tesseract/work/tesseract-5.2.0/config/missing' autoheader"
S["AUTOMAKE"]="${SHELL} '/usr/ports/graphics/tesseract/work/tesseract-5.2.0/config/missing' automake-1.16"
S["AUTOCONF"]="${SHELL} '/usr/ports/graphics/tesseract/work/tesseract-5.2.0/config/missing' autoconf"
S["ACLOCAL"]="${SHELL} '/usr/ports/graphics/tesseract/work/tesseract-5.2.0/config/missing' aclocal-1.16"
S["VERSION"]="11-eol-29006-g32aec1e"
S["PACKAGE"]="tesseract"

(snip)

S["PACKAGE_STRING"]="tesseract 11-eol-29006-g32aec1e"
S["PACKAGE_VERSION"]="11-eol-29006-g32aec1e"
S["PACKAGE_TARNAME"]="tesseract"
S["PACKAGE_NAME"]="tesseract"

(snip)

# Set up the scripts for CONFIG_HEADERS section.
# No need to generate them if there are no CONFIG_HEADERS.
# This happens for instance with `./config.status Makefile'.
if test -n "$CONFIG_HEADERS"; then
cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
BEGIN {
D["PACKAGE_NAME"]=" \"tesseract\""
D["PACKAGE_TARNAME"]=" \"tesseract\""
D["PACKAGE_VERSION"]=" \"11-eol-29006-g32aec1e\""
D["PACKAGE_STRING"]=" \"tesseract 11-eol-29006-g32aec1e\""
D["PACKAGE_BUGREPORT"]=" \"https://github.com/tesseract-ocr/tesseract/issues\""
D["PACKAGE_URL"]=" \"https://github.com/tesseract-ocr/tesseract/\""
D["PACKAGE"]=" \"tesseract\""
D["VERSION"]=" \"11-eol-29006-g32aec1e\""
D["PACKAGE_NAME"]=" \"tesseract\""
D["PACKAGE_VERSION"]=" \"11-eol-29006-g32aec1e\""
D["PACKAGE_YEAR"]=" \"2022\""
D["PACKAGE_DATE"]=" \"07/06\""

(snip)
Comment 5 Tomoaki AOKI 2022-07-13 12:28:06 UTC
Doing `grep -r -n "11-eol-29006-g32aec1e" /usr/ports/graphics/tesseract/ | cut -d : -f 1 | sort | uniq`

 *After `make extract`  : None detected.
 *After `make patch`    : None detected.
 *After `make configure`: Detected below.

/usr/ports/graphics/tesseract/work/tesseract-5.2.0/autom4te.cache/output.0
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/autom4te.cache/output.1
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/autom4te.cache/output.2
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/autom4te.cache/output.3
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/config.log
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/config.status
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/configure
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/configure.libtool.bak
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/include/config_auto.h
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/include/tesseract/version.h
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/java/com/google/Makefile
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/java/com/google/scrollview/events/Makefile
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/java/com/google/scrollview/Makefile
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/java/com/google/scrollview/ui/Makefile
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/java/com/Makefile
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/java/Makefile
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/libtool
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/Makefile
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/tessdata/configs/Makefile
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/tessdata/Makefile
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/tessdata/tessconfigs/Makefile
/usr/ports/graphics/tesseract/work/tesseract-5.2.0/tesseract.pc
Comment 6 Tomoaki AOKI 2022-07-13 12:36:54 UTC
Running `grep -r -n "11-eol-29006-g32aec1e" (dir) | cut -d : -f 1 | sort | uniq`
where (dir) is

  */usr/local/share/   : None detected.
  */usr/local/bin/     : None detected.
  */usr/local/lib/     : None detected.
  */usr/local/libdata/ : None detected.
  */usr/local/libexec/ : Detected below.

Binary file /usr/local/libexec/libinput/libinput-record matches

So x11/libinput should have same issue, but without harm.
Is there anything else I can try?
Comment 7 Stephan Muhs 2022-07-26 16:09:42 UTC
I am affected by exactly the same bug, let me know if you need more data points at this time.
Comment 8 rkoberman 2022-07-28 20:15:50 UTC
I am also having this issue. Maybe set bug to at least "Affects some people".

This looks a lot like a compiler issue. It seems to build fine on the package builders for 13, but the think default compilers are different between 13.0 and 13.1. They certainly are between 13.0 and 13-STABLE. The port wants c++11-lang and I think that means the default compiler.

Most failures that work with poudriere are the result of an unclean build environment, but this error does not seem like that sort of error. Maybe forcing the build to whatever version of  clang is on 13.0-RELEASE would fix this. (Just guessing, I admit.)
Comment 9 Piotr Kubaj freebsd_committer freebsd_triage 2022-07-28 22:02:29 UTC
(In reply to rkoberman from comment #8)
I have my own package builder on 13.1-RELEASE and the package builds just fine: https://talos.anongoth.pl/data/powerpc64le-default/2022-07-27_00h31m56s/logs/tesseract-5.2.0_1.log
So it's not about using 13.1.
Comment 10 Tomoaki AOKI 2022-07-28 22:39:45 UTC
Anyway, changed importance to "Affects some people" now as at least 3 (includng me) persons are affected.
Comment 11 freebsd 2022-08-09 19:57:47 UTC
The problem is this change in tesseract's source code:

https://github.com/tesseract-ocr/tesseract/commit/d7373727d6abcc7a9c50c744d6e63ab6a8ba36d6

Undo this change in configure.ac and it will build fine. The issue is that tesseract is trying to figure out its own version number from the most recent git commit, but ends up picking up the most recent commit to the ports tree instead (because the ports tree is kept in git, while the tesseract sources are extracted from a tar file).
Comment 12 rkoberman 2022-08-10 05:10:35 UTC
(In reply to freebsd from comment #11)
Just a confirmation that this fixes my build problem.
Comment 13 Piotr Kubaj freebsd_committer freebsd_triage 2022-08-10 18:28:29 UTC
Could you try this patch?
diff --git a/graphics/tesseract/Makefile b/graphics/tesseract/Makefile
index 9d447cb9c780..96d434dbc718 100644
--- a/graphics/tesseract/Makefile
+++ b/graphics/tesseract/Makefile
@@ -30,6 +30,7 @@ CPE_VENDOR=   tesseract_project
 USE_GITHUB=    yes
 GH_ACCOUNT=    ${PORTNAME}-ocr
 
+BINARY_ALIAS=  git=true
 DATADIR=       ${PREFIX}/share/tessdata
 LDFLAGS+=      -pthread
 PORTDATA=      *
Comment 14 Tomoaki AOKI 2022-08-10 22:17:44 UTC
(In reply to Piotr Kubaj from comment #13)

Unfortunately, patch for Makefile didn't work. :-(
Comment 15 Tomoaki AOKI 2022-08-10 22:20:43 UTC
(In reply to freebsd from comment #11)

Thanks! looking into the upstream commit you mentioned, created a patch to store into (now non-existent) files/ directory, tried and it worked!

I'll upload the patch shortly.
Comment 16 Tomoaki AOKI 2022-08-10 22:24:22 UTC
Created attachment 235836 [details]
Patch to store into files/ directory

patch to store into (now non-existent) files/ directory.

As patches creating new directory often failes to reverse even if -E, this is NOT a patch to port tree. Just create files directory and store this there.
Comment 17 O. Hartmann 2022-09-07 06:02:52 UTC
Just for the record: it also affects me and some others uitilizing FBSD/tesseract around here.
Comment 18 Piotr Kubaj freebsd_committer freebsd_triage 2022-09-07 21:08:38 UTC
Committed, thanks!
Comment 19 commit-hook freebsd_committer freebsd_triage 2022-09-07 21:09:09 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6c266c9c9e7b0ac1a35b05fbdeddbc330e4c5f43

commit 6c266c9c9e7b0ac1a35b05fbdeddbc330e4c5f43
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2022-09-07 21:04:06 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2022-09-07 21:08:25 +0000

    graphics/tesseract: fix build when building from ports

    PR:     265091
    Submitted by:   junchoon@dec.sakura.ne.jp

 graphics/tesseract/files/patch-configure.ac (new) | 11 +++++++++++
 1 file changed, 11 insertions(+)
Comment 20 alt2600 2022-09-07 23:12:36 UTC
*** Bug 265083 has been marked as a duplicate of this bug. ***