Fwd: Avogadro / lrelease Build Problem

OK, I need some help troubleshooting this bug.

Here’s the issue. Some people on Kubuntu are having problems compiling
Avogadro because we call lrelease with flags they don’t have. Strange,
since lrelease on Qt 4.2 or newer has all of these flags.

So I checked Kubuntu and realized that Cmake was probably picking up
lrelease for Qt 3.x instead of lrelease-qt4. But in our cmake/modules/
FindLinguist code, we look for lrelease-qt4 before lrelease. Why
aren’t we picking up lrelease-qt4?

FIND_PROGRAM(QT_LRELEASE_EXECUTABLE NAMES lrelease-qt4 lrelease PATHS
“[HKEY_CURRENT_USER\Software\Trolltech\Qt3Versions
\4.0.0;InstallDir]/bin”
“[HKEY_CURRENT_USER\Software\Trolltech\Versions
\4.0.0;InstallDir]/bin”
$ENV{QTDIR}/bin
)

Any ideas? I know azeem hit this on Debian too:
http://lists.alioth.debian.org/pipermail/debichem-devel/2008-July/001027.html

-Geoff

Begin forwarded message:

From: “Visvaldas K.” coyote_v2002@yahoo.com
Date: December 17, 2008 7:22:28 AM EST
To: Geoffrey Hutchison geoff.hutchison@gmail.com
Subject: Re: Avogadro / lrelease
Reply-To: coyote_v2002@yahoo.com

Hi,

here it is:

% ls /usr/bin/lrelease*
/usr/bin/lrelease@ /usr/bin/lrelease-qt3* /usr/bin/lrelease-qt4*

or,

% ls -l /usr/bin/lrelease*
lrwxrwxrwx 1 root root 26 2008-02-04 09:51 /usr/bin/lrelease → /
etc/alternatives/lrelease*
-rwxr-xr-x 1 root root 69744 2008-05-02 13:04 /usr/bin/lrelease-qt3*
-rwxr-xr-x 1 root root 262304 2008-11-14 11:42 /usr/bin/lrelease-qt4

Incidentally, I don’t see lrelease on adept, so I am almost sure I
installed lrelease manually because I had to if I wanted to compile
avogadro by hand - I did that to see if compiled manually it will
run (the result was the same as avogadro installed using adept) - I
think didn’t realize about existence of rlelease-qt4.

Running lrelease-qt4 gives:

% lrelease-qt4 -version
lrelease version 4.4.3

I do have libqt4-dev installed.

Vis

— On Tue, 12/16/08, Geoffrey Hutchison geoff.hutchison@gmail.com
wrote:

From: Geoffrey Hutchison geoff.hutchison@gmail.com
Subject: Re: Avogadro / lrelease
To: coyote_v2002@yahoo.com
Date: Tuesday, December 16, 2008, 7:25 PM
Hi there,

I am nor sure if this is what you asked about, but
here’s what I get
(by the way the KDE4 performance with grahics card is
a bit lousy, and
chimera and vmd do not run neither)

Are you saying that Avogadro doesn’t run? Well,
we’ll have to do better than that for you!

% lrelease -version
lrelease version 3.3.8b

OK, great. So that’s lrelease for Qt3 not Qt4.2.

Could you run “ls /usr/bin/lrelease*” for me?
Right now we look for lrelease and lrelease-qt4 but maybe
you have a different name? Do you have libqt4-dev installed?

Thanks for helping me get to the bottom of this!
-Geoff

On Wed, Dec 17, 2008 at 11:12:16AM -0500, Geoffrey Hutchison wrote:

Here’s the issue. Some people on Kubuntu are having problems compiling
Avogadro because we call lrelease with flags they don’t have. Strange,
since lrelease on Qt 4.2 or newer has all of these flags.

So I checked Kubuntu and realized that Cmake was probably picking up
lrelease for Qt 3.x instead of lrelease-qt4. But in our cmake/modules/
FindLinguist code, we look for lrelease-qt4 before lrelease. Why aren’t
we picking up lrelease-qt4?

FIND_PROGRAM(QT_LRELEASE_EXECUTABLE NAMES lrelease-qt4 lrelease PATHS
“[HKEY_CURRENT_USER\Software\Trolltech\Qt3Versions
\4.0.0;InstallDir]/bin”
“[HKEY_CURRENT_USER\Software\Trolltech\Versions
\4.0.0;InstallDir]/bin”
$ENV{QTDIR}/bin
)

Any ideas? I know azeem hit this on Debian too:
[Debichem-devel] [Avogadro-devel] using undocumented lrelease options breaks building avogadro

I think we never figured out what the source of the problem was, the
build logs still read

– Found lrelease: /usr/bin/lrelease

As Debian/Ubuntu packages targetted at official archives are supposed to
be built in clean environments, the lrelease-qt3 issue is not a problem
there. So as I am no cmake expert, and we wanted to have no big changes
due to release deadlines, we did not investigate further.

Michael