Install static source analysis tool Splint3.1.2 under Ubuntu 14.04

Source: Internet
Author: User
Tags ftp site automake

------------------------------------Copyright Information------------------------------------

This article links: Http://http://blog.csdn.net/doniexun

Author of this article: windness

Copyright Note: This article for the author through the retrieval of online resources and according to personal development experience, all the references have been marked at the end of the text, reproduced please be sure to retain this copyright information!

------------------------------------Copyright Information ------------------------------------


1. Installation File Preparation

1) Download Splint

Official homepage: http://www.splint.org

Download Link: http://www.splint.org/downloads/splint-3.1.2.src.tgz

Original Lclint source page: http://sourceforge.net/projects/lclint/

2) If tools such as FLEX/BISON/AUTOCONF/AUTOMAKE/M4 are not installed on the system, you will need to download the tools above.

# download Autoconf

FTP site: ftp://ftp.gnu.org/gnu/

Download Link: ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz (automake1.15 request autuconf2.65+)

# download Automake

HTTP site: http://ftp.gnu.org/gnu/

Download Link: http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz

# Download Bison

FTP site: ftp://ftp.gnu.org/gnu/

Download Link: ftp://ftp.gnu.org/gnu/bison/bison-3.0.2.tar.gz

# Download Flex

SOURCE Home: http://sourceforge.net/projects/flex/

Download Link: http://cznic.dl.sourceforge.net/project/flex/flex-2.5.39.tar.bz2

# download M4

HTTP site: http://ftp.gnu.org/gnu/

Download Link: http://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.gz


2. installation Process

1) M4

2) autoconf

3) Automake

4) Flex

5) Bison

6) Splint

which

1) can be used directly under the Terminal command: #./configure |    # Make | # sudo make install completes installation, the installation path defaults to:/usr/local/bin/***;

4) (in addition to 1) to install the installation steps, you can also directly use Ubuntu source for installation: sudo apt-get install flex bison

6) The installation steps are as follows:

A) decompression to any location, such as:/home/{user}/applications/directory, after decompression splint source path is:/home/{user}/applications/splint-3.1.2

Command: # TAR-ZXVF splint-3.1.2.src.tgz

B) Create the installation directory

Command: # sudo mkdir/usr/local/splint

C) Enter the splint directory after decompression

Command: # CD splint-3.1.2

D) Complete the configuration

Command: #./configure--prefix=/usr/local/splint

Note: If possible does not built splint in a directory under/usr/. If the test suite is run in a directory under/usr/for example/usr/src/, it'll report errors even if splint was built correctly.

E) Complete the compilation

Command: # Make

Note: If a yywarp error is found during compilation, enter the SRC directory under the root directory of the splint decompression, open the file cscanner.c, and add the following code after it:
int Yywrap ()
{
return 1;
}

Re-make.

F) Complete the installation

Command: # make install

G) Configuring the Environment

Command: # sudo vi ~/.BASHRC

Enter the following in the. bashrc file:

Export Larch_path=/usr/local/splint/share/splint/lib
Export Lclimportdir=/usr/local/splint/share/splint/import

Attention:

Larch_path-path to search for splint libraries and initializations files. If you is using the directories, this should is.: Base-directory/splint-3.1.2/lib.
Lclimportdir-directory containing LCL imports files. If you were using the directories, this is base-directory/splint-3.1.2/imports.

H) Make configuration effective

Command: # source ~/.BASHRC

I) Configure the environment variable (also follow steps g and H, the following background string is written to the ~/.BASHRC file, and again the source enable)

Command: # export Path=/usr/local/splint/bin: $PATH


So, splint is installed successfully!


3. References

1) Splint official website: http://www.splint.org/source.html

2) Splint compile and install http://blog.csdn.net/sunjiajiang/article/details/7368684

Install static source analysis tool Splint3.1.2 under Ubuntu 14.04

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.