Skip to content

Building with clang fails due to 'const' attribute on function returning 'void' for version 9.5 #202

Open
@FragmentedCurve

Description

@FragmentedCurve

When compiling libj version 9.5 with clang using the command CC=clang ./build_libj.sh, yields the following errors:

In file included from ../../../../jsrc/viavx5.c:6:
In file included from ../../../../jsrc/j.h:229:
../../../../jsrc/../sleef/include/sleefquad.h:259:31: error: 'const' attribute on function returning 'void'; attribute ignored [-Werror,-Wignored-attributes]
  259 | SLEEF_IMPORT SLEEF_CONST void Sleef_storeq2_sse2(Sleef_quad *, Sleef_quadx2);
      |                               ^
../../../../jsrc/../sleef/include/sleefquad.h:328:31: error: 'const' attribute on function returning 'void'; attribute ignored [-Werror,-Wignored-attributes]
  328 | SLEEF_IMPORT SLEEF_CONST void Sleef_storeq2_avx2128(Sleef_quad *, Sleef_quadx2);
      |                               ^
../../../../jsrc/../sleef/include/sleefquad.h:397:31: error: 'const' attribute on function returning 'void'; attribute ignored [-Werror,-Wignored-attributes]

I've truncated the output. To build successfully, I have to run CC=clang CFLAGS=" -Wno-ignored-attributes" ./build_libj.sh.

This bug does not exist in the master branch, only 9.5.

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