I'm trying to compile a program which is a chemical emission preprocessor.
This is the offical tutorial of its compile process.
I have already upload the original source code here.
With predefine the netcdf_dir
, the source code should be compiled well.
But when I use ./make_util megan_bio_emiss
, the error appear showing like:
=========================================================================
Using gfortran fortran compiler
=============================================================================
=============================================================================
netcdf top level directory = /disk2/hyf/lib/netcdf
=============================================================================
gfortran -g -ffree-line-length-none -c -I/disk2/hyf/lib/netcdf/include misc_definitions_module.f90
gfortran -g -ffree-line-length-none -c -I/disk2/hyf/lib/netcdf/include constants_module.f90
gfortran -g -ffree-line-length-none -c -I/disk2/hyf/lib/netcdf/include bio_types.f90
......
......
......
gfortran -o megan_bio_emiss misc_definitions_module.o constants_module.o bio_types.o area_mapper.o bio_emiss.o -L/disk2/hyf/lib/netcdf/lib -lnetcdf -lnetcdff
/usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 information.
/disk2/hyf/lib/netcdf/lib/libnetcdff.a(fort-attio.o): In function `nf_put_att_text_':
fort-attio.c:(.text+0x11c): undefined reference to `nc_put_att_text'
......
It seems that something(dwarf?) on the source code is uncompatiable with my system.
usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 information.
By the way, the operation system I'm using is CentOS 5.0 & I have installed netCDF-4.1.3(The last version that C & Fortran binary code are combined ) with GCC-4.9.2
Is there something I can change in the Makefile of the megan_bio_emiss to successfully compile?
Any advice will be appreciate!
-------------------------------- 2016-9-10 ADD --------------------------------
I add the -gdwarf-2
swith to the specific line of Makefile.
The compilation still got wrong.