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