Skip to content

Build failure: hostinfo.h: error: unknown type name 'X86Features'; did you mean 'X86Feature'? #2754

@barracuda156

Description

@barracuda156

Build fails on powerpc:

[ 59%] Building C object CMakeFiles/c3c.dir/src/compiler/sema_asm.c.o
/opt/local/bin/ccache /opt/local/bin/gcc-mp-14 -DCURL_FOUND=1 -DLLVM_AVAILABLE=0 -DTB_AVAILABLE=0 -I/opt/local/var/macports/build/c3c-7b939bf2/work/c3c-0.7.8/src -I/opt/local/var/macports/build/c3c-7b939bf2/work/build -I/opt/local/include -I/opt/local/var/macports/build/c3c-7b939bf2/work/c3c-0.7.8/dependencies/miniz -pipe -Os -DNDEBUG -I/opt/local/include -std=gnu11 -arch ppc -mmacosx-version-min=10.6 -gdwarf-3 -fno-exceptions -pthread -Wall -Werror -Wno-unknown-pragmas -Wno-unused-result -Wno-unused-function -Wno-unused-variable -Wno-unused-parameter -MD -MT CMakeFiles/c3c.dir/src/compiler/sema_asm.c.o -MF CMakeFiles/c3c.dir/src/compiler/sema_asm.c.o.d -o CMakeFiles/c3c.dir/src/compiler/sema_asm.c.o -c /opt/local/var/macports/build/c3c-7b939bf2/work/c3c-0.7.8/src/compiler/sema_asm.c
In file included from /opt/local/var/macports/build/c3c-7b939bf2/work/c3c-0.7.8/src/compiler/target.c:10:
/opt/local/var/macports/build/c3c-7b939bf2/work/c3c-0.7.8/src/utils/hostinfo.h:4:28: error: unknown type name 'X86Features'; did you mean 'X86Feature'?
    4 | void hostinfo_x86_features(X86Features *cpu_features);
      |                            ^~~~~~~~~~~
      |                            X86Feature
/opt/local/var/macports/build/c3c-7b939bf2/work/c3c-0.7.8/src/compiler/target.c: In function 'x86_features_from_host':
/opt/local/var/macports/build/c3c-7b939bf2/work/c3c-0.7.8/src/compiler/target.c:969:9: error: implicit declaration of function 'hostinfo_x86_features' [-Wimplicit-function-declaration]
  969 |         hostinfo_x86_features(cpu_features);
      |         ^~~~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/c3c.dir/src/compiler/target.c.o] Error 1

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