Static compilation with Qt
Erik Luijten <[email protected]> Wed, 19 Mar 2025 15:28:24 -0500
| Newsgroups | gmane.comp.graphics.gnuplot.devel |
|---|---|
| Message-ID | <CAM4Pt--RU8mavzMnU8_qsdvKyMUYGpVh4j7g6AcP3=a46YpOTg@mail.gmail.com> |
--===============8951167796988089510== Content-Type: multipart/alternative; boundary="0000000000009e234d0630b7dd0d" --0000000000009e234d0630b7dd0d Content-Type: text/plain; charset="UTF-8" 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). 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 "" 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 --0000000000009e234d0630b7dd0d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr">Dear all,<br><div><br></div><div>I am try= ing to create gnuplot executables for macOS in which the=C2=A0Qt libraries = are statically linked. It is easy to create static versions of Qt, but I ru= n into two problems:</div><div><br></div><div><br></div><div>1. Compilation= of gnuplot on macOS relies on pkg-config, but to the best of=C2=A0my knowl= edge, pkg-config is not supported in Qt6 (if I am mistaken, I would be grat= eful=C2=A0for pointers).</div><div><br></div><div><br></div><div>2. Qt5 has= support=C2=A0for pkg-config. A regular (dynamic) binary of gnuplot works w= ell with Qt. However, a statically compiled version of gnuplot starts prope= rly, but as soon as I issue the first plot command there=C2=A0is a warning:= </div><div><br></div><div> <p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;font-= variant-east-asian:normal;font-variant-alternates:normal;font-size-adjust:n= one;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font= -size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span cla= ss=3D"gmail-s1" style=3D"font-variant-ligatures:no-common-ligatures">qt.qpa= .plugin: Could not find the Qt platform plugin "cocoa" in "&= quot;</span></p><p class=3D"gmail-p1" style=3D"margin:0px;font-variant-nume= ric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;fo= nt-size-adjust:none;font-kerning:auto;font-feature-settings:normal;font-str= etch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0= ,0,0)"><br></p><p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numer= ic:normal;font-variant-east-asian:normal;font-variant-alternates:normal;fon= t-size-adjust:none;font-kerning:auto;font-feature-settings:normal;font-stre= tch:normal;line-height:normal"><br></p><p class=3D"gmail-p1" style=3D"margi= n:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-varia= nt-alternates:normal;font-size-adjust:none;font-kerning:auto;font-feature-s= ettings:normal;font-stretch:normal;line-height:normal">If I restart gnuplot= after setting <span style=3D"font-variant-ligatures:no-common-ligatures;co= lor:rgb(0,0,0);font-family:Menlo;font-size:11px">"export QT_DEBUG_PLUG= INS=3D1",</span>=C2=A0I get:<br><br> </p><p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;f= ont-variant-east-asian:normal;font-variant-alternates:normal;font-size-adju= st:none;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;= line-height:normal"><span style=3D"font-variant-ligatures:no-common-ligatur= es;color:rgb(0,0,0);font-family:Menlo;font-size:11px">FactoryLoader::QFacto= ryLoader() ignoring "org.qt-project.Qt.QPA.QPlatformIntegrationFactory= Interface.5.3" since plugins are disabled in static builds</span>=C2= =A0</p><p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:norma= l;font-variant-east-asian:normal;font-variant-alternates:normal;font-size-a= djust:none;font-kerning:auto;font-feature-settings:normal;font-stretch:norm= al;line-height:normal"><br></p><div>As far as I can tell, the qtterminal=C2= =A0source code should have a Q_IMPORT_PLUGIN() command to work properly wit= h static compilation, but I do not know enough about Qt to be sure.</div><d= iv><br></div><div><br></div><div>Any help would be appreciated!</div><div><= br></div><div>Erik</div> </div></div> </div> --0000000000009e234d0630b7dd0d-- --===============8951167796988089510== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============8951167796988089510== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ gnuplot-beta mailing list [email protected] Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta --===============8951167796988089510==--