Skip to content

Durin does not build on CentOS 7 / x86_64 #20

@jcbollinger

Description

@jcbollinger

I attempted to build Durin on 64-bit CentOS 7, using the HDF5 provided by that distribution. I expected that I would get a link error if the platform HDF5 had not been built with appropriate switches, but the build did not make it to that point.

Following the build instructions, I

  1. downloaded the 2019v1 source tarball from GitHub,
  2. unpacked the tarball and changed to the resulting directory, and
  3. executed make.

Here is the full make output:

mkdir -p ./build
h5cc -Wall -g -O2 -fpic -I./src -I./bslz4/src -std=c89 -c src/plugin.c -o build/plugin.o
mkdir -p ./build
h5cc -Wall -g -O2 -fpic -I./src -I./bslz4/src -std=c89 -c src/file.c -o build/file.o
src/file.c: In function ‘get_frame_from_chunk’:
src/file.c:207:2: warning: implicit declaration of function ‘H5Dget_chunk_storage_size’ [-Wimplicit-function-declaration]
  if (H5Dget_chunk_storage_size(d_id, c_offset, &c_bytes) < 0) {
  ^
src/file.c:230:2: warning: implicit declaration of function ‘H5DOread_chunk’ [-Wimplicit-function-declaration]
  if (H5DOread_chunk(d_id, H5P_DEFAULT, c_offset, &c_filter_mask, c_buffer) < 0) {
  ^
mkdir -p ./build
h5cc -Wall -g -O2 -fpic -I./src -I./bslz4/src -std=c89 -c src/err.c -o build/err.o
mkdir -p ./build
h5cc -Wall -g -O2 -fpic -I./src -I./bslz4/src -std=c89 -c src/filters.c -o build/filters.o
In file included from ./bslz4/src/bitshuffle.h:32:0,
                 from src/filters.c:9:
./bslz4/src/bitshuffle_core.h:41:31: error: conflicting types for ‘int64_t’
   typedef long long           int64_t;
                               ^
In file included from /usr/include/stdlib.h:314:0,
                 from ./bslz4/src/bitshuffle.h:31,
                 from src/filters.c:9:
/usr/include/sys/types.h:197:1: note: previous declaration of ‘int64_t’ was here
 __intN_t (64, __DI__);
 ^
make: *** [build/filters.o] Error 1

This arises from the Bitshuffle sources making some incorrect assumptions and taking unsafe liberties with reserved identifiers, but the issue can be sidestepped in Durin's top-level Makefile by changing the CFLAGS to specify -std=c99 instead of -std=c89. On distributions that provide more recent compilers, it would likely be sufficient to just remove the -std=c89 option altogether.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions