Opened 11 years ago

Closed 11 years ago

#37429 closed defect (fixed)

tesseract does not build with automake 1.13

Reported by: bugs1309@… Owned by: markemer (Mark Anderson)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: haspatch Cc: mp@…, jack.rueter@…, ryandesign (Ryan Carsten Schmidt)
Port: tesseract

Description

Building tesseract with automake @1.13_0 produces an error during the configuration phase. Downgrading to automake @1.12.6_0 fixes the problem. main.log is attached.

Attachments (4)

main.log (54.8 KB) - added by bugs1309@… 11 years ago.
patch-configure.ac.diff (406 bytes) - added by markemer (Mark Anderson) 11 years ago.
configure.ac Patch to fix initial error
tesseract-portfile.diff (1.2 KB) - added by mp@… 11 years ago.
Portfile.diff (744 bytes) - added by markemer (Mark Anderson) 11 years ago.
Bump of revision, add of m4 directory, and patch file

Download all attachments as: .zip

Change History (21)

Changed 11 years ago by bugs1309@…

Attachment: main.log added

comment:1 Changed 11 years ago by mf2k (Frank Schima)

Keywords: tesseract removed
Owner: changed from macports-tickets@… to emer@…
Port: tesseract added

In the future, please fill in the Port field and Cc the port maintainer(s).

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

Sorry for the delay, I was still on vacation. I'll look into this now. I noticed automake 1.13.1 is now the latest, has anyone tried it yet?

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

Ok, found the problem - I got it, and it's in your main.log too. Hoping that I don't have to patch configure.ac.

Running aclocal
configure.ac:157: error: 'AM_CONFIG_HEADER': this macro is obsolete.
    You should use the 'AC_CONFIG_HEADERS' macro instead.
/opt/local/share/aclocal-1.13/obsolete-err.m4:12: AM_CONFIG_HEADER is expanded from...
configure.ac:157: the top level
autom4te: /opt/local/bin/gm4 failed with exit status: 1
aclocal: error: echo failed with exit status: 1

  Something went wrong, bailing out!

Changed 11 years ago by markemer (Mark Anderson)

Attachment: patch-configure.ac.diff added

configure.ac Patch to fix initial error

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

Ok, attached a patch for configure.ac, now I'm tracking down the cause of:

Running aclocal
aclocal: error: couldn't open directory 'm4': No such file or directory

  Something went wrong, bailing out!

I'm not sure why tesseract cannot just release a proper configure.

comment:5 Changed 11 years ago by ufa.boux@…

I was just about to create a ticket for this problem. The only difference with me is that I haven't seen the "initial error" that was fixed with the patch, I got the "aclocal: error: couldn't open directory 'm4': No such file or directory" right away.

comment:6 Changed 11 years ago by markemer (Mark Anderson)

Ok, if I create the directory, it works. That's nonsense, but if it works, I will add a patch.

comment:7 Changed 11 years ago by mp@…

Until the tesseract project fixes the configure file, adding

post-patch {
    reinplace "s/AM_CONFIG_HEADER/AC_CONFIG_HEADER/g" ${worksrcpath}/configure.ac
    file mkdir ${worksrcpath}/m4
}

to the part of the Portfile that doesn't handle the sub-ports solves the issue. Portfile diff: attachment:tesseract-portfile.diff

Version 1, edited 11 years ago by mp@… (previous) (next) (diff)

comment:8 Changed 11 years ago by markemer (Mark Anderson)

Everyone, give either fix a try and report back. I think this is it. Coming soon to a new ticket, upgrading to 3.02.02 which has the same problem so I want to fix this first.

Changed 11 years ago by mp@…

Attachment: tesseract-portfile.diff added

comment:9 in reply to:  8 Changed 11 years ago by mp@…

Replying to emer@…:

Everyone, give either fix a try and report back.

Both work fine on 10.6.8, also with language sub-ports, like "tesseract-eng".

But why decrease the revision?

comment:10 Changed 11 years ago by mp@…

Cc: mp@… added

Cc Me!

comment:11 Changed 11 years ago by markemer (Mark Anderson)

That's a mistake. I was playing with upgrading to 3.02.02 to see if that fixed things. It did not. The revision should increase.

Changed 11 years ago by markemer (Mark Anderson)

Attachment: Portfile.diff added

Bump of revision, add of m4 directory, and patch file

comment:12 Changed 11 years ago by markemer (Mark Anderson)

Ok, unless there is any objection, this one is ready to be committed.

comment:13 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jack.rueter@… added
Keywords: haspatch added

Has duplicate #37751.

comment:14 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

There should be no need for the revision to increase since this does not change what files get installed.

You should either patch configure (if you're not running autoreconf) or patch configure.ac (if you are running autoreconf), not both.

comment:15 Changed 11 years ago by markemer (Mark Anderson)

Yeah. I do have to use autoreconf, since configure is really broken out of the box. However, I did not make the patch to configure, and I'm not sure how to fix the problem described in configure.ac.

comment:16 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

I still have the configure.ac patch I used to generate the configure patch. I'll merge our two patches.

comment:17 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.