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 list
    Texmacs-dev@gnu.org
    https://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
_______________________________________________
Texmacs-dev mailing list
Texmacs-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/texmacs-dev

Reply via email to