Install the Insight Debugger in Ubuntu source code

Source: Internet
Author: User
1. Dependency package installation sudoapt-getbuild-depgdbsudoapt-getinstalltktcllibx11-devxinit2. Known compilation error handling linux-nat.c: 2879: error: ignoringreturnvalueof 'fgets', declaredwithattributewarn_unused_result mainly because of definition

1. Install the dependent Software Package
Sudo apt-get build-dep gdb
Sudo apt-get install tk tcl libx11-dev xinit

2. Known compilation error handling
Linux-nat.c: 2879: error: ignoring return value of 'fgets', declared with attribute warn_unused_result
The main reason is that _ attribute _ (warn_unused_result) is defined, because the compilation option indicates that the function does not return any value as an error and exits.
(1) You can modify the code and add a returned value for receiving:
Old Code
Fgets (buffer, MAXPATHLEN, procfile );
The solution is:
Char * temp_p = fgets (buffer, MAXPATHLEN, procfile );
There are several other similar problems, basically all of which are gdb problems. Just solve them as needed, so I will not talk about them one by one.
(2) block this option:
Go to the insight-6.8-1/gdb directory, and open the Makefile. in File www.linuxidc.com to search for-Werror.
Old Code
WERROR_CFLAGS =-Werror
New Code
WERROR_CFLAGS = #-Werror

3. Download, compile, and install
(1). Download: wget ftp://sourceware.org/pub/insight/releases/insight-6.8-1a.tar.bz2
(2). Unzip: bizp2-d insight-6.8-1a.tar.bz2; tar xvf insight-6.8-1a.tar
(3). installation:
Mkdir $ HOME/install
Cd $ HOME/insight-6.8-1
Mkdir build
Cd build
../Configure -- prefix = $ HOME/install
Make

Make install

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.