Menu ▾ ▴

#392 Build fails with AppleClang 17.0.0.17000013

open
nobody
None
5
5 days ago
2026-10-30
Anonymous
No

When using Homebrew qwt 6.3.0 with AppleClang 17.0.0.17000013 the build of my application fails because of:

In file included from /Users/runner/work/smuview/smuview/smuview/build/smuview_autogen/mocs_compilation.cpp:50:
In file included from /Users/runner/work/smuview/smuview/smuview/build/smuview_autogen/WELU3YYAF5/moc_doubleknob.cpp:9:
In file included from /Users/runner/work/smuview/smuview/smuview/build/smuview_autogen/WELU3YYAF5/../../../src/ui/datatypes/doubleknob.hpp:26:
/opt/homebrew/opt/qwt/lib/qwt.framework/Headers/qwt_knob.h:46:5: error: macro 'Q_ENUMS' has been marked as deprecated: Use Q_ENUM instead. [-Werror,-Wdeprecated-pragma]
   46 |     Q_ENUMS ( KnobStyle MarkerStyle )
      |     ^
/opt/homebrew/lib/QtCore.framework/Headers/qtmetamacros.h:69:1: note: macro marked 'deprecated' here
   69 | QT_DEPRECATED_MACRO_6_12(Q_ENUMS, "Use Q_ENUM instead.")
      | ^
/opt/homebrew/lib/QtCore.framework/Headers/qtdeprecationmarkers.h:248:48: note: expanded from macro 'QT_DEPRECATED_MACRO_6_12'
  248 | # define QT_DEPRECATED_MACRO_6_12(macro, text) QT_DEPRECATED_MACRO(macro, text)
      |                                                ^
/opt/homebrew/lib/QtCore.framework/Headers/qtdeprecationmarkers.h:38:44: note: expanded from macro 'QT_DEPRECATED_MACRO'
   38 | #  define QT_DEPRECATED_MACRO(macro, text) Q_DECL_DEPRECATED_MACRO(macro, text)
      |                                            ^
/opt/homebrew/lib/QtCore.framework/Headers/qcompilerdetection.h:1025:48: note: expanded from macro 'Q_DECL_DEPRECATED_MACRO'
 1025 | #  define Q_DECL_DEPRECATED_MACRO(macro, text) QT_DO_PRAGMA(clang deprecated(macro, text))
      |                                                ^
/opt/homebrew/lib/QtCore.framework/Headers/qcompilerdetection.h:1223:49: note: expanded from macro 'QT_DO_PRAGMA'
 1223 | #define QT_DO_PRAGMA(text)                      _Pragma(#text)
      |                                                 ^
<scratch space>:3:49: note: expanded from here
    3 |  clang deprecated(Q_ENUMS, "Use Q_ENUM instead.")
      |  

I've prepared a patch at https://github.com/knarfS/qwt/tree/q_enum. Disclaimer: No AI was involved in writing this patch.

Discussion

  • Uwe Rathmann

    Uwe Rathmann - 6 days ago

    Qwt 6.3 supports all versions >= Qt 4.8. Changing Q_ENUMS to Q_ENUM would break older versions ( < Qt 5.5 ). However I'm currently working on Qwt 6.4 ( develop branch ) that will drop all versions < Qt 5.6.

    The plan for Qwt 6.4 is to offer a version with only small API changes that runs without any warnings for recent Qt6 releases. I replaced Q_ENUMS in this branch - but note that there will be more adjustments to come.

     
  • Anonymous

    Anonymous - 5 days ago

    Hi Uwe,

    thanks for your response!

    I temporarily added "-Wno-deprecated-pragma" to the compile options for AppleClang.

    Looking forward to the 6.4 release :)

    Thanks,
    Frank

     

Anonymous
Anonymous

Add attachments
Cancel