Opened 10 years ago

Closed 10 years ago

#43867 closed defect (fixed)

netcdf not building on snow leopard

Reported by: gnurser (George Nurser) Owned by: tenomoto (Takeshi Enomoto)
Priority: Normal Milestone:
Component: ports Version: 2.3.0
Keywords: Cc: cooljeanius (Eric Gallager), massonseb, maximilian.behr@…, Russell-Jones-OxPhys (Russell Jones)
Port: netcdf

Description

Hi,

netcdf-4.3.1.1_1+dap+gcc47+netcdf4+openmpi is failing to build for me.

Problem seems to be missing symbol "_H5Pset_fapl_mpiposix"

Cheers, George Nurser

Attachments (1)

main.log (143.5 KB) - added by gnurser (George Nurser) 10 years ago.
main.log

Download all attachments as: .zip

Change History (19)

Changed 10 years ago by gnurser (George Nurser)

Attachment: main.log added

main.log

comment:1 Changed 10 years ago by mf2k (Frank Schima)

Cc: takeshi@… removed
Keywords: netcdf removed
Owner: changed from macports-tickets@… to takeshi@…

comment:2 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

netcdf was updated to 4.3.2 in r120562; please run "sudo port selfupdate" and try again with that version.

comment:3 in reply to:  2 Changed 10 years ago by gnurser (George Nurser)

Replying to ryandesign@…:

netcdf was updated to 4.3.2 in r120562; please run "sudo port selfupdate" and try again with that version.

Ok. Just tried that, but same result, it seems. In main.log:

lm /opt/local/lib/libcurl.dylib

:info:build Undefined symbols for architecture x86_64:

:info:build "_H5Pset_fapl_mpiposix", referenced from: :info:build import-atom in libnetcdf.dylib

:info:build ld: symbol(s) not found for architecture x86_64

:info:build collect2: error: ld returned 1 exit status

Last edited 10 years ago by gnurser (George Nurser) (previous) (diff)

comment:4 Changed 10 years ago by bjandre@…

It looks like hdf5 1.8.13 is not compatible with netcdf 4.3.2. See:

https://github.com/Homebrew/homebrew-science/issues/911

comment:5 Changed 10 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:6 Changed 10 years ago by maximilian.behr@…

Last edited 10 years ago by maximilian.behr@… (previous) (diff)

comment:7 Changed 10 years ago by stanimura

Here, the same thing happens on Mavericks.

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.9.3
BuildVersion:	13D65

comment:8 Changed 10 years ago by massonseb

I confirm, the same thing happens on Mavericks.

Last edited 10 years ago by massonseb (previous) (diff)

comment:9 Changed 10 years ago by massonseb

Cc: smasson@… added

Cc Me!

comment:10 Changed 10 years ago by maximilian.behr@…

Cc: maximilian.behr@… added

Cc Me!

comment:11 Changed 10 years ago by gnurser (George Nurser)

While waiting for the proper fix I found that

(i) editing out occurrences of a/ & b/ from the patch referenced by homebrew above i.e.
https://github.com/Unidata/netcdf-c/commit/435d8a03ed28bb5ad63aff12cbc6ab91531b6bc8.diff[[BR]]

(ii) saving as e.g. patch_netcdf.diff into the directory
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/science/netcdf/files

(iii) replacing line 35 in
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/science/netcdf/Portfile
by
patchfiles patch-configure.diff patch-netcdf.diff

allowed netcdf to built satisfactorily with hdf5 1.8.13.

Last edited 10 years ago by gnurser (George Nurser) (previous) (diff)

comment:12 Changed 10 years ago by Russell-Jones-OxPhys (Russell Jones)

Cc: russell.jones@… added

Cc Me!

comment:13 Changed 10 years ago by Russell-Jones-OxPhys (Russell Jones)

Cc: russell.jones@… removed

Cc Me!

comment:14 Changed 10 years ago by Russell-Jones-OxPhys (Russell Jones)

Cc: russell.jones@… added

Cc Me!

comment:15 Changed 10 years ago by massonseb

The directory

/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/science/netcdf/files

is not existing... I guess it is

/opt/local/var/macports/sources/rsync.macports.org/release/ports/science/netcdf/files

I am right?
I also think the the file as to be saved as patch-netcdf.diff and not patch_netcdf.diff

I tried with netcdf-4.3.2_0+dap+gcc48+netcdf4+openmpi which has the same error :

:info:build Undefined symbols for architecture x86_64:
:info:build   "_H5Pset_fapl_mpiposix", referenced from:
:info:build       import-atom in libnetcdf.dylib
:info:build ld: symbol(s) not found for architecture x86_64
:info:build collect2: error: ld returned 1 exit status

With the modifications given in (i), (ii) and (iii), I get this new error message in the main.log file:

:info:patch patching file configure
:info:patch --->  Applying patch-netcdf.diff
:debug:patch Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_netcdf/netcdf/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.9'
:debug:patch Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_netcdf/netcdf/work/netcdf-c-4.3.2" && /usr/bin/patch -p0'
:debug:patch Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_netcdf/netcdf/work/netcdf-c-4.3.2" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/release/ports/science/netcdf/files/patch-netcdf.diff'
:info:patch can't find file to patch at input line 5
:info:patch Perhaps you used the wrong -p or --strip option?
:info:patch The text leading up to this was:
:info:patch --------------------------
:info:patch |diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
:info:patch |index 27f228c..1a69d17 100644
:info:patch |--- a/RELEASE_NOTES.md
:info:patch |+++ b/RELEASE_NOTES.md
:info:patch --------------------------
:info:patch File to patch: 
:info:patch Skip this patch? [y] 
:info:patch Skipping patch.
:info:patch 1 out of 1 hunk ignored
:info:patch can't find file to patch at input line 18
:info:patch Perhaps you used the wrong -p or --strip option?
:info:patch The text leading up to this was:
:info:patch --------------------------
:info:patch |diff --git a/libsrc4/nc4file.c b/libsrc4/nc4file.c
:info:patch |index ec3bb0c..5c957be 100644
:info:patch |--- a/libsrc4/nc4file.c
:info:patch |+++ b/libsrc4/nc4file.c
:info:patch --------------------------
:info:patch File to patch: 
:info:patch Skip this patch? [y] 
:info:patch Skipping patch.
:info:patch 4 out of 4 hunks ignored
:info:patch can't find file to patch at input line 102
:info:patch Perhaps you used the wrong -p or --strip option?
:info:patch The text leading up to this was:
:info:patch --------------------------
:info:patch |diff --git a/nc_test4/tst_nc4perf.c b/nc_test4/tst_nc4perf.c
:info:patch |index 47af70e..3528b82 100644
:info:patch |--- a/nc_test4/tst_nc4perf.c
:info:patch |+++ b/nc_test4/tst_nc4perf.c
:info:patch --------------------------
:info:patch File to patch: 
:info:patch Skip this patch? [y] 
:info:patch Skipping patch.
:info:patch 1 out of 1 hunk ignored
:info:patch can't find file to patch at input line 118
:info:patch Perhaps you used the wrong -p or --strip option?
:info:patch The text leading up to this was:
:info:patch --------------------------
:info:patch |diff --git a/nc_test4/tst_parallel3.c b/nc_test4/tst_parallel3.c
:info:patch |index 27f9c98..9fa534f 100644
:info:patch |--- a/nc_test4/tst_parallel3.c
:info:patch |+++ b/nc_test4/tst_parallel3.c
:info:patch --------------------------
:info:patch File to patch: 
:info:patch Skip this patch? [y] 
:info:patch Skipping patch.
:info:patch 1 out of 1 hunk ignored
:info:patch Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_netcdf/netcdf/work/netcdf-c-4.3.2" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/release/ports/science/netcdf/files/patch-netcdf.diff'
:info:patch Exit code: 1
:error:patch org.macports.patch for port netcdf returned: command execution failed
:debug:patch Error code: CHILDSTATUS 8234 1
:debug:patch Backtrace: command execution failed
    while executing
"system $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec patch "" "< '$patch'""
    (procedure "portpatch::patch_main" line 35)
    invoked from within
"portpatch::patch_main org.macports.patch"
    ("eval" body line 1)
    invoked from within
"eval $procedure $targetname"
:info:patch Warning: targets not executed for netcdf: org.macports.install org.macports.patch org.macports.configure org.macports.build org.macports.destroot
:notice:patch Please see the log file for port netcdf for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_netcdf/netcdf/main.log

comment:16 in reply to:  15 Changed 10 years ago by gnurser (George Nurser)

Replying to smasson@…:

The directory

/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/science/netcdf/files

is not existing... I guess it is

/opt/local/var/macports/sources/rsync.macports.org/release/ports/science/netcdf/files
}}}[[BR]]

I needed the /tarballs this time (though not the last time I tried this kind of thing), but a better way to get to it is cd $(port dir netcdf)

I am right?
I also think the the file as to be saved as patch-netcdf.diff and not patch_netcdf.diff

Careless of me. Yes.

I tried with netcdf-4.3.2_0+dap+gcc48+netcdf4+openmpi which has the same error :

:info:build Undefined symbols for architecture x86_64:
:info:build   "_H5Pset_fapl_mpiposix", referenced from:
:info:build       import-atom in libnetcdf.dylib
:info:build ld: symbol(s) not found for architecture x86_64
:info:build collect2: error: ld returned 1 exit status

With the modifications given in (i), (ii) and (iii), I get this new error message in the main.log file:

:info:patch patching file configure
:info:patch --->  Applying patch-netcdf.diff
:debug:patch Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_netcdf/netcdf/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.9'
:debug:patch Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_netcdf/netcdf/work/netcdf-c-4.3.2" && /usr/bin/patch -p0'
:debug:patch Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_netcdf/netcdf/work/netcdf-c-4.3.2" && /usr/bin/patch -p0 < '/opt/local/var/macports/sources/rsync.macports.org/release/ports/science/netcdf/files/patch-netcdf.diff'
:info:patch can't find file to patch at input line 5
:info:patch Perhaps you used the wrong -p or --strip option?
:info:patch The text leading up to this was:
:info:patch --------------------------
:info:patch |diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
:info:patch |index 27f228c..1a69d17 100644
:info:patch |--- a/RELEASE_NOTES.md
:info:patch |+++ b/RELEASE_NOTES.md

You need to do in (i) a global removal of a/ and b/ so e.g. the above 2 lines become

:info:patch |--- RELEASE_NOTES.md

:info:patch |+++ RELEASE_NOTES.md

comment:17 Changed 10 years ago by massonseb

Hi George, happy to find you here!
After a "port selfupdate" and a clean removal of all the "a/" and "b/" from the patch file, your fix works perfectly.
Seb

comment:18 Changed 10 years ago by seanfarley (Sean Farley)

Resolution: fixed
Status: newclosed

Sorry about the delay in patching this. I added the patch in r121070.

Note: See TracTickets for help on using tickets.