Ubuntu20.04 下安装gCAP3D1.2

参考:https://blog.seisman.info/gcap-install/

  • 在以上链接中下载
# Makefile.gCAP3d
# gcap_utils.tar.gz
  1. 原始gCAP3D/下的Makefile使用g77编译器,而不是GNU的gfortran,删除原有的Makefile,将Makefile.gCAP3d复制到gCAP3D/下,改名字为Makefile;
  2. 修改其中的SAC安装路径(SACHOME);
  3. 将依赖子程序
gcap_utils/eigsrt.c
gcap_utils/jacobi.c
gcap_utils/nr.h
gcap_utils/nrutil.c
gcap_utils/nrutil.h

拷贝到gCAP3D/下;

  1. 编译
    进入到gCAP3D目录下,执行编译命令
make

注意:当sac 版本为101.6时,编译会报错:

/usr/bin/ld: /home/eirc/micro/sac/lib/libsacio.a(math.o): relocation 
R_X86_64_32 against `.text' can not be used when making a PIE object; 
recompile with -fPIE collect2: error: ld returned 1 exit status make: 
*** [Makefile:15: cap3D] Error 1

【以上问题是该版本sac编译时未使用-fPIE选项】

换用sac 102.0时,程序编译通过。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。