Bug 208038 - net-p2p/qbittorrent-nox11: Doesn't compile when both qt4 and qt5 are disabled
Summary: net-p2p/qbittorrent-nox11: Doesn't compile when both qt4 and qt5 are disabled
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-15 18:26 UTC by Grzegorz Junka
Modified: 2016-08-25 18:47 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grzegorz Junka 2016-03-15 18:26:25 UTC
qbittorrent-nox11 should compile without X, nevertheless it fails to compile if both, QT4 and QT5 options are disabled:

checking whether to enable the WebUI... yes
checking whether Qt4 should be enabled... no
checking for /qmake... no
checking for /qmake-qt5... no
checking for Qt5 qmake >= 5.2.0... not found
configure: error: Could not find qmake
===>  Script "configure" failed unexpectedly.
Please report the problem to yuri@rawbw.com [maintainer] and attach the
"/wrkdirs/usr/ports/net-p2p/qbittorrent-nox11/work/qBittorrent-release-3.3.3/config.log"
including the output of the failure of your make command. Also, it might be
a good idea to provide an overview of all packages installed on your system
(e.g. a /usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make: stopped in /usr/ports/net-p2p/qbittorrent-nox11
====>> Cleaning up wrkdir
===>  Cleaning for qbittorrent-nox11-3.3.3
====>> Warning: Leftover processes:
USER   PID %CPU %MEM   VSZ  RSS TT  STAT STARTED    TIME COMMAND
build of net-p2p/qbittorrent-nox11 ended at Tue Mar 15 18:16:38 UTC 2016
build time: 00:00:19
!!! build failure encountered !!!
Comment 1 Mikhail Teterin freebsd_committer freebsd_triage 2016-04-28 02:50:19 UTC
The problem here is that qmake of some version is still required, even if no GUI is to be built.

kde@! How can a port declare dependency on some qmake -- either devel/qmake4 or devel/qmake5 would do?

Obviously, it is desirable to use a qmake already present on the building system, if any... Are there some magical knobs for that already?
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2016-04-28 03:44:52 UTC
USES+=qmake does this.
Comment 3 Tobias Berner 2016-04-28 10:00:01 UTC
The options definition in the port seems wrong.

QT4 and QT5 are probably intended to be a SINGLE-option (which is "exactly one of the group") -- and not a RADIO (which is "at most one of the group").
 

mfg Tobias
Comment 4 Yuri Victorovich freebsd_committer freebsd_triage 2016-04-28 10:26:06 UTC
Radio options group with default is the same as "one of many" which is exactly what is expected here.

Default is set:
OPTIONS_DEFAULT=QT4
so I don't understand how can the subject of this bug make sense. Both qt4 and qt5 can't be disabled.

Without any options:
> # make -V USE_QT4
> corelib network qmake_build linguisttools_build moc_build rcc_build uic_build gui xml
> # make -V USE_QT5
Comment 5 Grzegorz Junka 2016-04-28 10:28:14 UTC
(In reply to yuri from comment #4)

I could deselect both and save the options. Then I was getting the compilation error.
Comment 6 Tobias Berner 2016-04-28 10:36:20 UTC
You cannot have qmake without specifying either USE_QT4 or USE_QT5.
And you cannot link against more than one QT-version. 

The only thing that makes sense is an OPTIONS_SINGLE.

From the handbook:
* SINGLE: OPTIONS can be grouped as radio choices, where *only one* choice from each group is allowed (There must be one of each OPTIONS_SINGLE group selected at all times for the options to be valid.)
* RADIO: OPTIONS can be grouped as radio choices, where *none or only one* choice from each group is allowed
Comment 7 Yuri Victorovich freebsd_committer freebsd_triage 2016-04-28 10:36:51 UTC
I see.

The ability to deselect both shouldn't be there, this isn't how radio buttons are normally expected to work. Wikipedia also supports this: https://en.wikipedia.org/wiki/Radio_button

This is a bug in how port framework supports radio buttons, not a bug in this port.
Comment 8 Yuri Victorovich freebsd_committer freebsd_triage 2016-04-28 10:41:22 UTC
For some reason, when I replace RADIO->SINGLE it works the same way - still allows to deselect both.
Comment 9 Tobias Berner 2016-04-28 11:38:59 UTC
You should get:

====> You must select one and only one option from the QT single
Config is invalid. Re-edit? [Y/n]

if you select none of the QT options.
Comment 10 Yuri Victorovich freebsd_committer freebsd_triage 2016-04-28 18:32:28 UTC
Will include the fix in the update for the new release.
Comment 11 Yuri Victorovich freebsd_committer freebsd_triage 2016-04-28 19:31:34 UTC
Fixed in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209132
Comment 12 Grzegorz Junka 2016-04-28 20:34:35 UTC
(In reply to yuri from comment #11)

Great! Thank you.