화학 물질 방출 전처리 기 프로그램을 컴파일하려고합니다.netcdf와 연관된 컴파일 프로그램의 Dwarf 버전에 오류가 발생했습니다.
이것은 컴파일 과정에 대한 공식 자습서입니다.
은 이미 원래의 소스 코드 here을 업로드했다.
netcdf_dir
을 미리 정의하면 소스 코드가 잘 컴파일되어야합니다.
는하지만 ./make_util megan_bio_emiss
를 사용할 때 오류가 같은 보여주는 나타납니다
=========================================================================
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'
......
이 (? 난쟁이 ) 뭔가 소스 코드에 내 시스템 uncompatiable 것 같다. 그런데
usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 information.
는, 내가 사용 운영 시스템에 CentOS 5.0 & 나는 GCC-4.9.2
와 netCDF의-4.1.3 (C & 포트란 바이너리 코드가 결합되어 마지막 버전)을 설치 한내가 변경할 수있는 것이 있습니까 megan_bio_emiss 성공적으로 컴파일 하시겠습니까?
조언이 도움이 될 것입니다.
-------------------------------- 2016-9-10 추가 -------- ------------------------
나는 -gdwarf-2
swith를 Makefile의 특정 줄에 추가합니다.
편집이 여전히 잘못되었습니다.
답장을 보내 주셔서 감사합니다. 나는 swith'-gdwarf-2'를 컴파일하려고했지만, 문제는 해결되지 않은 것 같습니다. 최신 버전의 링커로 업데이트하는 방법? –
모든 개체를 다시 컴파일 했습니까? 그렇다면 링크 줄에 -gdwarf-2를 추가해 볼 수도 있습니다. 물론 필요한 것은 아닌지 잘 모르겠습니다. – janneb
나중에 답장을 드려서 죄송합니다. 링크 라인은 어디에 있습니까? 나는 편집에 익숙하지 않다. 이제'-gdwarf2'를 추가하면 각 __을 컴파일합니다 .f90__ 파일은 _gfortran -g -ffree-line-length-none -gdwarf-2 -c -I/disk2/hyf/lib/netcdf/include misc_definitions_module.f90_ . –