oneapi-src / level-zero

oneAPI Level Zero Specification Headers and Loader
https://spec.oneapi.com/versions/latest/elements/l0/source/index.html
MIT License
218 stars 96 forks source link

"ze_api.h" does not include "stdbool.h" although it uses "bool" #77

Closed eero-t closed 2 years ago

eero-t commented 2 years ago

Compile fails to:

/usr/local/include/level_zero/ze_api.h:7026:5: error: unknown type name 'bool'
 7026 |     bool sRGB;                                      ///< [in] Is sRGB.
      |     ^~~~

ze_api.h does not include stdbool.h although it uses "bool":

$ grep -e '# *include' -e bool include/ze_api.h 
#include <stdint.h>
#include <stddef.h>
typedef uint8_t ze_bool_t;
    ze_bool_t* value                                ///< [out] returned access capability
    ze_bool_t isNormalized;                         ///< [in] Are coordinates normalized [0, 1] or not.
    bool sRGB;                                      ///< [in] Is sRGB.
    ze_bool_t** pvalue;

See: https://en.cppreference.com/w/c/types/boolean

bmyates commented 2 years ago

This was just fixed here: https://github.com/oneapi-src/level-zero/commit/7f42f3c6e9599a9bcd995792e2bc42be27ec05ab

eero-t commented 2 years ago

If application uses a build system checking validity of required headers, like e.g. autoconf does, application cannot work around this bug by including before ze_api.h, the header itself needs to be fixed before configure succeeds.

This bug was introduced in commit a24eb9677b56aea76803539bd59bef925e7c9961, which is included into release v1.6.2, i.e. the latest release is broken (not just some commits outside of releases) => When a fixed L0 version will be released?

bmyates commented 2 years ago

The next release is expected to be posted next week. We are hoping to get some additional changes included that haven't been finalized yet.

eero-t commented 2 years ago

There's now v1.7 tagged version with the fix, so closing this.

bmyates commented 2 years ago

We will be posting a release on the release page later today. Likely tag v1.7.3