Install Insight6.8.1 on Ubuntu

Source: Internet
Author: User
1. insighthttp: // response

1. insight http://sourceware.org/insight/downloads.php

2. decompress the package to Ubuntu. The decompressed directory is as follows:

/Home/haowei/Downloads/insights-6.8-1

3. Go to the insight-6-8-1 directory and run the./configure command.

4. When executing the make command, an exception occurs during compilation:

  1. C0: warning being treated as errors
  2. Linux-nat.c: In function'Linux _ nat_info_proc_cmd':
  3. Linux-nat.c: 2879: error: ignoringReturnValue'Fgets', Declared with attribute warn_unused_result

View the gdb/linux-nat.c function 'linux _ nat_info_proc_cmd ':

This is because the fgets method called in this function does not define the return value.

The source code is as follows:

  1. If(Procfile = fopen (fname1,"R"))! = NULL)
  2. {
  3. Fgets (buffer,Sizeof(Buffer), procfile );
  4. Printf_filtered ("Required line = '% s' \ n", Buffer );
  5. Fclose (procfile );
  6. }

Modified code:

  1. If(Procfile = fopen (fname1,"R"))! = NULL)
  2. {
  3. Char* P = fgets (buffer, sizeof (buffer), procfile );
  4. Printf_filtered ("Required line = '% s' \ n", Buffer );
  5. Fclose (procfile );
  6. }

There are several similar errors involved: write, getcwd, dup...

The specific file will be prompted when you execute make.

You can call these methods to define a return value during modification:

Int p = write (....);

Char * p = getcwd (....);

Int p = dup (...);

Note that the definitions of these variables should be placed at the beginning of the function.

There is also a gdb/eval. c class. The code compilation error is as follows:

IntSubscript_array [MAX_FORTRAN_DIMS];

This array is not initialized. You can initialize this array and compile it as follows:

  1. If(Nargs> MAX_FORTRAN_DIMS)
  2. Error (_("Too upload subscripts for F77 (% d Max )"), MAX_FORTRAN_DIMS );
  3. Memset (& subscript_array,0, Sizeof (subscript_array ));

5. After executing make, run sudo make install to complete the installation.

Appendix. This is what insight runs after I compile the program:

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.