https://bugs.kde.org/show_bug.cgi?id=528587

            Bug ID: 528587
           Summary: ECMGenerateExportHeader fails on MacOS/AppleClang with
                    XYZ_EXPORT_DEPRECATED
    Classification: Frameworks and Libraries
           Product: extra-cmake-modules
      Version First 6.31.0
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

First observed in ECM 6.31, but probably introduced in
cd6dea678ccece84d538ed15e156358045760825 .

While trying to build libkleo on MacOS, Apple's clang fails on the following
line in src/utils/formating.h:
  KLEO_DEPRECATED_EXPORT QString complianceMode();
This expands to:
  __attribute__((visibility(default))) [[deprecated]] QString complianceMode();
And leads to the error message:
  src/utils/formatting.h:260:1: error: 'deprecated' attribute cannot be applied
to types

Manually changing the offending line to:
  [[deprecated]] __attribute__((visibility(default))) QString complianceMode();
fixes the compile time problem. Patching ECMGenerateExportHeader.cmake to the
same effect seems to work in this setup for libkleo and all dependencies.
However, I do not know whether such inversion of the order to attributes would
be possible / desirable everywhere.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to