My laptop not so fast to compile texmacs) With QT_SELECT=qt5 CXXFLAGS=-fPIC LDFLAGS=-fPIC ./configure --with-qt-find-method=pkgconfig it fails at final linking:
cd src; make -r -f makefile link=shared make[1]: Entering directory 'texmacs/src' g++ Objects/texmacs.o Objects/tm_ostream.o Objects/fast_alloc.o Objects/tree.o Objects/ANSIFontWriter.o Objects/AbstractContentContext.o Objects/AbstractWrittenFont.o Objects/ArrayOfInputStreamsStream.o Objects/Ascii7Encoding.o Objects/CFFANSIFontWriter.o Objects/CFFDescendentFontWriter.o ................................... many lines skipped .................. Objects/virtual_font.o Objects/vpenalty.o Objects/web_files.o Objects/wencoding.o Objects/widget.o Objects/xml.o Objects/fakedlopen.o Objects/aeskey.o Objects/aescrypt.o Objects/aestab.o Objects/aes_modes.o Objects/aes_ni.o -Ltexmacs/TeXmacs/lib -lm -Wl,-rpath, -lQt5Svg -lQt5PrintSupport -lQt5Widgets -lQt5Gui -lQt5Core -Wall -Wno-return-type -O3 -fexpensive-optimizations -fPIC -fPIC -L/usr/local/guile-1.8.7/lib -L/usr/lib -Wl,-rpath,/usr/lib/x86_64-linux-gnu -Wl,-Bdynamic -lz -lpng -lQt5Svg -lQt5PrintSupport -lQt5Widgets -lQt5Gui -lQt5Core -lfreetype -lguile -lgmp -lcrypt -lm -lltdl -o Objects/texmacs-shared.bin /usr/bin/ld: Objects/unix_sys_utils.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status makefile:440: recipe for target 'Objects/texmacs-shared.bin' failed make[1]: *** [Objects/texmacs-shared.bin] Error 1 make[1]: Leaving directory 'texmacs/src' Makefile:57: recipe for target 'TEXMACS' failed make: *** [TEXMACS] Error 2 So far the only way I can make texmacs - adjust src/makefile by hand On Mon, Oct 14, 2024 at 5:38 PM Liza Belos <be...@lix.polytechnique.fr> wrote: > 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 <be...@lix.polytechnique.fr> > 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 >> listTexmacs-dev@gnu.orghttps://lists.gnu.org/mailman/listinfo/texmacs-dev >> >> -- >> >> *Liza Belos* >> *Laboratoire d'Informatique de l'École Polytechnique* >> >> *Mail LIX : *be...@lix.polytechnique.fr >> *Mail CNRS : *liza.be...@cnrs.fr >> *Téléphone : *06 86 43 86 39 >> *Bureau : *1013 >> > > > -- > -- > Dmitry > > -- > *Liza Belos* > *Laboratoire d'Informatique de l'École Polytechnique* > > *Mail LIX : *be...@lix.polytechnique.fr > *Mail CNRS : *liza.be...@cnrs.fr > *Téléphone : *06 86 43 86 39 > *Bureau : *1013 > -- -- Dmitry
_______________________________________________ Texmacs-dev mailing list Texmacs-dev@gnu.org https://lists.gnu.org/mailman/listinfo/texmacs-dev