Opened 10 months ago

Last modified 2 months ago

#69214 assigned defect

qt6: *.pc files required by pkg-config are missing

Reported by: jyssh (Jayesh Bhoot) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: i0ntempest
Port: qt6

Description

Early versions of Qt6 did not install *.pc files required by pkg-config in qt_dir/lib/pkgconfig path (which should be /opt/local/libexec/qt6/lib/pkgconfig in MacPorts's case, if we follow the lead of qt5 package).

While this seems to have been resolved at the time of this writing in qt6 packages in other package management systems, MacPorts's package may not have it fixed yet.

Change History (7)

comment:1 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to MarcusCalhoun-Lopez
Status: newassigned
Summary: *.pc files required by pkg-config are missingqt6: *.pc files required by pkg-config are missing

comment:2 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)

One possible reason:

In https://bugreports.qt.io/browse/QTBUG-86080 it says

On macOS, there are no .pc files installed by a Qt build from source.

That comment was from July 2023; I don't know if it's still accurate.

comment:3 Changed 2 months ago by reneeotten (Renee Otten)

the generation of .pc files has been available since Qt 6.3 (see here). However, looking at the code in cmake/QtPkgConfigHelpers.cmake this is not done in when QT_FEATURE_framework is set, which is the default on macOS.

I looked/searched a bit more in the Qt bug tracker and forum but haven't found a solution or noticed that there is a plan to implement that. In short, this is an upstream issue so you could/should bring that upstream if you are interested in having it resolved.

comment:4 Changed 2 months ago by i0ntempest

Cc: i0ntempest added

comment:5 Changed 2 months ago by i0ntempest

A trivial patch removing the condition on that variable can get those *.pc files installed. Is that something we want to do?

I got to this when trying to make gnuplot link Qt6, and gnuplot relies on pkgconfig to find Qt.

comment:6 in reply to:  5 ; Changed 2 months ago by reneeotten (Renee Otten)

Replying to i0ntempest:

A trivial patch removing the condition on that variable can get those *.pc files installed. Is that something we want to do?

I got to this when trying to make gnuplot link Qt6, and gnuplot relies on pkgconfig to find Qt.

It's easy to get rid of the test for a framework-installation and have it install .pc files. However, from a quick look in the upstream tickets and code I don't think that these pkg-config files are actually correct. But admittedly, I haven't tried it so if you did try this out locally and verified that all the .pc files are correct with respect to linking within the framework-install and flags and such, then yes we could consider enabling it. But my understanding is that there will be more patching required..

comment:7 in reply to:  6 Changed 2 months ago by i0ntempest

Replying to reneeotten:

Replying to i0ntempest:

A trivial patch removing the condition on that variable can get those *.pc files installed. Is that something we want to do?

I got to this when trying to make gnuplot link Qt6, and gnuplot relies on pkgconfig to find Qt.

It's easy to get rid of the test for a framework-installation and have it install .pc files. However, from a quick look in the upstream tickets and code I don't think that these pkg-config files are actually correct. But admittedly, I haven't tried it so if you did try this out locally and verified that all the .pc files are correct with respect to linking within the framework-install and flags and such, then yes we could consider enabling it. But my understanding is that there will be more patching required..

Yea you're probably correct, just having those *.px files wasn't enough for gnuplot to build with Qt6.

Note: See TracTickets for help on using tickets.