ibm-s390-linux / s390-tools

Tools for use with the s390 Linux kernel and device drivers
MIT License
62 stars 58 forks source link

conflicting types for ‘__vector128’ when building on ppc64le #151

Closed sharkcz closed 1 year ago

sharkcz commented 1 year ago

When trying the new multi-arch builds on Fedora 36 on ppc64le I am getting a conflict for the __vector128 type.

[dan@talos s390-tools]$ make                                                                                                                                                           :master
  CC       libpv/cert.o
  CC       libpv/common.o
  CC       libpv/crypto.o
  CC       libpv/curl.o
  CC       libpv/glib-helper.o
  CC       libpv/hash.o
  AR       libpv/libpv.a
  CC       pvattest/src/pvattest.o
  CC       pvattest/src/arcb.o
  CC       pvattest/src/argparse.o
  CC       pvattest/src/attestation.o
In file included from ../../include/libpv/se-hdr.h:16,
                 from attestation.c:14:
../../include/boot/s390.h:406:3: error: conflicting types for ‘__vector128’; have ‘struct <anonymous>’
  406 | } __vector128;
      |   ^~~~~~~~~~~
In file included from /usr/include/linux/types.h:5,
                 from /usr/include/asm/ptrace.h:28,
                 from /usr/include/asm/sigcontext.h:12,
                 from /usr/include/bits/sigcontext.h:30,
                 from /usr/include/signal.h:301,
                 from /usr/include/glib-2.0/glib/gbacktrace.h:36,
                 from /usr/include/glib-2.0/glib.h:34,
                 from ../../include/libpv/glib-helper.h:27,
                 from ../../include/libpv/common.h:16,
                 from ../../include/libpv/cert.h:15,
                 from attestation.c:12:
/usr/include/asm/types.h:36:32: note: previous declaration of ‘__vector128’ with type ‘__vector128’
   36 | } __attribute__((aligned(16))) __vector128;
      |                                ^~~~~~~~~~~
make[2]: *** [../../common.mak:343: attestation.o] Chyba 1
make[1]: *** [Makefile:17: all-recursive] Chyba 1
make: *** [Makefile:55: pvattest] Chyba 2
hoeppnerj commented 1 year ago

Related discussion: https://github.com/ibm-s390-linux/s390-tools/discussions/150

hoeppnerj commented 1 year ago

@sharkcz We've reorganized the header files a little and got rid of some unnecessary users. Please let us know if this fixes the build issues for you.

sharkcz commented 1 year ago

Thanks, the split headers fix the build for me on ppc64le.

But I suspect the last commit (de013d2f04b32b3b456877ad44a7158be695437b) is wrong (aka missing dependencies or similar). Running make does nothing. Shouldn't the TOOLS_DIR variable be kept defined?

steffen-eiden commented 1 year ago

thanks for verifying.

Something went wrong during rebasing TOOLS_DIR should be defined, thanks.

I will fix this.

steffen-eiden commented 1 year ago

Something went wrong during rebasing TOOLS_DIR should be defined, thanks.

I will fix this.

fixed

sharkcz commented 1 year ago

Something went wrong during rebasing TOOLS_DIR should be defined, thanks. I will fix this.

fixed

correct, all is good now :-)