Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    Unsolved Problème installation Qt4.7 sur distribution Linux Buster

    French
    2
    8
    396
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      PatMooc last edited by

      Bonjour,

      Je travaille actuellement sur un projet créé avec QT4.7 sous une distribution Linux Lenny.
      Je suis confronté à un problème de communication avec un périphérique en usb (protocole hid).
      J'ai donc créé un projet de test sous Qt5.11 sur une distribution Linux Buster. La communication est opérationnelle.
      Avant de ma lancer dans la migration de tout le projet sur Qt5 (ou Qt6), j'ai tenté d'installer Qt4.7 sur la distribution Linux Buster, mais je suis confronté à un problème de compilation de cette version de Qt.

      J'ai téléchargé Qt4.7 depuis cette source : https://download.qt.io/archive/qt/4.7/
      Ma version de Qt4 est 4.7.4 (avec QtCreator 2.2.0) => qt-everywhere-opensource-src-4.7.4.tar.gz

      J'ai ensuite suivi les étapes mentionnées ici : https://doc.qt.io/archives/qt-4.7/qt-embedded-install.html

      L'étape de configuration est ok (./configure)
      L'étape de build plante à la fin visiblement avec les messages d'erreurs suivants :


      In file included from ../../include/QtCore/qmap.h:1,
      from ../../include/QtCore/../../src/corelib/kernel/qvariant.h:49,
      from ../../include/QtCore/qvariant.h:1,
      from global/qt_pch.h:60:

      ../../include/QtCore/../../src/corelib/tools/qmap.h: In instantiation of ‘T& QMap<Key, T>::operator[](const Key&) [with Key = int; T = inotify_event]’:
      io/qfilesystemwatcher_inotify.cpp:364:33: required from here
      ../../include/QtCore/../../src/corelib/tools/qmap.h:531:45: error: value-initialization of incomplete type ‘char []’
      node = node_create(d, update, akey, T());

      In file included from /usr/include/features.h:424,
      from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
      from /usr/include/string.h:26,
      from ../../include/QtCore/../../src/corelib/tools/qbytearray.h:48,
      from ../../include/QtCore/qbytearray.h:1,
      from ../../include/QtCore/../../src/corelib/tools/qstring.h:46,
      from ../../include/QtCore/qstring.h:1,
      from ../../include/QtCore/../../src/corelib/kernel/qobject.h:48,
      from ../../include/QtCore/qobject.h:1,
      from ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:45,
      from ../../include/QtCore/qcoreapplication.h:1,
      from global/qt_pch.h:58:

      ../../include/QtCore/../../src/corelib/tools/qmap.h: In instantiation of ‘struct QMapNode<int, inotify_event>’:
      ../../include/QtCore/../../src/corelib/tools/qmap.h:532:28: required from ‘T& QMap<Key, T>::operator[](const Key&) [with Key = int; T = inotify_event]’
      io/qfilesystemwatcher_inotify.cpp:364:33: required from here

      /usr/include/x86_64-linux-gnu/sys/inotify.h:34:13: error: flexible array member ‘inotify_event::name’ not at end of ‘struct QMapNode<int, inotify_event>’
      char name __flexarr; /* Name. */



      make[1]: *** [Makefile:16430: .obj/release-shared/qfilesystemwatcher_inotify.o] Error 1
      make[1] : on quitte le répertoire « /home/patrick/qt4/qt-everywhere-opensource-src-4.7.4/src/corelib »
      make: *** [Makefile:206: sub-corelib-make_default-ordered] Error 2


      Le problème semble venir du fichier "qfilesystemwatcher_inotify.cpp:364:33"

      Y a-t-il une solution pour pouvoir installer Qt4.7 dans la distribution Linux Buster ?

      Merci d'avance pour votre support.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Bonsoir,

        Le plus simple serait d'utiliser Qt 4 fournit avec Buster. Cette version sera à jour.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • P
          PatMooc last edited by

          Bonsoir,

          Merci pour votre réponse.

          J'ai installé Buster dans une VM qui tourne sur mon Window 8.1, tout comme j'avais Lenny dans une autre VM. Mais il n'y a aucun Qt fourni avec Buster lors de l'installation. J'ai dû installer Qt par la suite et j'avais opté pour Qt5 à ce moment-là (c'était en octobre dernier).

          Ai-je raté quelque chose ?

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Ce sont des packages à installer en utilisant apt. Il faut installer les packages de développement correspondant.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 0
            • P
              PatMooc last edited by

              Bonjour,

              En effet, je devais être fatigué hier ... J'ai donc fait le nécessaire pour qt4, par contre si j'installe QtCreator via apt, c'est celui pour Qt5 qui est installé, je n'arrive pas à installer celui correspondant à Qt4

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                Qt Creator supporte Qt 4 et 5. La version de Qt utilisée pour le compiler n'a rien à voir avec la version utilisé pour le développement d'applications/libraries.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply Reply Quote 0
                • P
                  PatMooc last edited by

                  Ok. J'ai essayé de compiler le projet avec QtCreator5 (celui qui a été installé) et cela ne fonctionne pas.
                  Par exemple l'instruction ''#include <QMainWindow> n'est plus reconnue.

                  1 Reply Last reply Reply Quote 0
                  • SGaist
                    SGaist Lifetime Qt Champion last edited by

                    Les widgets ont leur propre module dans Qt 5: QT += widgets dans le fichier .pro et ce sera bon.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post