Incorrect usage of intltool configuration macros

Bug #1418943 reported by Alex Valavanis
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Won't Fix
High
Alex Valavanis
0.92.x
Won't Fix
Undecided
Unassigned

Bug Description

The Debian maintainer, Matteo Vescovi, has reported an issue in 0.91 to me by email, which is exposed when using autoreconf instead of ./autogen.sh:

<quote>
The autoreconf commit changes the way configure.ac is processed and it
fails badly, as you can see at [1], where the error is:

 config.status:2749: error: po/Makefile.in.in was not created by intltoolize.

Obviously, that file exists already.

Comparing upstream configure.ac from 0.48.5 and 0.91 releases, I grabbed
the relevant part following:

@@ -148,12 +211,14 @@ fi
 dnl ******************************
 dnl Gettext stuff
 dnl ******************************
+IT_PROG_INTLTOOL([0.40.0])
+
+AM_GNU_GETTEXT_VERSION([0.17])
+AM_GNU_GETTEXT([external])
+

This is a problem. Intltool and Gettext clashed if used at the same time.
And autoreconf finally brought this issue out.
It has already been discovered[2] and explained[3].

<snip />

[1] http://debomatic-staging.debian.net/distribution#experimental/inkscape/0.91-3/buildlog
[2] https://bugzilla.gnome.org/show_bug.cgi?id=708673
[3] https://bugzilla.gnome.org/show_bug.cgi?id=708673#c4
</quote>

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

This is related to our earlier issue in bug #992047 (comment #35 onwards), which was "fixed" by a fairly horrible hack in autogen.sh: https://launchpadlibrarian.net/132587610/fix-locale-path-v2.patch

It seems that the current advice is to only use the IT_PROG_INTLTOOL macro, and not the AM_GNU_GETTEXT* macros:

https://code.launchpad.net/~robert-ancell/intltool/remove-am-gnu-gettext/+merge/114274

Changed in inkscape:
importance: Undecided → High
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Just to clarify... to reproduce:

autoreconf -f -i
./configure

...
config.status: error: po/Makefile.in.in was not created by intltoolize.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Patch attached to fix the usage of configuration macros. Please can someone test for regressions before I commit?

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

I'm also not sure that this is related to bug #992047 after all... or that it will fix the autoreconf issue. Please disregard those comments for now!

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

To clarify my garbled thoughts...

The problem here is as follows:

1. If you run the plain "autoreconf -fi" script, it spots the AM_GNU_GETTEXT* macros in configure.ac and then runs autopoint to generate the po/Makefile.in.in. This is incorrect... intltoolize should be used to create the file instead.

2. When the "configure" script is run after this step, the IT_INIT_INTLTOOL macro inspects the po/Makefile.in.in file, and throws an error because it was created by autopoint, not by intltoolize.

We don't see this issue when using the "autogen.sh" script because it overrides the "autopoint" command to use intltoolize instead.

I believe the solution is as follows (see patch "fix-1418943.diff"):

1. Remove the AM_GNU_GETTEXT* macros from configure.ac. IT_INIT_INTLTOOL should be used by itself. This means that autoreconf does not run autopoint anymore.

2. Run "intltoolize --automake --copy --force" explicitly to generate the appropriate files.

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

It's probably safer to run intltoolize before autoreconf, so that we pick up all the necessary aclocal macros. Updated version of patch attached.

Changed in inkscape:
status: New → In Progress
assignee: nobody → Alex Valavanis (valavanisalex)
Revision history for this message
jazzynico (jazzynico) wrote :

Patch tested successfully on Xubuntu 15.04 (64 bit) with Inkscape trunk rev. 14237.
(to test, run /autogen.sh first...).

Revision history for this message
su_v (suv-lp) wrote :

@Alex - could you give a brief summary which steps exactly to test?
(I'm currently revisiting reports which are either already milestoned for 0.91.1 or possible candidates for backporting)

Revision history for this message
Alex Valavanis (valavanisalex) wrote :

@~suv - sorry about the slow reply. It has been a while since I looked at this, so I'll have another play with it and refresh my memory!

To reproduce the bug, see comment #2... the solution should be in the patch in comment #6, although we'd need to check for any weird regressions in terms of generation of translations.

Revision history for this message
Angel Guzman Maeso (shakaran) wrote :

Please @valavanisalex, could you take this bug with more priority? It passed almost a year and it is important probably for release 0.91.1 release with more than 120 bugs fixed.

Revision history for this message
jazzynico (jazzynico) wrote :

@Alex, is it fixed with Cmake?

Changed in inkscape:
milestone: 0.91.1 → 0.93
Revision history for this message
Qantas94Heavy (qantas94heavy) wrote :

autotools is not supported in 1.0 so no longer relevant. Does this need to be fixed for 0.92.x?

Changed in inkscape:
status: In Progress → Fix Committed
Revision history for this message
Qantas94Heavy (qantas94heavy) wrote :

Closing because I don't think we are maintaining autotools any more, please use CMake to build Inkscape. If you are still having issues with the CMake build system, please file a new bug with details. Thank you!

Closed by: https://gitlab.com/Qantas94Heavy

Changed in inkscape:
status: Fix Committed → Won't Fix
tbnorth (terry-n-brown)
tags: added: bug-migration
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.