Opened 6 years ago

Closed 6 years ago

#55394 closed defect (invalid)

tesseract @3.04.01: configure: error: leptonica not found

Reported by: cvdenzen Owned by: markemer (Mark Anderson)
Priority: Normal Milestone:
Component: ports Version: 2.4.2
Keywords: Cc:
Port: tesseract

Description (last modified by ryandesign (Ryan Carsten Schmidt))

After solving (manually) the problems with openjpeg and openmp, this problem showed up in logfile /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_tesseract/tesseract/work/tesseract-3.04.01/config.log:

(..)

|   return 0;
| }
configure:16950: result: yes
configure:16960: checking for off_t
configure:16960: /usr/bin/clang++ -c -pipe -Os -stdlib=libc++ -arch x86_64 -I/opt/local/include conftest.cpp >&5
configure:16960: $? = 0
configure:16960: /usr/bin/clang++ -c -pipe -Os -stdlib=libc++ -arch x86_64 -I/opt/local/include conftest.cpp >&5
conftest.cpp:45:20: error: expected expression
if (sizeof ((off_t)))
                   ^
1 error generated.
configure:16960: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "tesseract"
| #define PACKAGE_TARNAME "tesseract"
| #define PACKAGE_VERSION "3.04.01"
(..)

Attachments (2)

config.log (68.4 KB) - added by cvdenzen 6 years ago.
logfile with error message
main.log (58.5 KB) - added by cvdenzen 6 years ago.
log file

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by cvdenzen

Attachment: config.log added

logfile with error message

Changed 6 years ago by cvdenzen

Attachment: main.log added

log file

comment:1 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: emer@… removed
Description: modified (diff)
Owner: set to markemer
Port: tesseract added; leptonica removed
Status: newassigned
Summary: tesseract @3.04.01: install error High Sierratesseract @3.04.01: configure: error: leptonica not found

It's not clear why tesseract can't find leptonica on your system. The portion of the config.log you quoted is irrelevant to this issue.

Is leptonica installed? Does the file /opt/local/include/leptonica/allheaders.h exist? What's the output of these two commands:

port -vq installed leptonica
port -q contents leptonica

What problems with openjpeg and openmp are you referring to, and how did you solve them?

comment:2 Changed 6 years ago by cvdenzen

The file /opt/local/include/leptonica/allheaders.h does not exist:

sh-3.2# ls -l /opt/local/include/leptonica/allheaders.h
ls: /opt/local/include/leptonica/allheaders.h: No such file or directory

The commands give this output:

sh-3.2# port -vq installed leptonica
  leptonica @1.74.4_0 (active) platform='darwin 17' archs='x86_64' date='2017-11-20T23:31:44+0100'
sh-3.2# port -q contents leptonica
  /usr/local/bin/convertfilestopdf
  /usr/local/bin/convertfilestops
  /usr/local/bin/convertformat
  /usr/local/bin/convertsegfilestopdf
  /usr/local/bin/convertsegfilestops
  /usr/local/bin/converttopdf
  /usr/local/bin/converttops
  /usr/local/bin/fileinfo
  /usr/local/bin/printimage
  /usr/local/bin/printsplitimage
  /usr/local/bin/printtiff
  /usr/local/bin/splitimage2pdf
  /usr/local/bin/xtractprotos
  /usr/local/include/leptonica/allheaders.h
  /usr/local/include/leptonica/alltypes.h
  /usr/local/include/leptonica/array.h
  /usr/local/include/leptonica/arrayaccess.h
  /usr/local/include/leptonica/bbuffer.h
  /usr/local/include/leptonica/bilateral.h
  /usr/local/include/leptonica/bmf.h
  /usr/local/include/leptonica/bmfdata.h
  /usr/local/include/leptonica/bmp.h
  /usr/local/include/leptonica/ccbord.h
  /usr/local/include/leptonica/dewarp.h
  /usr/local/include/leptonica/endianness.h
  /usr/local/include/leptonica/environ.h
  /usr/local/include/leptonica/gplot.h
  /usr/local/include/leptonica/heap.h
  /usr/local/include/leptonica/imageio.h
  /usr/local/include/leptonica/jbclass.h
  /usr/local/include/leptonica/leptwin.h
  /usr/local/include/leptonica/list.h
  /usr/local/include/leptonica/morph.h
  /usr/local/include/leptonica/pix.h
  /usr/local/include/leptonica/ptra.h
  /usr/local/include/leptonica/queue.h
  /usr/local/include/leptonica/rbtree.h
  /usr/local/include/leptonica/readbarcode.h
  /usr/local/include/leptonica/recog.h
  /usr/local/include/leptonica/regutils.h
  /usr/local/include/leptonica/stack.h
  /usr/local/include/leptonica/stringcode.h
  /usr/local/include/leptonica/sudoku.h
  /usr/local/include/leptonica/watershed.h
  /usr/local/lib/liblept.5.dylib
  /usr/local/lib/liblept.a
  /usr/local/lib/liblept.dylib
  /usr/local/lib/pkgconfig/lept.pc
sh-3.2#

I cannot remember what the symptoms of the problems with openjpeg and openmp were. I guess I saw errors mentioning these packages/header files.

I thought I solved the openjpeg problem in leptonica as described in #55283.

In my shell history I also see that I did cp /usr/local/lib/pkgconfig/lept.pc ./lib/pkgconfig/. I don't remember the reason for this. Trying to solve the error with openmp I did (as root) make a symlink in /opt/local/include/clang to omp.h:

pushd /opt/local/include/
mkdir clang
cd clang
ln -s /usr/local//Cellar/llvm/5.0.0/lib/clang/5.0.0/include/omp.h omp.h
Last edited 6 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:3 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: invalid
Status: assignedclosed

Somehow your leptonica has decided to install itself into /usr/local instead of /opt/local like it should have. You've also got Homebrew installed into /usr/local, and that could be the reason for leptonica's misbehavior. Installing things into /usr/local is going to cause problems for MacPorts, as you see, which is why we don't support that. Please choose whether you would like to use Homebrew or MacPorts. If you would like to use MacPorts, please remove Homebrew and everything else you put in /usr/local, and also any headers or other random changes you made in /opt/local that are going to confuse MacPorts (or MacPorts developers when you report the resulting problems), then rebuild the leptonica port (i.e. sudo port -n upgrade --force leptonica) and any other ports that got misbuilt while the things were present in /usr/local.

Note: See TracTickets for help on using tickets.