Using undocumented lrelease options breaks building avogadro

Hi,

avogadro has now hit Debian unstable, and there’s a slim chance it might
still get included in the next stable release due in fall.

However, we experienced one problem on one of the autobuilders:

[ 1%] Generating avogadro_en_GB.qm
cd /build/buildd/avogadro-0.8.1/obj-mipsel-linux-gnu/libavogadro/src &&
/usr/bin/lrelease -compress -nounfinished -silent
/build/buildd/avogadro-0.8.1/i18n/avogadro_en_GB.ts -qm
/build/buildd/avogadro-0.8.1/obj-mipsel-linux-gnu/libavogadro/src/avogadro_en_GB.qm
Usage:
lrelease [options] project-file
lrelease [options] ts-files [-qm qm-file]
Options:
-help Display this information and exit
-nocompress
Do not compress the .qm files
-verbose
Explain what is being done
-version
Display the version of lrelease and exit
make[3]: *** [libavogadro/src/avogadro_en_GB.qm] Error 1
make[3]: Leaving directory
`/build/buildd/avogadro-0.8.1/obj-mipsel-linux-gnu’

Quite weird that it only happens on mispel (the others built avogadro
fine), but the lrelease manpage doesn’t say anything about -compress,
-nounfinished or -silent, so are those undocumented options you rely on?
This looks like the relevant code in cmake/modules/FindLinguist.cmake
about this:

SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/${outfile}.qm)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
                   COMMAND ${QT_LRELEASE_EXECUTABLE}
                   ARGS -compress -nounfinished -silent ${it} -qm ${outfile}
                   DEPENDS ${it}
)

As `compress’ looks like being implicitely standard now, maybe the call
needs updating?

thanks,

Michael

On Sat, Jul 26, 2008 at 09:45:09AM +0200, Michael Banck wrote:

Quite weird that it only happens on mispel (the others built avogadro
fine), but the lrelease manpage doesn’t say anything about -compress,
-nounfinished or -silent, so are those undocumented options you rely on?

Hrm, I just noticed that the lrelease usage printed out indeed mentions
those above options, but apparently they are not available in the binary
used on the mispel autobuilder for some reason (although it is Qt4-4.4
as well).

Michael

Hi,

On Sat, Jul 26, 2008 at 09:45:09AM +0200, Michael Banck wrote:

However, we experienced one problem on one of the autobuilders:

[ 1%] Generating avogadro_en_GB.qm
cd /build/buildd/avogadro-0.8.1/obj-mipsel-linux-gnu/libavogadro/src &&
/usr/bin/lrelease -compress -nounfinished -silent
/build/buildd/avogadro-0.8.1/i18n/avogadro_en_GB.ts -qm
/build/buildd/avogadro-0.8.1/obj-mipsel-linux-gnu/libavogadro/src/avogadro_en_GB.qm
Usage:
lrelease [options] project-file
lrelease [options] ts-files [-qm qm-file]
Options:
-help Display this information and exit
-nocompress
Do not compress the .qm files
-verbose
Explain what is being done
-version
Display the version of lrelease and exit
make[3]: *** [libavogadro/src/avogadro_en_GB.qm] Error 1
make[3]: Leaving directory
`/build/buildd/avogadro-0.8.1/obj-mipsel-linux-gnu’

I tracked it down to a Qt3 installation which must have been present on
that autobuilder, the above output is from Qt3’s lrelease. So it looks
like a Debian specific problem, sorry for the noise.

Michael

On Jul 26, 2008, at 8:37 AM, Michael Banck wrote:

I tracked it down to a Qt3 installation which must have been present
on
that autobuilder, the above output is from Qt3’s lrelease. So it
looks
like a Debian specific problem, sorry for the noise.

Eh. It’s better to get these sorts of things, than to not hear about
them. Maybe someone else will attempt to build against Qt3 or something.

It would be great to get into the next Debian. Is there a cutoff date,
e.g. if we try to get 0.8.x+1 or 0.9 out?

Cheers,
-Geoff

On Sat, Jul 26, 2008 at 10:07:51PM -0400, Geoffrey Hutchison wrote:

On Jul 26, 2008, at 8:37 AM, Michael Banck wrote:

I tracked it down to a Qt3 installation which must have been present
on
that autobuilder, the above output is from Qt3’s lrelease. So it
looks
like a Debian specific problem, sorry for the noise.

Eh. It’s better to get these sorts of things, than to not hear about
them. Maybe someone else will attempt to build against Qt3 or something.

It would be great to get into the next Debian. Is there a cutoff date,
e.g. if we try to get 0.8.x+1 or 0.9 out?

No worry, the freeze is today. As this was because of an autobuilder
with a unclean build environment, avogadro will hopefully be retried in
the next couple of days on a good autobuilder and then make it in, so no
immediate action is needed.

One possible thing to do could be to replace the call of lrelease with
lrelease-qt4 in FindLinguist.cmake, but I am not sure whether this is
the default name of the executable. Debian ships lrelease-qt3 and
lrelease-qt4 in the respective development packages, and one of them
gets linked to /usr/bin/lrelease by means of the alternatives handling.

Hrm, I now see that FindLinguist.cmake appears to look for lrelease-qt4
first, but this somehow does not seem to work on Debian, cmake only
finds “/usr/bin/lrelease”. However, if I run the build process
manually, cmake finds “/usr/bin/lrelease-qt4” fine here, so I am really
not sure what is going on; must be the autobuilder environment.

Michael