linux学习--insight安装

本文详细介绍了在编译和安装Insight6.8时遇到的依赖包问题、代码错误及解决方法,包括修改源代码、安装rpm包等步骤,帮助用户顺利解决问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.依赖包:

Packages skipped because of dependency problems:
    wine-1.6.1-1.el6.rf.i686 from dag
    //wine-capi-1.6.1-1.el6.rf.i686 from dag
    //wine-cms-1.6.1-1.el6.rf.i686 from dag
   // wine-core-1.6.1-1.el6.rf.i686 from dag
    //wine-ldap-1.6.1-1.el6.rf.i686 from dag
    //wine-twain-1.6.1-1.el6.rf.i686 from dag
   // xorg-x11-apps-7.6-6.el6.i686 from base

1、首先下载insight 6.8-1(6.8的版本有点小问题),然后解压官方网站 http://sources.redhat.com/insight/index.php

  1. #tar xjvf insight-6.8-1.tar.bz2

进入insight-6-8-1目录,执行./configure命令

4. 在执行make命令,编译的时候会出现异常信息:

  1. cc1:warning being treated as errors   
  2. linux-nat.c: In function 'linux_nat_info_proc_cmd':   
  3. linux-nat.c:2879:error:ignoring return value of 'fgets',declared with attribute warn_unused_result  

查看gdb/linux-nat.c的函数'linux_nat_info_proc_cmd':

这是因为 该函数中调用的fgets方法,没有定义返回值。

源码如下:

  1. if ((procfile = fopen (fname1, "r")) != NULL)   
  2. {   
  3.     fgets (buffer, sizeof (buffer), procfile);   
  4.     printf_filtered ("cmdline = '%s'\n", buffer);   
  5.     fclose (procfile);   
  6. }  

修改后的代码:

  1. if ((procfile = fopen (fname1, "r")) != NULL)   
  2. {   
  3.   char * p=fgets (buffer, sizeof (buffer), procfile);   
  4.   printf_filtered ("cmdline = '%s'\n", buffer);   
  5.   fclose (procfile);   

如果这里直接开始编译,则会出现一个说tk.ctl文件找不到的错误:

Tk_Init failed: Can't find a usable tk.tcl in the following directories: 
    /usr/local/share/tk8.4 /usr/local/lib/tk8.4 /usr/lib/tk8.4 /usr/local/library /usr/library /usr/tk8.4.1/library /tk8.4.1/library

 

(1)修改insight-6.8/tk/generic/tk.h
将(line 653)
#define VirtualEvent (LASTEvent)
#define ActivateNotify (LASTEvent + 1)
#define DeactivateNotify (LASTEvent + 2)
#define MouseWheelEvent (LASTEvent + 3)
#define TK_LASTEVENT (LASTEvent + 4)
改为:
#define VirtualEvent (MappingNotify)
#define ActivateNotify (MappingNotify + 1)
#define DeactivateNotify (MappingNotify + 2)
#define MouseWheelEvent (MappingNotify + 3)
#define TK_LASTEVENT (MappingNotify + 4)
并将随后的#define TK_LASTEVENT (LASTEvent + 4)删除(line 661附近)
(2)修改insight-6.8/tk/generic/tkBind.c
在line 586和line 587之间增加------------语句  /* ClientMessage */        0,之后
#ifdef GenericEvent
0,
#endif


二:错误解决(这个是我千心万苦找到的废了我N多天的时间,希望能帮助大家。。。。。)
[查找的地址:http://kendrickchn.mobile.spaces.live.com/entry.aspx?h=cns!E7DBBF8A7BA3AC94!196&fp=%2farc.aspx]
(1)在编译make以后出现如下错误
eval.c: 在函数‘evaluate_subexp_standard’中:
eval.c:1705: 错误:此函数中的‘subscript_array’在使用前可能未初始化
make[2]: *** [eval.o] 错误 1
make[2]: Leaving directory `/root/下载/insight-6.8/gdb'
make[1]: *** [install-gdb] 错误 2
make[1]: Leaving directory `/root/下载/insight-6.8'
make: *** [install] 错误 2

(2)修改gdb/eval.c文件1644行

     int subscript_array[MAX_FORTRAN_DIMS] = {0};




安装rpm包时遇到error: Failed dependencies:错误 

rpm -ivh libstdc++5.0-3.3.3-62745cl.i386.rpm --nodeps --force

加上那两个参数的意义就在于,
安装时不再分析包之间的依赖关系而直接安装,
也就不会再提示error: Failed dependencies:这样的错误了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值