Skip to content

Missing generated wrappers for RHEL 9 CI tasks #291

Closed

Description

@mrbean-bremen

The wrapper generation in CI tasks for oldschool builds (RHEL9) fails:

 Trying to determine Qt version...
Determined Qt version is 5.15.9
Parsing typesystem file [:/trolltech/generator/build_all.txt]
/usr/include/qt5ln/include/QtCore/qconfig.h:19: #error: #error "unexpected value for __WORDSIZE macro"
PreProcessing - Generate [.preprocessed.tmp] using [:/trolltech/generator/qtscript_masterinclude.h] and include-paths []
/usr/include/qt5ln/include/QtCore/qsystemdetection.h:184: #error: #error "Qt has not been ported to this OS - see http://www.qt-project.org/"
/usr/include/qt5ln/include/QtCore/qcompilerdetection.h:504: #error: #error "Qt has not been tested with this compiler - see http://www.qt-project.org/"
/usr/include/qt5ln/include/QtCore/qcompilerdetection.h:590: #error: #error Qt requires a C++11 compiler and yours does not seem to be that.
/usr/include/qt5ln/include/QtCore/qbasicatomic.h:61: #error: #error "Qt requires C++11 support"
/usr/include/qt5ln/include/QtCore/qglobalstatic.h:60: syntax error: failed to evaluate #if condition, division/modulo by zero
Building model using [.preprocessed.tmp]
Classes in typesystem: 0
Generated:
  - header....: 0 (0)
  - impl......: 0 (0)
  - modules...: 0 (0)
  - pri.......: 0 (0)

This has not been noticed before because it currently does not generate a CI failure.

Activity

  1. hjmjohnson commented on Sep 29, 2025

    @hjmjohnson
    Contributor

    This may be addressed with the work done in #313.

  2. jcfr commented on Sep 29, 2025

    @jcfr
    Contributor

    After inspecting the output of the associated job1, it looks like the problem still persists:

    # workaround to allow to find the Qt include dirs for installed standard qt packages
    mkdir /usr/include/qt5ln; ln -s /usr/include/qt5 /usr/include/qt5ln/include
    export QTDIR=/usr/include/qt5ln
    cd generator
    ./pythonqt_generator
    
    [...]
    Generated:
      - header....: 0 (0)
      - impl......: 0 (0)
      - modules...: 0 (0)
      - pri.......: 0 (0)
    

    Footnotes

    1. https://github.com/MeVisLab/pythonqt/actions/runs/18106650418/job/51522795026?pr=313#step:6:22 ↩

  3. mrbean-bremen commented on Sep 29, 2025

    @mrbean-bremen
    ContributorAuthor

    Yes. I had a look at this some time ago, and the problem is that for some reason some features (like QT_FEATURE_thread) are not defined in qtscript_masterinclude.h, and the QT_CONFIG macro than barks on the feature by causing a division by zero (it does this intentionally to ensure that the features are defined). Something goes wrong during configuration.

    I experimentally added a workaround, basically defining QT_BOOTSTRAPPED and redefining QT_CONFIG, which worked to a point, but it generated less wrappers than expected because some features were not defined (as to be expected).

    I didn't dig further into this so far, though.

  4. added a commit that references this issue on Sep 30, 2025
    ce9f365
  5. jcfr commented on Sep 30, 2025

    @jcfr
    Contributor

    I didn't dig further into this so far, though.

    Et voila. This should now be fixed 🚀

    Image
  6. mrbean-bremen commented on Sep 30, 2025

    @mrbean-bremen
    ContributorAuthor

    Et voila. This should now be fixed 🚀

    Excellent, merci!

    So /usr/include was missing, I hadn't seen this...

  7. jcfr commented on Sep 30, 2025

    @jcfr
    Contributor

    So /usr/include was missing, I hadn't seen this...

    Technically, we could have addressed this by defining __WORDSIZE to 64 in generator/qtscript_masterinclude.h1 so that qconfig-multilib.h2 ends up including QtCore/qconfig-64.h . That said, I considered this as a hack specific to the packaging of Qt on Rocky Linux.

    Instead, I opted to implement two changes ...

    1. Addition of __x86_64__ in commit fix(generator): Define __x86_64__ to support Qt SDK on multi-lib distribution (only if Q_PROCESSOR_X86_64 is itself defined)
    2. Specifying --include-paths=/usr/include in the follow-up commit to ensure that header bits/wordsize.h included in qconfig-multilib.h2 is found on Rocky Linux and can define __WORDSIZE by checking if __x86_64__ is itself defined.

    Footnotes

    1. https://github.com/MeVisLab/pythonqt/blob/master/generator/qtscript_masterinclude.h ↩

    2. https://git.rockylinux.org/staging/rpms/qt5-qtbase/-/blob/r8/SOURCES/qconfig-multilib.h ↩ ↩2

  8. jcfr commented on Sep 30, 2025

    @jcfr
    Contributor

    In the future, we could look into (optionally) forwarding -D defines associated with the host system (or target in the context of cross compilation) so that we address most (if not all #error) current reported by the preprocessor.

  9. added a commit that references this issue on Sep 30, 2025
    4b8c2ea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions