Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#56977 closed defect (fixed)

hdf5 +gcc8 build failure in H5detect.c

Reported by: mf2k (Frank Schima) Owned by: mamoll (Mark Moll)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: Dave-Allured (Dave Allured)
Port: hdf5

Description

I'm seeing the following build failure with hdf5 +gcc8:

:info:build H5detect.c:1575:1: error: expected end of line before 'ignored'
:info:build      DETECT_I(unsigned long long,  ULLONG,       d_g[nd_g]); nd_g++;
:info:build  ^   ~~
:info:build H5detect.c:1575:1: error: expected end of line before 'pop'
:info:build H5detect.c:1602:1: error: attributes should be specified before the declarator in a function definition
:info:build  static void
:info:build  ^~~~~~
:info:build H5detect.c:1628:1: error: attributes should be specified before the declarator in a function definition
:info:build  static void
:info:build  ^~~~~~
:info:build H5detect.c:1640:55: error: expected end of line before 'push'
:info:build      DETECT_F(long double,      LDOUBLE,      d_g[nd_g]); nd_g++;
:info:build                                                        ^
:info:build H5detect.c:1640:1: error: expected end of line before 'ignored'
:info:build      DETECT_F(long double,      LDOUBLE,      d_g[nd_g]); nd_g++;
:info:build  ^   ~~
:info:build H5detect.c:1640:1: error: expected end of line before 'pop'
:info:build H5detect.c:1640:1: error: expected end of line before 'push'
:info:build H5detect.c:1640:1: error: expected end of line before 'ignored'
:info:build H5detect.c:1640:1: error: expected end of line before 'pop'
:info:build H5detect.c:1659:1: error: attributes should be specified before the declarator in a function definition
:info:build  static void
:info:build  ^~~~~~
:info:build H5detect.c:1747:1: error: attributes should be specified before the declarator in a function definition
:info:build  int
:info:build  ^~~

Attachments (1)

main.log (215.2 KB) - added by mf2k (Frank Schima) 6 years ago.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by mf2k (Frank Schima)

Attachment: main.log added

comment:1 Changed 6 years ago by Dave-Allured (Dave Allured)

Cc: Dave-Allured added

comment:2 Changed 6 years ago by Dave-Allured (Dave Allured)

This issue with gcc8 was reported to HDF Group about 3 months ago. This thread on HDF community forum shows the issue and suggests code patches for H5detect.c.

https://forum.hdfgroup.org/t/1-10-2-h5detect-compile-error-gcc-8-1-0-on-centos-7-2-solved/4441

comment:3 Changed 6 years ago by mamoll (Mark Moll)

Resolution: fixed
Status: assignedclosed

In ab245a11a665f368bc728afc534f7ae35cc3def4/macports-ports (master):

science/hdf5: fix gcc8 compilation error. closes #56977

comment:4 Changed 6 years ago by Dave-Allured (Dave Allured)

Thanks Mark for your quick response.

Also this bug in H5detect.c is fixed in pre-release HDF5 1.10.3-pre1. Bottom line, gcc8 is more pedantic than gcc7 about the position of attributes in function declarations.

https://portal.hdfgroup.org/display/support/Downloads

... However I am not suggesting that this port be updated to the pre-release. Just wait for the official 1.10.3 release, and Mark's patch should be fine in the meantime.

Note: See TracTickets for help on using tickets.