Tuesday, 9 February 2016

Re: Launchpad invoking 64-bit programme in 32-bit build environment

On Tue, Feb 09, 2016 at 09:34:24AM -0500, Luí­s de Sousa wrote:
> I am trying to package a Qt programme for Trusty. I have successfully built the package in my system and uploaded it to a PPA. The control file includes the following:
>
> Build-Depends: debhelper (>= 8.0.0), cdbs, libpq-dev, libxml2-dev, clang, qt5-qmake, qt5-default, qttools5-dev-tools, qt5-image-formats-plugins
>
> The Launchpad log file [0] appears to show that qt5-make is in fact installed in the build system. However, the compilation is issuing this error:
>
> /usr/lib/x86_64-linux-gnu/qt5/bin/qmake -o Makefile pgmodeler.pro
> make[1]: /usr/lib/x86_64-linux-gnu/qt5/bin/qmake: Command not found
> make[1]: *** [Makefile] Error 127
> make[1]: Failed to remake makefile `Makefile'.
>
> Why is the 64-bit version of qmake being invoked instead of the 32-bit?

Because that's what the Makefile in your package tells it to do:

<[email protected] ~/pgmodeler-0.8.2-beta (develop=)>$ grep -im2 x86.64 Makefile
# Command: /usr/lib/x86_64-linux-gnu/qt5/bin/qmake -o Makefile pgmodeler.pro
QMAKE = /usr/lib/x86_64-linux-gnu/qt5/bin/qmake

Since that Makefile exists, the CDBS qmake handling that would normally
arrange to run qmake doesn't actually get run.

In this case, Makefile looks like a generated file. I see that upstream
ships it, so you probably want to arrange to remove it at the start of
your build. Something like this, since you're using CDBS:

pre-build::
rm -f Makefile

(Entirely untested, may need further tweaking, etc.)

There's nothing special about Launchpad here. You should be able to
reproduce the same failure mode with sbuild
(https://wiki.ubuntu.com/SimpleSbuild), and I strongly recommend doing
so in order that you can iterate locally before uploading.

--
Colin Watson [[email protected]]

--
ubuntu-devel mailing list
[email protected]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel