Opened 14 months ago

Last modified 14 months ago

#67893 assigned defect

hdf5 needs -D_GLIBCXX_USE_CXX11_ABI=0 (at least on older systems)

Reported by: barracuda156 Owned by: eborisch (Eric A. Borisch)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc: mascguy (Christopher Nielsen), Dave-Allured (Dave Allured)
Port: hdf5

Description

Apparently we somehow lost the needed -D_GLIBCXX_USE_CXX11_ABI=0 flag in HDF5 build, and now other ports fails to link to HDF5 C++ library: https://github.com/ubarsc/kealib/issues/37 Also #67891

Change History (5)

comment:1 Changed 14 months ago by kencu (Ken)

it looks like hdf5 doesn’t build c++ by default…

https://github.com/macports/macports-ports/blob/master/science/hdf5/Portfile

have you manually added the experimental c++ variant?

https://github.com/macports/macports-ports/blob/818e6a772d912d74344f887f0a500e68feacb38f/science/hdf5/Portfile#L127

I don’t see a c++ standard set in the portfile, so there could be issues if other ports that use the library do set one.

basically, libraries, and consumers of libraries, generally need to use a matching c++ standard.

comment:2 in reply to:  1 Changed 14 months ago by barracuda156

Replying to kencu:

it looks like hdf5 doesn’t build c++ by default…

https://github.com/macports/macports-ports/blob/master/science/hdf5/Portfile

have you manually added the experimental c++ variant?

https://github.com/macports/macports-ports/blob/818e6a772d912d74344f887f0a500e68feacb38f/science/hdf5/Portfile#L127

I don’t see a c++ standard set in the portfile, so there could be issues if other ports that use the library do set one.

basically, libraries, and consumers of libraries, generally need to use a matching c++ standard.

Looks like it is among default ones: https://github.com/macports/macports-ports/blob/818e6a772d912d74344f887f0a500e68feacb38f/science/hdf5/Portfile#L73 It might have issues with MPICH though, possibly.

What would be a solution to try? Set cxx_standard 2011, rebuild and see if that solves the issue?

comment:3 Changed 14 months ago by kencu (Ken)

kealib is using c++11 and so when building with gcc, MP adds the ABI flag, as it should..

for that to work, hdf5 would also need the same standard set.

so now you need to see if everything involving hdf5 can be built with c++11 (or greater) or not.

Probably, by this point in time, everything can. So then you set it everywhere needed, and things are speaking the same dialect.

comment:4 in reply to:  3 Changed 14 months ago by barracuda156

Replying to kencu:

kealib is using c++11 and so when building with gcc, MP adds the ABI flag, as it should..

for that to work, hdf5 would also need the same standard set.

so now you need to see if everything involving hdf5 can be built with c++11 (or greater) or not.

Probably, by this point in time, everything can. So then you set it everywhere needed, and things are speaking the same dialect.

Got it, thank you. Will try sorting this out in a while.

comment:5 Changed 14 months ago by Dave-Allured (Dave Allured)

Cc: Dave-Allured added
Note: See TracTickets for help on using tickets.