|
From: Ethan A M. <me...@uw...> - 2025-03-19 21:27:51
|
On Wednesday, 19 March 2025 13:28:24 PDT Erik Luijten wrote:
> Dear all,
>
> I am trying to create gnuplot executables for macOS in which the Qt
> libraries are statically linked. It is easy to create static versions of
> Qt, but I run into two problems:
>
>
> 1. Compilation of gnuplot on macOS relies on pkg-config, but to the best
> of my knowledge, pkg-config is not supported in Qt6 (if I am mistaken, I
> would be grateful for pointers).
I use pkg-config with Qt6 without problems.
I am aware of two past pkg-config +Qt6 related issues on the linux side.
(1) Fedora breaks down the Qt6 dependencies differently, so we needed to add a
check in the configure script that picked them all up. That change is in 6.0.1
https://sourceforge.net/p/gnuplot/bugs/2705/
(2) There was an Ubuntu packaging error that failed in include the pkg-config files
*.pc in the initial Ubuntu Qt6 packages, and this failure propagated to ubuntu
derivatives like Mint. I confirmed at the time that (at least on Mint)
it was sufficient to regenerate the *.pc files directly from the Qt repository or
to copy them, after inspection, from another linux distro. That problem was
acknowledged upstream by Unbuntu, but I have not tracked the resolution since then.
Here is a link to one message in the thread exploring this
https://sourceforge.net/p/gnuplot/mailman/message/58773575/
I don't know why a Fedora or Ubuntu glitch would affect macOS, but perhaps there was
a parallel failure with the same result.
>
>
> 2. Qt5 has support for pkg-config. A regular (dynamic) binary of gnuplot
> works well with Qt. However, a statically compiled version of gnuplot
> starts properly, but as soon as I issue the first plot command there is a
> warning:
>
> qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in ""
I can't help you here. I believe that Cocoa is one of several possible graphics
backends for Qt on macOS, but if you switch to one of the others you may well
just get the equivalent warning for that new backend.
Ethan
>
>
> If I restart gnuplot after setting "export QT_DEBUG_PLUGINS=1", I get:
>
> FactoryLoader::QFactoryLoader() ignoring
> "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3" since
> plugins are disabled in static builds
>
>
> As far as I can tell, the qtterminal source code should have a
> Q_IMPORT_PLUGIN() command to work properly with static compilation, but I
> do not know enough about Qt to be sure.
>
>
> Any help would be appreciated!
>
> Erik
>
|