[Thread Prev][Thread Next][Index]

Re: [ferret_users] building ferret configuring site_specific.mk

Hi Dave,

Yes, for many of the newer "free" Linux systems, /usr/lib/x86_64-linux-gnu is the location of the libraries.

Are you building Ferret or PyFerret?  We recommend the latter.  Also, if you are going to build from source, get the latest source (7.4.3) from GitHub:
https://github.com/NOAA-PMEL/PyFerret (or https://github.com/NOAA-PMEL/Ferret if you are sure you want Ferret instead)
The RHEL7 pre-built package might work, but I have not tested it on Ubuntu.

If you are building it, and if the site_specific.mk file specifies *_LIBDIR environment variables as in the latest versions, the "platform_specific.mk.*" files assume the include directories are in sibling subdirectories to the library directories - thus "../include" relative to the library subdirectory.  (Older version specifies the parent directory and assume an "include" and "lib" or "lib64" subdirectory.)  If this is not the case, the appropriate platform_specific.mk.* file will need to be tweaked to give the proper path to the include files.

Note that if you are using system libraries, you should just use the NetCDF shared object library - thus only specify NETCDF_LIBDIR and leave all the other locations blank.  The NetCDF location needs to be specified to find the include files, although since those are in a standard location, that probably isn't actually required as long as the development (usually something like "netcdf-devel") system package is installed.

There is also an Anaconda package for PyFerret, but being a sys admin I assume you would rather have a regular installation.

Best regards,

On Thu, Oct 4, 2018 at 1:14 PM Dave Burns <tburns@xxxxxxxxxx> wrote:

Hi Ryo and Martin! Thanks for your replies.

On Wed, Oct 3, 2018 at 9:44 PM Ryo Furue <furue@xxxxxxxxxx> wrote:
Hi Dave and Martin,

It says "insert the locations of the HDF5, NetCDF, and readline directories, and java". How do I figure out what those paths are and whether or not I have the correct software installed yet?

What operating system are you working on? 

Most OSes have standard or popular packaging systems. 

Too bad there is none for ferret. Yeah, I have installed netcdf as a package.

ncl-ncarg is already the newest version (6.3.0-6build1).
nco is already the newest version (4.5.4-1build1).
netcdf-bin is already the newest version (1:4.4.0-2).

 But that doesn't tell me where  the HDF5, NetCDF, and readline directories, and java are. Packages can put libraries in various places, which file or directory am I looking for in each case?

And which package should I install for HDF5? apt search HDF5 returns a million hits. I am installing 
h5utils/xenial 1.12.1-4 amd64
hdf5-helpers/xenial-updates,xenial-security 1.8.16+docs-4ubuntu1.1 amd64
hdf5-tools/xenial-updates,xenial-security 1.8.16+docs-4ubuntu1.1 amd64
hdfview/xenial 2.9-5 amd64

But which filename shall I search for? Ah libhdf5*

 On Wed, Oct 3, 2018 at 9:05 PM Martin Schmidt <martin.schmidt@xxxxxxxxxxxxxxxxx> wrote:

Hi Dave,

there are several options:

- if the machine you are working on is your PC, this is mostly /usr/local/bin and /usr/local /lib or /usr/local/lib64. The include files are in /usr/local/include. To check this, just issue

> which ncdump

# which ncdump

This shows you the path to ncdump. The case this is /usr/local/bin just issue

> ls /usr/local/lib/libnetcdf*

# ls /usr/lib/libnet*
/usr/lib/libnetpbm.so.10  /usr/lib/libnetpbm.so.10.0
root@:~# ls /usr/local/lib/libnet*
ls: cannot access '/usr/local/lib/libnet*': No such file or directory
root@:~# ls /usr/local/bin/libnet*
ls: cannot access '/usr/local/bin/libnet*': No such file or directory
root@:~# ls /usr/local/libnet*
ls: cannot access '/usr/local/libnet*': No such file or directory
root@:~# ls /usr/local/lib/libnet*
ls: cannot access '/usr/local/lib/libnet*': No such file or directory
root@:~# ls /usr/local/lib64/libnet*
ls: cannot access '/usr/local/lib64/libnet*': No such file or directory

 So I tried Ryo's idea:
# find /usr -iname '*libnetcdf*'

So that means /usr/lib/x86_64-linux-gnu is the value I put for NetCDF.

to see the location of the netcdf-library. If you used some system installers they may be in /usr/bin, /usr/lib and so on.

The same applies for hdf5.

Search for libhdf5? Yeah, that worked:
root@:~# find /usr -iname '*libhdf5*'


- if the machine you are working on is a server, just look at the same place first. Otherwise ask the system administrator

Blush. I am the system administrator. But I don't know a thing about ferret, netcdf, etc. I always use packages, almost never compile anything.

root@:~# ls /usr/lib/x86_64-linux-gnu/libsz*
/usr/lib/x86_64-linux-gnu/libsz.so.2  /usr/lib/x86_64-linux-gnu/libsz.so.2.0.1

root@:~# ls /usr/lib/x86_64-linux-gnu/libread*
/usr/lib/x86_64-linux-gnu/libreadline.a  /usr/lib/x86_64-linux-gnu/libreadline.so

Looks like  /usr/lib/x86_64-linux-gnu is the answer in all cases.


Karl M. Smith, Ph.D.
JISAO Univ. Wash. and PMEL NOAA
"The contents of this message are mine personally and do
not necessarily reflect any position of the Government
or the National Oceanic and Atmospheric Administration."

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement