bugGNU Octave - Bugs: bug #60695, Presence of qtchooser in host...


bug #60695: Presence of qtchooser in host system breaks build with Qt in another prefix (pkgsrc here)

Submitted by:  None
Submitted on:  Sat 29 May 2021 06:29:55 PM UTC  
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  None Assigned to:  None
Originator Name:  Thomas Orgis Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  6.2.0
Operating System:  GNU/Linux

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sat 29 May 2021 08:17:53 PM UTC, comment #2: 

Hm, I hoped reply-by-mail works. Here is my comment I sent before:

My M4-foo is not well-trained. Would it be feasible to have it always
generate an absolute path to the Qt tools and then do

test `readlink "$MOC"` = qtchooser

(or a safer variant that also checks for */qtchooser or such)?

Readlink of course doesn't work with the tool command is just `uic`.

About chooser config for the custom version: There are several reasons,
but the strongest might be these two:

1. Non-root users can install a tree via pkgsrc/conda/whatever, but
they have no power over system qtchooser config or might install Qt for
other users to use, so have no power over any custom config. They can
offer environment modules that add to PATH and friends, though.

2. Envrionment modules mean that there is run-time switching of
software trees via PATH-like variables. I do not know if the qtchooser
configuration fits that, unless a qtchooser is installed in each tree.

I must admit that I never stumbled over the qtchooser behaviour before.
It is one approach to work with differing trees of software, specific
to Qt in this case. Managing PATH via environment modules is another
way, generic to loads of software.

My most active time of intentionally building Qt was back with KDE 3.
Now I just wanted to build Octave from pkgsrc and it broke with the
recent update. As long as the qtchooser thing is no requirement, just a
nice add-on for binary distros, it would be nice if pointing PATH (and
PKG_CONFIG_PATH, etc.) to another install still works.

Sat 29 May 2021 07:13:57 PM UTC, comment #1: 

Yes, you're right, the configure script assumes that the presence of qtchooser means that it will be used for whatever Qt you are using. That has been the safest approach for most distributions that we have found so far. But I am sure we will welcome improvements to the configure script if you have a way to change it without breaking other configurations.

By the way, is there a reason you don't want to insert a qtchooser configuration file for your pkgsrc installation of Qt?

Mike Miller <mtmiller>
Project Administrator
Sat 29 May 2021 06:29:55 PM UTC, original submission:  

The configure script assumes that presence of a qtchooser (e.g. /usr/bin/qtchoooser) means that moc and friends are actually handled by it, by being symlinks to qtchooser.

This is a wrong assumption if the host is some GNU/Linux distro and you build Octave with another install of Qt. In my case it is installing it via the pkgsrc collection. This means that in my case moc is /data/pkg/qt5/bin/moc, totally unrelated to /usr/bin/moc, which is a symlink to qtchooser.

As pkgsrc does not user the qtchooser machinery, this confused setup leads to the correct Qt tools being selected, but the builds breaks on the first call to `moc -qt=5` as this is not as symlink to qtchooser and hence that argument triggers an error.

The m4 macro should either check if the tools really accept the assumed MOCFLAGS etc., or test if the located commands are symlinks to the qtchooser and then assume that -qt=$version is desired.

I hope that the scenario of using a custom prefix for Qt to override the system on is not too outlandish when we come from the perspective of a user doing a custom build of Octave already.

My use case of pkgsrc in HPC especially is about installing lots of software from sources concurrently, to be independent of the distro in such matters like Qt version.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.6