Opened 3 years ago

Closed 3 years ago

#63923 closed defect (fixed)

tesseract @4.1.1_2: unable to compile it under 11.6 and 12.0.1 but works under 10.13.6 due to a file, named VERSION

Reported by: czo Owned by: markemer (Mark Anderson)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: haspatch Cc:
Port: tesseract

Description

I found a strange thing about this port when i try to compile it under 11.6 and 12.0.1, but it works fine under 10.13. The problem seems to be related some case sensitivity/unsensitivity madness, because the compile fails on a file, which has the name 'VERSION'. That caused by the system's 'cmath' header (/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/cmath; line 309), which try to include a file, named "version".

I can compile it, if i patch the source and rename the file. There are any better options for this? Or maybe that is the accepted solution? I found egzactly the same thing when try to compile "devel/ace", so i wrote a patch for that port too.

I've attached the main.log and the patch file too. If it's will be ok, i will create a merge request with the patch for both ports.

Attachments (2)

main.log (141.4 KB) - added by czo 3 years ago.
output of the compile logs
patch-rename-version.diff (947 bytes) - added by czo 3 years ago.
patch to rename VERSION to VERSION.txt

Download all attachments as: .zip

Change History (7)

Changed 3 years ago by czo

Attachment: main.log added

output of the compile logs

Changed 3 years ago by czo

Attachment: patch-rename-version.diff added

patch to rename VERSION to VERSION.txt

comment:1 Changed 3 years ago by jmroot (Joshua Root)

Owner: set to markemer
Status: newassigned

comment:2 Changed 3 years ago by markemer (Mark Anderson)

Ugh, nice catch - funny that it broke recently. I'll take a look.

comment:3 Changed 3 years ago by jmroot (Joshua Root)

The version header is a C++20 thing.

comment:4 Changed 3 years ago by markemer (Mark Anderson)

Yeah, this seems to be fixed in 4.1.3 upstream - I'm working on that fix now.

comment:5 Changed 3 years ago by markemer (Mark Anderson)

Resolution: fixed
Status: assignedclosed

In 88318302beb86ae50fda126b2c4294a45fac719f/macports-ports (master):

tesseract: Update to version 4.1.3 (https://github.com/macports/macports-ports/pull/12988)

  • Update to version 4.1.3
  • Fix compilation bug on macOS 11 and 12 due to version.txt
  • Add notes for tesseract build
  • Add variants for the 3 types of training data available

Closes: #41821
Closes: #63923

Note: See TracTickets for help on using tickets.