Opened 6 years ago

Last modified 6 years ago

#58014 new enhancement

KDE4 ports and concurrent Qt5

Reported by: RJVB (René Bertin) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: NicosPavlov
Port: kde4 PortGroup

Description

Has anyone else been noticing that KDE4 ports fail to build with recent CMake versions because Qt4 is no longer found (but Qt5 instead)?

-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found Qt-Version 5.9.7

This may be related to the fact that CMake now ships its own FindQt4 module (using that module instead of KDE's fixes the issue for me) but it's more likely that it's caused simply by having Qt5's qmake in the path that's seen by MacPorts.

Let's forget about whether or not user threspassing in $prefix/bin can be tolerated, there's an easy fix to ensure that the appropriate Qt version will be found.

In kde4-1.1.tcl:

configure.args-append   -DQT_QMAKE_EXECUTABLE=${qt_qmake_cmd}
configure.env-append    QTDIR=${qt_dir}
build.env-append        QTDIR=${qt_dir}
destroot.env-append     QTDIR=${qt_dir}

Change History (2)

comment:1 Changed 6 years ago by NicosPavlov

I am not experiencing such issue, and there were other tickets which seem to indicate that other people do not either. I'll leave that ticket opened for some time just in case other people report the same issue.

comment:2 Changed 6 years ago by RJVB (René Bertin)

I think you trigger the issue by making a modification that causes the Qt5 qmake to be found on your path. That's something that seems people might do if they use Qt themselves, even if it's by installing symlinks called qmake-qt5 and qmake-qt4 .

Note: See TracTickets for help on using tickets.