Re: problem with compiling QGuiApplication not found
Liza Belos <[email protected]> Mon, 14 Oct 2024 16:38:38 +0200
| Newsgroups | gmane.editors.texmacs.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --===============3732139039752476008== Content-Type: multipart/alternative; boundary="------------A0hgRpdyNfSe75MMdFa0H1RX" Content-Language: fr This is a multi-part message in MIME format. --------------A0hgRpdyNfSe75MMdFa0H1RX Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit The error indicate that you have a version of qt that need fPIC during the compilation (strange that it is not in the CXXFLAGS of the pkgconfig files...). Can you configure with : QT_SELECT=qt5 CXXFLAGS=-fPIC LDFLAGS=-fPIC ./configure --with-qt-find-method=pkgconfig Le 14/10/2024 à 16:34, Dmitry a écrit : > Hello Liza, > > With --with-qt-find-method=pkgconfig .make fails almost instantly with: > > cd src; make -r -f makefile link=shared > make[1]: Entering directory 'texmacs/src' > g++ -ISystem -ISystem/Boot -ISystem/Classes -ISystem/Files > -ISystem/Link -ISystem/Misc -ISystem/Language -IKernel/Abstractions > -IKernel/Containers -IKernel/Types -IData/Convert -IData/Drd > -IData/History -IData/Observers -IData/Document -IData/String > -IData/Tmfs -IData/Tree -IData/Parser -IScheme -IGraphics/Bitmap_fonts > -IGraphics/Fonts -IGraphics/Gui -IGraphics/Mathematics > -IGraphics/Renderer -IGraphics/Handwriting -IGraphics/Types > -IGraphics/Pictures -IGraphics/Spacial -IGraphics/Colors -IPlugins > -IPlugins/Unix -ITypeset -ITypeset/Bridge -ITypeset/Concat > -ITypeset/Page -IEdit -IPlugins -ITexmacs -std=c++11 -include config.h > -I/usr/include/x86_64-linux-gnu/qt5/QtCore > -I/usr/include/x86_64-linux-gnu/qt5 > -I/usr/include/x86_64-linux-gnu/qt5/QtGui > -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets > -I/usr/include/x86_64-linux-gnu/qt5/QtSvg > -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -DQTTEXMACS -Wall > -Wno-return-type -O3 -fexpensive-optimizations -c > ./Texmacs/Texmacs/texmacs.cpp -o Objects/texmacs.o > In file included from > /usr/include/x86_64-linux-gnu/qt5/QtCore/qnamespace.h:43:0, > from > /usr/include/x86_64-linux-gnu/qt5/QtCore/qmargins.h:43, > from /usr/include/x86_64-linux-gnu/qt5/QtCore/qrect.h:43, > from /usr/include/x86_64-linux-gnu/qt5/QtCore/QRect:1, > from Plugins/Qt/qt_utilities.hpp:16, > from Plugins/Qt/qt_widget.hpp:18, > from Plugins/Qt/qt_simple_widget.hpp:18, > from Edit/editor.hpp:20, > from Texmacs/server.hpp:14, > from ./Texmacs/Texmacs/texmacs.cpp:25: > /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1135:4: error: > #error "You must build your code with position independent code if Qt > was built with -reduce-relocations. " "Compile your code with -fPIC > (-fPIE is not enough)." > # error "You must build your code with position independent code if > Qt was built with -reduce-relocations. "\ > ^~~~~ > makefile:355: recipe for target 'Objects/texmacs.o' failed > make[1]: *** [Objects/texmacs.o] Error 1 > make[1]: Leaving directory 'texmacs/src' > Makefile:57: recipe for target 'TEXMACS' failed > make: *** [TEXMACS] Error 2 > > with QT_SELECT=qt5 ( without --with-qt-find-method=pkgconfig ) the > same error as before: > ./Plugins/Unix/unix_system.cpp:15:10: fatal error: QGuiApplication: No > such file or directory > > BTW: make clean don't delete src/makefile > > On Mon, Oct 14, 2024 at 10:46 AM Liza Belos > <[email protected]> wrote: > > Hello Dmitry, > > Could you try compiling with the following configure option: > --with-qt-find-method=pkgconfig . > On some Ubuntu installations, I also found that setting the > environment variable QT_SELECT=qt5 can resolve certain issues. > > Best regards, > Liza > > Le 13/10/2024 à 22:19, Dmitry a écrit : >> Hello, JFYI >> >> I had a problem compiling texmacs ( tried last master >> c6287b64afe6aeb57613f57b5c2cf0e85d6ae8c4 and v2.1.2 ) : >> make[1]: Entering directory 'texmacs/src' >> g++ -ISystem -ISystem/Boot -ISystem/Classes -ISystem/Files >> -ISystem/Link -ISystem/Misc -ISystem/Language -IKernel/Abstractions >> -IKernel/Containers >> -IKernel/Types -IData/Convert -IData/Drd -IData/History >> -IData/Observers -IData/Document -IData/String -IData/Tmfs -IData/Tree >> -IData/Parser -IScheme >> -IGraphics/Bitmap_fonts -IGraphics/Fonts -IGraphics/Gui >> -IGraphics/Mathematics -IGraphics/Renderer -IGraphics/Handwriting >> -IGraphics/Types >> -IGraphics/Pictures -IGraphics/Spacial -IGraphics/Colors -IPlugins >> -IPlugins/Unix >> -pthread -I/usr/local/guile-1.8.7/include >> -I/usr/local/guile-1.8.7/include/guile -include config.h >> -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB >> -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. >> -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -D_REENTRANT >> -DQTTEXMACS -Wall -Wno-return-type -O3 -fexpensive-optimizations -c >> ./Plugins/Unix/unix_system.cpp -o Objects/unix_system.o >> ./Plugins/Unix/unix_system.cpp:15:10: fatal error: QGuiApplication: No >> such file or directory >> >> After some research I found that adding $(CXXQT) flags to $(os_obj) helps: >> $ diff src/makefile.orig src/makefile >> 343c343 >> < $(call cxx_incl,$(os_incl) $(CXXGUILE)) >> --- >>> $(call cxx_incl,$(os_incl) $(CXXGUILE) $(CXXQT)) >> Maybe my ubuntu too old? >> $ cat /etc/os-release >> NAME="Ubuntu" >> VERSION="18.04.6 LTS (Bionic Beaver)" >> ID=ubuntu >> ID_LIKE=debian >> PRETTY_NAME="Ubuntu 18.04.6 LTS" >> >> $ g++ --version >> g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 >> >> Cordialement. >> -- >> Dmitry >> >> _______________________________________________ >> Texmacs-dev mailing list >> [email protected] >> https://lists.gnu.org/mailman/listinfo/texmacs-dev > -- > > *Liza Belos* > *Laboratoire d'Informatique de l'École Polytechnique* > > *Mail LIX : *[email protected] > *Mail CNRS : *[email protected] > *Téléphone : *06 86 43 86 39 > *Bureau : *1013 > > > > -- > -- > Dmitry -- *Liza Belos* *Laboratoire d'Informatique de l'École Polytechnique* *Mail LIX : *[email protected] *Mail CNRS : *[email protected] *Téléphone : *06 86 43 86 39 *Bureau : *1013 --------------A0hgRpdyNfSe75MMdFa0H1RX Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit <!DOCTYPE html> <html data-lt-installed="true"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body style="padding-bottom: 1px;"> <p>The error indicate that you have a version of qt that need fPIC during the compilation (strange that it is not in the CXXFLAGS of the pkgconfig files...).</p> <p>Can you configure with :<br> </p> <p>QT_SELECT=qt5 CXXFLAGS=-fPIC LDFLAGS=-fPIC ./configure --with-qt-find-method=pkgconfig<br> </p> <div class="moz-cite-prefix">Le 14/10/2024 à 16:34, Dmitry a écrit :<br> </div> <blockquote type="cite" cite="mid:CAJViqFmbnK2-Lk56LT23N+v9DyVvExepawQPB0R7JX96OGaKpw@mail.gmail.com"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <div dir="ltr"> <div>Hello Liza,</div> <div><br> </div> <div>With --with-qt-find-method=pkgconfig .make fails almost instantly with:</div> <div><br> </div> <div>cd src; make -r -f makefile link=shared<br> make[1]: Entering directory 'texmacs/src'<br> g++ -ISystem -ISystem/Boot -ISystem/Classes -ISystem/Files -ISystem/Link -ISystem/Misc -ISystem/Language -IKernel/Abstractions -IKernel/Containers -IKernel/Types -IData/Convert -IData/Drd -IData/History -IData/Observers -IData/Document -IData/String -IData/Tmfs -IData/Tree -IData/Parser -IScheme -IGraphics/Bitmap_fonts -IGraphics/Fonts -IGraphics/Gui -IGraphics/Mathematics -IGraphics/Renderer -IGraphics/Handwriting -IGraphics/Types -IGraphics/Pictures -IGraphics/Spacial -IGraphics/Colors -IPlugins -IPlugins/Unix -ITypeset -ITypeset/Bridge -ITypeset/Concat -ITypeset/Page -IEdit -IPlugins -ITexmacs -std=c++11 -include config.h -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtSvg -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -DQTTEXMACS -Wall -Wno-return-type -O3 -fexpensive-optimizations -c ./Texmacs/Texmacs/texmacs.cpp -o Objects/texmacs.o<br> In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/qnamespace.h:43:0,<br> from /usr/include/x86_64-linux-gnu/qt5/QtCore/qmargins.h:43,<br> from /usr/include/x86_64-linux-gnu/qt5/QtCore/qrect.h:43,<br> from /usr/include/x86_64-linux-gnu/qt5/QtCore/QRect:1,<br> from Plugins/Qt/qt_utilities.hpp:16,<br> from Plugins/Qt/qt_widget.hpp:18,<br> from Plugins/Qt/qt_simple_widget.hpp:18,<br> from Edit/editor.hpp:20,<br> from Texmacs/server.hpp:14,<br> from ./Texmacs/Texmacs/texmacs.cpp:25:<br> /usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h:1135:4: error: #error "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not enough)."<br> # error "You must build your code with position independent code if Qt was built with -reduce-relocations. "\<br> ^~~~~<br> makefile:355: recipe for target 'Objects/texmacs.o' failed<br> make[1]: *** [Objects/texmacs.o] Error 1<br> make[1]: Leaving directory 'texmacs/src'<br> Makefile:57: recipe for target 'TEXMACS' failed<br> make: *** [TEXMACS] Error 2</div> <div><br> </div> <div>with QT_SELECT=qt5 ( without --with-qt-find-method=pkgconfig ) the same error as before:</div> <div>./Plugins/Unix/unix_system.cpp:15:10: fatal error: QGuiApplication: No such file or directory</div> <div><br> </div> <div>BTW: make clean don't delete src/makefile<br> </div> </div> <br> <div class="gmail_quote"> <div dir="ltr" class="gmail_attr">On Mon, Oct 14, 2024 at 10:46 AM Liza Belos <<a href="mailto:[email protected]" moz-do-not-send="true" class="moz-txt-link-freetext">[email protected]</a>> wrote:<br> </div> <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div style="padding-bottom:1px"> <p>Hello Dmitry,</p> <p>Could you try compiling with the following configure option: --with-qt-find-method=pkgconfig .<br> On some Ubuntu installations, I also found that setting the environment variable QT_SELECT=qt5 can resolve certain issues.</p> <p>Best regards,<br> Liza</p> <div>Le 13/10/2024 à 22:19, Dmitry a écrit :<br> </div> <blockquote type="cite"> <pre>Hello, JFYI I had a problem compiling texmacs ( tried last master c6287b64afe6aeb57613f57b5c2cf0e85d6ae8c4 and v2.1.2 ) : make[1]: Entering directory 'texmacs/src' g++ -ISystem -ISystem/Boot -ISystem/Classes -ISystem/Files -ISystem/Link -ISystem/Misc -ISystem/Language -IKernel/Abstractions -IKernel/Containers -IKernel/Types -IData/Convert -IData/Drd -IData/History -IData/Observers -IData/Document -IData/String -IData/Tmfs -IData/Tree -IData/Parser -IScheme -IGraphics/Bitmap_fonts -IGraphics/Fonts -IGraphics/Gui -IGraphics/Mathematics -IGraphics/Renderer -IGraphics/Handwriting -IGraphics/Types -IGraphics/Pictures -IGraphics/Spacial -IGraphics/Colors -IPlugins -IPlugins/Unix -pthread -I/usr/local/guile-1.8.7/include -I/usr/local/guile-1.8.7/include/guile -include config.h -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -D_REENTRANT -DQTTEXMACS -Wall -Wno-return-type -O3 -fexpensive-optimizations -c ./Plugins/Unix/unix_system.cpp -o Objects/unix_system.o ./Plugins/Unix/unix_system.cpp:15:10: fatal error: QGuiApplication: No such file or directory After some research I found that adding $(CXXQT) flags to $(os_obj) helps: $ diff src/makefile.orig src/makefile 343c343 < $(call cxx_incl,$(os_incl) $(CXXGUILE)) --- </pre> <blockquote type="cite"> <pre> $(call cxx_incl,$(os_incl) $(CXXGUILE) $(CXXQT)) </pre> </blockquote> <pre>Maybe my ubuntu too old? $ cat /etc/os-release NAME="Ubuntu" VERSION="18.04.6 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.6 LTS" $ g++ --version g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 Cordialement. -- Dmitry _______________________________________________ Texmacs-dev mailing list <a href="mailto:[email protected]" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">[email protected]</a> <a href="https://lists.gnu.org/mailman/listinfo/texmacs-dev" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.gnu.org/mailman/listinfo/texmacs-dev</a> </pre> </blockquote> <div>-- <br> <table border="0" cellspacing="0" cellpadding="0" style="font-size:small;color:rgb(1,66,106)"> <tbody> <tr> <td> <br> </td> <td style="padding-left:10px"> <b>Liza Belos</b><br> <b>Laboratoire d'Informatique de l'École Polytechnique</b><br> <br> <b>Mail LIX : </b><a href="mailto:[email protected]" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">[email protected]</a><br> <b>Mail CNRS : </b><a href="mailto:[email protected]" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">[email protected]</a><br> <b>Téléphone : </b>06 86 43 86 39<br> <b>Bureau : </b>1013 </td> </tr> </tbody> </table> </div> </div> </blockquote> </div> <br clear="all"> <br> <span class="gmail_signature_prefix">-- </span><br> <div dir="ltr" class="gmail_signature">--<br> Dmitry</div> </blockquote> <div class="moz-signature">-- <br> <table border="0" cellspacing="0" cellpadding="0" style="font-size:small; color: #01426A;"> <tbody> <tr> <td> <svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="55.276px" height="55.276px" viewBox="184.629 85.914 55.276 55.276" enable-background="new 184.629 85.914 55.276 55.276" xml:space="preserve"> <g> <radialGradient id="SVGID_1_" cx="1981.3169" cy="-1309.801" r="212.8125" gradientTransform="matrix(0.1616 0 0 -0.1616 -101.4548 -104.4775)" gradientUnits="userSpaceOnUse"> <stop offset="0" style="stop-color:#456587"></stop> <stop offset="0.2555" style="stop-color:#2C4F73"></stop> <stop offset="0.5931" style="stop-color:#0C395D"></stop> <stop offset="0.8524" style="stop-color:#002D50"></stop> <stop offset="1" style="stop-color:#00294B"></stop> </radialGradient> <path fill="url(#SVGID_1_)" d="M211.401,86.369c-0.49-0.029-0.978-0.046-1.46-0.046c-6.745-0.008-12.854,2.863-18.176,8.556 c-4.84,5.171-6.467,9.336-6.451,14.361c0.008,2.688,0.485,5.625,1.191,9.097c1.328,6.526,5.201,12.824,10.629,17.285 c4.153,3.412,8.786,5.158,13.67,5.19c2.529,0.016,5.125-0.426,7.759-1.334c8.499-2.933,16.631-11.332,19.771-20.423 c0.994-2.876,1.477-5.678,1.469-8.342c-0.025-6.513-3.002-12.221-8.685-16.302C224.22,89.456,217.588,86.752,211.401,86.369z"></path> <g> <path fill="#FFFFFF" d="M201.699,113.656h-1.869l-0.003,0.054c-0.016,0.364-0.231,3.542-3.076,3.542 c-2.542,0-3.833-2.278-3.835-6.771c0.002-4.492,1.293-6.771,3.835-6.771c2.893,0,3.068,3.396,3.076,3.542l0.003,0.054h1.869 c0.172,0,0.339-0.069,0.46-0.193c0.116-0.119,0.175-0.272,0.167-0.432c-0.038-0.881-0.49-5.279-5.6-5.279 c-4.129,0-6.312,3.139-6.312,9.075c0,5.947,2.182,9.094,6.312,9.094c4.916,0,5.527-4.017,5.6-5.247 c0.011-0.17-0.046-0.335-0.164-0.458C202.041,113.726,201.872,113.656,201.699,113.656z"></path> <path fill="#62C4DD" d="M230.739,109.397L230.739,109.397l-1.607-0.7c-1.549-0.679-2.096-1.341-2.096-2.529 c0-1.549,1.131-2.588,2.816-2.588c0.997,0,1.813,0.204,2.813,1.22l0.054,0.057l0.859-0.786c0.499-0.461,0.353-0.879,0.146-1.146 c-0.838-0.988-2.182-1.529-3.79-1.529c-3.097,0-5.347,2.02-5.347,4.805c0,2.737,1.725,3.882,3.588,4.712l1.643,0.732 c1.652,0.74,2.438,1.371,2.438,2.96c0,2.166-1.958,2.745-3.114,2.745c-0.994,0-2.104-0.213-3.464-1.754l-0.054-0.062l-0.895,0.786 c-0.461,0.404-0.463,0.752-0.016,1.328c1.23,1.584,3.038,1.915,4.336,1.915c2.807,0,5.652-1.724,5.652-5.021 C234.702,111.687,233.118,110.421,230.739,109.397z"></path> <path fill="#62C4DD" d="M214.866,106.59c0-2.804-2.274-5.18-5.078-5.18c-1.32,0-2.521,0.504-3.424,1.328v-0.964h-1.688 c-0.509,0-0.703,0.331-0.703,0.714v16.366c0,0.46,0.28,0.705,0.695,0.705h1.689v-12.87c0-1.691,1.371-3.063,3.063-3.063 s3.063,1.371,3.063,3.063v12.873h1.678c0.466,0,0.706-0.259,0.706-0.703C214.866,118.86,214.866,106.607,214.866,106.59z"></path> <path fill="#FFFFFF" d="M224.554,102.634c0.089-0.111,0.143-0.248,0.143-0.399c0-0.282-0.183-0.517-0.437-0.604 c-0.487-0.164-1.01-0.253-1.551-0.253c-1.32,0-2.521,0.504-3.424,1.328v-0.964h-1.689c-0.509,0-0.703,0.331-0.703,0.714v16.363 c0,0.46,0.283,0.705,0.698,0.705h1.688v-12.869c0-1.692,1.371-3.063,3.063-3.063c0.442,0,0.862,0.098,1.242,0.265l0.975-1.226 L224.554,102.634z"></path> </g> </g> </svg> </td> <td style="padding-left: 10px;"> <b>Liza Belos</b><br> <b>Laboratoire d'Informatique de l'École Polytechnique</b><br> <br> <b>Mail LIX : </b><a href="mailto:[email protected]" class="moz-txt-link-freetext">[email protected]</a><br> <b>Mail CNRS : </b><a href="mailto:[email protected]" class="moz-txt-link-freetext">[email protected]</a><br> <b>Téléphone : </b>06 86 43 86 39<br> <b>Bureau : </b>1013 </td> </tr> </tbody> </table> </div> </body> <lt-container></lt-container> </html> --------------A0hgRpdyNfSe75MMdFa0H1RX-- --===============3732139039752476008== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KVGV4bWFjcy1k ZXYgbWFpbGluZyBsaXN0ClRleG1hY3MtZGV2QGdudS5vcmcKaHR0cHM6Ly9saXN0cy5nbnUub3Jn L21haWxtYW4vbGlzdGluZm8vdGV4bWFjcy1kZXYK --===============3732139039752476008==--