bugGNU Octave - Bugs: bug #45406, netcdf package install fails

 
 

bug #45406: netcdf package install fails

Submitted by:  None
Submitted on:  Thu 25 Jun 2015 12:36:41 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Build Failure
Status: InvalidAssigned to: None
Originator Name: Greg KingOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.8.2
Operating System: Mac OS

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue 20 Sep 2016 01:28:26 AM UTC, comment #7:

Hi,

I encountered a problem when I tried to install the netcdf package to octave on my macbook (os x 10.9.5). I got similar error messages like Greg’s. I am hoping to get advice from you here.

I defined PATH and LD_LIBRARY_PATH by adding export PATH="/opt/local/bin:$PATH"
export LD_LIBRARY_PATH=“/opt/local/lib:$LD_LIBRARY_PATH" to the end of the ./bash_profile. They should correspond to the libraries, which are /opt/local/bin/nc-config, and -L/opt/local/lib -lnetcdf -lhdf5_hl -lhdf5 -ldl -lm -lz -lcurl, respectively. Despite of this setting, the installation still fails.

I am not sure what I can do to solve this problem. I would be very appreciated if anyone can help me out. Thank you very much.

Yi-Hui

My error message is here:
mkdir (/var/tmp/oct-oKDJX5)
untar (/Users/yihuiw/netcdf-1.0.11.tar.gz, /var/tmp/oct-oKDJX5)
checking for gcc... /usr/local/octave/3.8.0/bin/gcc-mp-4.7
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/var/tmp/oct-oKDJX5/netcdf/src':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

pkg: error running the configure script for netcdf.
error: called from 'configure_make' in file /usr/local/octave/3.8.0/share/octave/3.8.0/m/pkg/private/configure_make.m near line 72, column 9
error: called from:
error: /usr/local/octave/3.8.0/share/octave/3.8.0/m/pkg/private/install.m at line 199, column 5
error: /usr/local/octave/3.8.0/share/octave/3.8.0/m/pkg/pkg.m at line 394, column 9

Yi-Hui Wang <yihuiwang>
Thu 30 Jul 2015 09:20:55 PM UTC, comment #6:

to the bug tracking maintainers:
Can this be closed now?

Alexander Barth <abarth>
Thu 16 Jul 2015 02:29:25 PM UTC, comment #5:

I created .bash_profile and included the information you have in your wiki. As I am not so experience with linux, I copied the info exactly, which of course did not work. So you probably should put in a warning.

Anyway, I discovered that "/path/to/netcdf" and "/path/to/hdf5" should both be replaced with "/usr/local". Homebrew provides links to the netcdf and hdf5 libs and include files in /usr/local to the ones in the Cellar.

After doing that, I sourced bash_profile and launched the octave gui.
From the gui I executed ...

pkg install -verbose -forge -auto netcdf

and netcdf was built and installed without error. I checked the installation with...

pkg load netcdf

and then tested with

test_netcdf

ALL OK. Thanks!
greg

Greg King <gking>
Wed 15 Jul 2015 08:22:04 AM UTC, comment #4:

Hello

I did an uninstall of all versions of netcdf (there was an older version, but it seems to have had no effect on the current problem). And uninstalled hdf5. Then I reinstalled netcdf and hdf5.

I then checked and there is only one nc-config.
The link in /usr/local/bin points to this...
/usr/local/Cellar/netcdf/4.3.3.1/bin/nc-config

The output from nc-config --all (below) was unchanged from before I did the above re-installs. It does not point to the hdf5 in the Cellar. The output follows

This netCDF 4.3.3.1 has been built with the following features:

--cc -> clang
--cflags -> -I/usr/local/Cellar/netcdf/4.3.3.1/include
--libs -> -L/usr/local/Cellar/netcdf/4.3.3.1/lib -lnetcdf

--has-c++ -> no
--cxx ->
--has-c++4 -> yes
--cxx4 -> clang++

--fc -> /usr/local/bin/gfortran
--fflags -> -I/usr/local/Cellar/netcdf/4.3.3.1/include
--flibs -> -L/usr/local/Cellar/netcdf/4.3.3.1/lib -lnetcdff -L/usr/local/Cellar/netcdf/4.3.3.1/lib -lnetcdf -lnetcdf
--has-f90 -> no

--has-dap -> yes
--has-nc2 -> yes
--has-nc4 -> yes
--has-hdf5 -> yes
--has-hdf4 -> no
--has-pnetcdf-> no

--prefix -> /usr/local/Cellar/netcdf/4.3.3.1
--includedir-> /usr/local/Cellar/netcdf/4.3.3.1/include
--version -> netCDF 4.3.3.1

Greg King <gking>
Tue 14 Jul 2015 08:18:56 PM UTC, comment #3:

Sorry for my late reply, but for some reasons I do not get notification from the bug tracker.

What is the output of "nc-config --all"?

The --cflags should include "/usr/local/Cellar/hdf5/1.8.14/include" for instance and --libs should include the location of the HDF5 library (libhdf5*).

Can you also check if you have multiple scripts called nc-config on your system?

More info on nc-config:
http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-install/nc_002dconfig.html

https://www.unidata.ucar.edu/software/netcdf/workshops/2012/utilities/Nc-config.html

Alexander Barth <abarth>
Fri 03 Jul 2015 09:30:20 AM UTC, comment #2:

the command>

brew install hdf5

confirms that hdf5 is installed.
Further search shows that brew installed hdf5 here...

/usr/local/Cellar/hdf5/1.8.14/

and hdf5.h is in subfolder "include"

This suggests to me that there is a missing link somewhere, though I am not sure what to look for and where.

Greg King <gking>
Thu 02 Jul 2015 08:57:30 PM UTC, comment #1:

netcdf 4 and octave depend on HDF5. Do you have HDF5 installed (libs and headers)?

Alexander Barth <abarth>
Thu 25 Jun 2015 12:36:41 PM UTC, original submission:

I just installed octave on mac osx Yosemite, using homebrew.

Octave install was okay. The version homebrew installed was 3.8.2.

I then tried to install the netcdf package from the octave gui. That failed. The output is below.

What to do??

greg king

pkg install -forge netcdf
warning: creating installation directory /Users/gking/octave
In file included from _netcdf_.cc:17:
In file included from /usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/../octave/oct.h:36:
In file included from /usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/defun-dld.h:30:
In file included from /usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/defun-int.h:28:
In file included from /usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/ov-builtin.h:28:
In file included from /usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/ov-fcn.h:32:
In file included from /usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/oct-obj.h:34:
In file included from /usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/ov.h:42:
/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/oct-hdf5.h:27:10: fatal error: 'hdf5.h' file
not found
#include <hdf5.h>
^
1 error generated.
make: *** [__netcdf__.oct] Error 1
/usr/local/Cellar/octave/3.8.2_1/bin/mkoctfile-3.8.2 -DHAVE_OCTAVE_ -v -I/usr/local/Cellar/netcdf/4.3.3.1/include _netcdf_.cc -L/usr/local/Cellar/netcdf/4.3.3.1/lib -lnetcdf
clang++ -c -fPIC -I/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave/.. -I/usr/local/Cellar/octave/3.8.2_1/include/octave-3.8.2/octave -I/usr/local/Cellar/octave/3.8.2_1/include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/include/darwin -D_REENTRANT -D_THREAD_SAFE -pthread -I/usr/local/Cellar/netcdf/4.3.3.1/include -DHAVE_OCTAVE_ _netcdf_.cc -o _netcdf_.o

pkg: error running `make' for the netcdf package.
error: called from 'configure_make' in file /usr/local/Cellar/octave/3.8.2_1/share/octave/3.8.2/m/pkg/private/configure_make.m near line 82, column 9
error: called from:
error: /usr/local/Cellar/octave/3.8.2_1/share/octave/3.8.2/m/pkg/private/install.m at line 199, column 5
error: /usr/local/Cellar/octave/3.8.2_1/share/octave/3.8.2/m/pkg/pkg.m at line 394, column 9

>>

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by yihuiwang (Posted a comment)
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by gking (Posted a comment)
  • -unavailable- added by abarth (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 30 Jul 2015 11:27:47 PM UTCmtmillerStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1