silx-kit / hdf5plugin

Set of compression filters for h5py
http://www.silx.org/doc/hdf5plugin/latest/
Other
66 stars 25 forks source link

Fixed `c-blosc2` compilation issue on `ppc64le` #321

Closed t20100 closed 3 months ago

t20100 commented 3 months ago

For c-blosc2 on P9, this PR only enables the altivec code and disables all the others.

Otherwise, there is a compilation error:

src/c-blosc2/blosc/shuffle.c: In function ‘blosc_get_cpu_features’:
src/c-blosc2/blosc/shuffle.c:272:29: error: ‘HWCAP_ARM_NEON’ undeclared (first use in this function)
  272 |   if (getauxval(AT_HWCAP) & HWCAP_ARM_NEON) {
      |                             ^~~~~~~~~~~~~~
src/c-blosc2/blosc/shuffle.c:272:29: note: each undeclared identifier is reported only once for each function it appears in
error: command '/usr/bin/powerpc64le-linux-gnu-gcc' failed with exit code 1

The error was due to trying to compile arm code on P9. This code is now explicitly disabled by changing the defined C macros.