this is a VERY big problem with "university code"
it is often made by students that are NOT software developers and software engineers
Geology writing code for geology programs
Math majors writing code for a function
Physics students writing astronomy software with help from the Geology students
and so on
some is good , some is GREAT, and some is a very messy bit of "spaghetti code"
the "directions" are often a bit wrong
or relate to 20+ year old instructions ( even if the software is new )
-- i build and use a lot of this stuff and " reading the code" is often better than trying to fallow the included instructions
to have the OLD version of netcdf build " netcdf-4.2.1" is a OLD VERSION !
netcdf-4.3 is the current
there is NO NEED to put libz.so in the netcdf-4.2.1 folder
no need at all , you do NOT need to do that !
"./configure" will auto find it on the fedora 16 system using "autotools"
that is WHY you run "configure"
to set up a build script FOR YOUR SYSTEM
setting "CPPFLAGS" and "LDFLAGS" in the terminal are not needed for almost ALL normal builds
"configure" should auto take care of this
yes way back in 1999 to 2003 they were NEEDED , but not today in 2013
-- sometimes for some "special" builds they are , but not 99.99999% of the time
-- "university code" documentation -- sometimes it is VERY VERY OLD ,some of it dating from 1996 for netcdf
Quote:
how can i find version of zlip which is already installed ?
|
use yum
yum is the package manager
Code:
su -
yum info libz
-- or --
yum info zlib
-- there are some name changes in the zip compression library
Quote:
you mean that i should make a folder as NETCDF for installing netcdf and then what i should copy/ past in that folder?
|
in "file-roller" the default GUI archive manager on fedora 16
it auto made a folder( called /netcdf-4.2.1 ) when you extracted the gziped tarball "netcdf-4.2.1.tar.gz"
also you DO NOT
100% DO NOT install the software to the build folder
almost all older code , and a lot of new also , will AUTO configure to install to "/usr/local"
fedora DOSE NOT , repeat dose NOT use that Debian default location
it uses " /usr " by default
you need to set that using "--prefix" in the configure line
have a look at the default settings for netcdf-4.2.1
in that folder run this
--- a quote from the output of this
Quote:
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
|
also for netcdf-4.2.1 there is NO need to manually set the zlib option
it is AUTO tested for and auto set to "yes" if needed
Quote:
what is linker line and how i can add it
|
if needed that would all depend on the error -- if any
and the version of gcc that this program was DESIGNED for
it is very likely that even on the now
unsupported and old Fedora 16 that the version of gcc might be WAY too new
-- just tested it on a fairly current gcc 4.7 , and it builds without an error
PS. I just ONLY ran this and it build without any problems
Code:
./configure
make -j3
the "-j3" told the compiler to use 3 of the 4 CPU's on my computer
-- for faster build times on a i5 or i7 or better CPU
if you want to install it to "/home/usr/NETCDF
well REPLACE "usr" with your REAL name -- the name on your home folder
Code:
./configure --prefix=/home/fereshteh/NETCDF
make
make install
you should see this if there are no errors
Code:
+-------------------------------------------------------------+
| Congratulations! You have successfully installed netCDF! |
| |
| You can use script "nc-config" to find out the relevant |
| compiler options to build your application. Enter |
| |
| nc-config --help |
| |
| for additional information. |
| |
| CAUTION: |
| |
| If you have not already run "make check", then we strongly |
| recommend you do so. It does not take very long. |
| |
| Before using netCDF to store important data, test your |
| build with "make check". |
| |
| NetCDF is tested nightly on many platforms at Unidata |
| but your platform is probably different in some ways. |
| |
| If any tests fail, please see the netCDF web site: |
| http://www.unidata.ucar.edu/software/netcdf/ |
| |
| NetCDF is developed and maintained at the Unidata Program |
| Center. Unidata provides a broad array of data and software |
| tools for use in geoscience education and research. |
| http://www.unidata.ucar.edu |
+-------------------------------------------------------------+
mind you the folder /NETCDF is NOT in the system or user $PATH
you will likely need to add that in the .bash_profile text file ( it is a hidden system file in your home folder
run "make check" before you use it to check if there are problems or not
all the tests should pass