黑龙江华龙建设集团网站,wordpress文章页折叠,陕西西安建设厅官方网站,wordpress产品增加视频Ubuntu 24.04 LTS 安装GAMIT错误定位卸载csh编译tcshGAMIT配置修改GAMIT代码修改GAMIT 不处理GPS L2C的小bug熟悉GAMIT的朋友应该都知道#xff0c;在GAMIT官网有一则Known Issue#xff1a;不要在Ubuntu 24.04上安装GAMIT
MIT的几位佬测试#xff0c;换了多个版本的gcc/gf…
Ubuntu 24.04 LTS 安装GAMIT错误定位卸载csh编译tcshGAMIT配置修改GAMIT代码修改GAMIT 不处理GPS L2C的小bug熟悉GAMIT的朋友应该都知道在GAMIT官网有一则Known Issue不要在Ubuntu 24.04上安装GAMIT
MIT的几位佬测试换了多个版本的gcc/gfortran编译都不成功报错
ar: creating libsofa.a*** Now type make test to install the library and run tests ***cp libsofa.a ../../../../libsofa.a
Segmentation fault (core dumped)
Failure in make_gamit -- install_software terminated哥们头铁我就想在Ubuntu 24.04上装GAMIT有没有办法呢有的兄弟有的。
错误定位
这个错误发生在make_gamit这个脚本里发生这个错误之前的操作就是用make编译了libsofa这个库。而我们可以发现在对应目录下的命令行里执行这个命令屁事没有。
make FCgfortran那么问题很明确了就是这个版本的csh执行到这里内存管理出问题了…
卸载csh
ok按照GAMIT作者的测试结论Ubuntu 25.10并没有问题那么我们自己编译一个最新版的csh替换掉就行了。在此之前先把csh卸掉
sudo apt purge csh tcsh -y编译tcsh
首先从官网下载tcsh的源码当前最新的是6.24.10
wget http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/tcsh-6.24.10.tar.gz然后利用configure生成makefile以默认设置编译即可。
./configure
make -j$(nproc)
sudo make install编译好的tcsh放在/usr/local/bin下建立一个csh的链接
sudo ln -s /usr/local/bin/tcsh /usr/bin/csh测试一下没啥问题命令行只会显示一个 GAMIT配置修改
参考官网Known Issues中的建议将libraries/Makefile.config和gamit/solve/Makefile.generic中的FFLAGS添加-fallow-argument-mismatch
GAMIT代码修改
由于GAMIT采用的C语言标准较老kf/plot/中调用了X11的部分出现了重定义的问题。因此需要对头文件x1000.h进行更改把全局变量添加extern
#include X11/Xlib.h
#include X11/Xutil.h
#include X11/Xos.h
#include stdio.h
/* #include math.h */
#include x1000.icon
#define WINFRAC 2 /* x1k window fraction of largest window (1/WINFRAC)*/
#define MAXSTRLEN 256/* maximum length of a label */extern Display *display;
extern int screen;
extern GC gc;
extern XGCValues gcv;
extern XFontStruct *font_info;
extern XEvent report;
extern XSizeHints size_hints;
extern Window win;
extern Pixmap icon_pixmap ;
extern Pixmap clip_mask ;
extern XSetWindowAttributes setwinattr;
extern unsigned long valuemask;/* Definitions for defining the plotting area and the size of this area */extern float xvl, xvr, xvb, xvt ; /* Virtual corrdinates of the cornors of thearea for plot (left, right, bottom, top */
extern float xwl, xwr, xwb, xwt; /* World coordinates of the cornors of thevirtual area */
extern int Window_width; /* current width of window in pixels */
extern int Window_height; /* current height of window in pixels */
extern int curr_charsize[2]; /* current character size for actual font used width and height (pixels) */
extern int usr_charsize ; /* User character size in pixels */
extern int Curx; /* current x coord of cursor (viewport scale) */
extern int Cury; /* current y coord of cursor (viewport scale) *//* Current font style and info */extern float jcenter; /* Defines the centering to be used 0-1 for left through right justification */
extern float jheight; /* Justification in height for strings (0-1.0 for bottom to top justifcation */
extern int jor_tan; /* Defines orientation of baseline of the textstrings given as tan of angle */
extern int jzse; /* Current character size as specified by userwhich is different from current font size (pixels) */
extern int jdash; /* Current dash pattern (init to solid line)*/
extern int jwidth; /* Current width of lines (init to 1 pixel)*/extern int jclip ; /* Set to one to enable clipping, 0 for no clipping*/extern char font[MAXSTRLEN] ; /* Name of current font to be used */然后在check_window.c内定义相关变量
#include x1000.h
/* global variables */
Display *display;
int screen;
GC gc;
XGCValues gcv;
XFontStruct *font_info NULL;
XEvent report;
XSizeHints size_hints;
Window win;
Pixmap icon_pixmap;
Pixmap clip_mask;
XSetWindowAttributes setwinattr;
unsigned long valuemask 0;float xvl, xvr, xvb, xvt;
float xwl, xwr, xwb, xwt;
int Window_width;
int Window_height;
int curr_charsize[2];
int usr_charsize 0;
int Curx, Cury;float jcenter;
float jheight;
int jor_tan;
int jzse;
int jdash;
int jwidth;
int jclip;
char font[MAXSTRLEN];
/*以下代码不变*/然后正常执行./install_software即可。
GAMIT 不处理GPS L2C的小bug
现在编译没啥问题了之前还发现了一个小bug20250901这个更新里面并没有读取GPS的L2C的观测值在算项目数据时出现了这样的情况GPS双频观测值是L1C和L2C用LC_AUTCLN模式死活算不出来…
参考文献 GAMIT解算北斗三号新频点B1C、B2a数据 改代码的位置在gamit/lib/sel_obtyp.f第67行 附近添加载波相位观测值 if( gnsslf.eq.G5 ) then call fill_obtypx(2,L5 ,nobtyp,rxobtyp,iobtypx) call fill_obtypx(2,L5X,nobtyp,rxobtyp,iobtypx) call fill_obtypx(2,L5I,nobtyp,rxobtyp,iobtypx)call fill_obtypx(2,L5Q,nobtyp,rxobtyp,iobtypx)elsecall fill_obtypx(2,LC ,nobtyp,rxobtyp,iobtypx) call fill_obtypx(2,L2 ,nobtyp,rxobtyp,iobtypx)
c ADDcall fill_obtypx(2,L2C,nobtyp,rxobtyp,iobtypx) call fill_obtypx(2,L2X,nobtyp,rxobtyp,iobtypx)call fill_obtypx(2,L2L,nobtyp,rxobtyp,iobtypx)call fill_obtypx(2,L2Y,nobtyp,rxobtyp,iobtypx)call fill_obtypx(2,L2S,nobtyp,rxobtyp,iobtypx)call fill_obtypx(2,L2W,nobtyp,rxobtyp,iobtypx)endif和第98行附近添加伪距观测值 if( gnsslf.eq.G5 ) then call fill_obtypx(4,C5 ,nobtyp,rxobtyp,iobtypx)call fill_obtypx(4,C5X,nobtyp,rxobtyp,iobtypx)call fill_obtypx(4,C5I,nobtyp,rxobtyp,iobtypx)call fill_obtypx(4,C5Q,nobtyp,rxobtyp,iobtypx)else ! Default selectioncall fill_obtypx(4,CC ,nobtyp,rxobtyp,iobtypx)call fill_obtypx(4,C2 ,nobtyp,rxobtyp,iobtypx)call fill_obtypx(4,P2 ,nobtyp,rxobtyp,iobtypx)
c ADDcall fill_obtypx(4,C2C,nobtyp,rxobtyp,iobtypx)call fill_obtypx(4,C2X,nobtyp,rxobtyp,iobtypx)call fill_obtypx(4,C2L,nobtyp,rxobtyp,iobtypx)call fill_obtypx(4,C2Y,nobtyp,rxobtyp,iobtypx)call fill_obtypx(4,C2S,nobtyp,rxobtyp,iobtypx)call fill_obtypx(4,C2W,nobtyp,rxobtyp,iobtypx) 然后重新编译即可。