shiboken6: constexpr variable must be initialized by a constant expression

I am trying to build some python wrappers using shiboken6 and Pyside6. I have managed to get the code compiling on a single machine, but now that I migrated the code to a build server, I am getting a compile error from within the shiboken compiler:

QtCore/qplugin.h(146,33): error G3F63BFAE: constexpr variable ‘HeaderOffset’ must be initialized by a constant expression

This code seems to work perfectly fine on the reference machine, but I do not know in what way the setup differs. I installed a conda environment from the .yml file generated on the working machine to the new machine:

channels:
  - defaults
dependencies:
   ... // omitted most packages for brevity
  - pip=24.0=py312haa95532_0
  - pybind11-abi=5=hd3eb1b0_0
  - python=3.12.4=h14ffc60_1
  ... // omitted most packages for brevity
  - pip:
      - pyside6==6.7.2
      - shiboken6==6.7.2
      - shiboken6-generator==6.7.2

I am passing the following options to shiboken:

C:/ProgramData/Miniconda3/envs/myenv/Lib/site-packages/shiboken6_generator/shiboken6.exe 
--generator-set=shiboken 
--compiler=msvc
--enable-parent-ctor-heuristic
--enable-return-value-heuristic
--use-isnull-as-nb_nonzero
--enable-pyside-extensions
--avoid-protected-hack
--debug-level=full
--output-directory=build/x64/Release/
-TD:/myrepo/myproject/src/core/python_core/
-TC:/ProgramData/Miniconda3/envs/myenv/Lib/site-packages/PySide6/typesystems
-ID:/myrepo/myproject/src/core/python_core/
-IC:/ProgramData/Miniconda3/envs/myenv/Lib/site-packages/shiboken6_generator/include
-IC:/ProgramData/Miniconda3/envs/myenv/Lib/site-packages/PySide6/include
-IC:/ProgramData/Miniconda3/envs/myenv/include
-IC:/ProgramData/Miniconda3/envs/myenv/Lib/site-packages/PySide6/include/QtCore 
-IC:/ProgramData/Miniconda3/envs/myenv/Lib/site-packages/numpy/core/include 
-IC:/Qt/6.7.2/msvc2019_64/include/QtXml 
-IC:/Qt/6.7.2/msvc2019_64/include/QtGui 
-IC:/Qt/6.7.2/msvc2019_64/include/QtCore
-IC:/Qt/6.7.2/msvc2019_64/include/QtQml
-IC:/Qt/6.7.2/msvc2019_64/include 
bindings.h 
bindings.xml

Which should be fairly standard. I am not sure what causes the problem, as the definition of offsetof is identical between the two machines:

#if defined _MSC_VER && !defined _CRT_USE_BUILTIN_OFFSETOF
    #ifdef __cplusplus
        #define offsetof(s,m) ((::size_t)&reinterpret_cast<char const volatile&>((((s*)0)->m)))
    #else
        #define offsetof(s,m) ((size_t)&(((s*)0)->m))
    #endif
#else
    #define offsetof(s,m) __builtin_offsetof(s,m)
#endif

It confuses me that I find questions related to reinterpret_cast not being part of a valid constexpr (see this other stackoverflow post). Which would mean that no matter what this should not compile. One machine does, however and the other does not.

Note that the --compiler option was only added as an attempt to fix the issue and changes the error. When nothing is provided or when the option msvc is passed, I get the error above. Passing the value --compiler=clang results in the even more cryptic error

C1083 Cannot open source file ‘c++’.

I am using Visual Studio 2019 (version 16.11.35) to compile the resulting python wrapper code and Qt 6.7.2 on both setups.

The only related issue I could find is this one from an ITK mailing list from 2017:
https://itk.org/pipermail/community/2017-May/013075.html
quote: “it is a known bug in VS2017”

Does anyone have an idea what the problem could be? Is this a bug in qplugin.h? Or am I missing a configuration that happens to be present on one machine, but is not on the other? Is this a problem with MSVC?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật