Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#21983 closed update (fixed)

netcdf does not link against hdf5 when required

Reported by: adfernandes (Andrew Fernandes) Owned by: adfernandes (Andrew Fernandes)
Priority: Normal Milestone:
Component: ports Version: 1.8.1
Keywords: Cc:
Port: netcdf

Description

Various reports around the web indicate that netcdf, on the mac, can fail with an infamous Error dyld: Symbol not found: _H5P_CLS_FILE_ACCESS_g error. According to the Unidata FAQ entry http://www.unidata.ucar.edu/software/netcdf/docs/known_problems.html#o_problem_mac the "solution" is to compile netcdf with -g rather than -O2 gcc options.

After much tinkering, I've discovered that this advice is incorrect, and have emailed support-netcdf @ unidata.ucar.edu the correct solution, below, asking them to update their web page.

The problem is that their configure scripts fail to add an -lhdf5 to the autotools-generated Makefile. The iconv, szlib, and zilb dylibs all get added, but somehow hdf5 gets left out.

Thankfully, the simple fix is to add the library manually through the environment variables.

Attachments (2)

Portfile.diff (667 bytes) - added by adfernandes (Andrew Fernandes) 15 years ago.
Portfile.2.diff (783 bytes) - added by adfernandes (Andrew Fernandes) 15 years ago.

Download all attachments as: .zip

Change History (5)

Changed 15 years ago by adfernandes (Andrew Fernandes)

Attachment: Portfile.diff added

comment:1 Changed 15 years ago by adfernandes (Andrew Fernandes)

Owner: changed from macports-tickets@… to adfernandes@…
Status: newassigned

Commit

comment:2 Changed 15 years ago by adfernandes (Andrew Fernandes)

Resolution: fixed
Status: assignedclosed

Committed as r59162

Changed 15 years ago by adfernandes (Andrew Fernandes)

Attachment: Portfile.2.diff added

comment:3 Changed 15 years ago by adfernandes (Andrew Fernandes)

Grr... other code, it turns out, needs the hdf5_hl library, too. My first round of testing worked, but the second failed... grr... No idea if the hdf5_cpp or hdf5_hl_cpp libraries are needed, too, but we'll leave them out for now. Committed as r59163.

Note: See TracTickets for help on using tickets.