0

I'm currently trying to install Splint in an openSUSE Leap 15.2 distro locally (without sudo privileges).

I tried to follow the instructions here:

In my home directory:

git clone https://github.com/splintchecker/splint

I entered the splint directory after that. The next instruction was to run configure. But there was no such file present. Following the suggestion here, I ran:

autoreconf -i

And then:

./configure
make

At this point, the build appeared to be a success. So I tried running splint and got a command-not-found message.

The answer here seemed to suggest running make install, so I tried that next, but to no avail.

Are there some other steps I should take? Did I mess up somewhere?

Edit:

Here is the output from make. The output was too long so I have truncated it.

(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/styx/splint/config-aŭ/missing autoheader)
rm -f stamp-h1
touch config.h.in
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make  all-recursive
make[1]: Entering directory '/home/styx/splint'
Making all in src
make[2]: Entering directory '/home/styx/splint/src'
bison -v -t -d --debug --no-lines -p lsl signature.y
signature.tab.h generated
cat bison.head signature.tab.h bison.reset >signature_gen.h
bison -v -t -d --debug --no-lines cgrammar.y
cgrammar.y: warning: 159 shift/reduce conflicts [-Wconflicts-sr]
cgrammar.y: warning: 123 reduce/reduce conflicts [-Wconflicts-rr]
*      Note: Expect 159 shift/reduce conflicts and 123 reduce/reduce conflicts. (see cgrammar.y for explanation)
cgrammar.tab.h generated
cat bison.head cgrammar.tab.h bison.reset | /usr/bin/sed 's/YYSTYPE/cgrammar_YYSTYPE/g' | /usr/bin/sed 's/lsllex/cgrammar_lsllex/g' >cgrammar_tokens.h
bison -v -t -d --debug --no-lines -p yl llgrammar.y
llgrammar.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr]
*       Note: Expect 2 shift/reduce conflicts
llgrammar.tab.h generated
cat bison.head llgrammar.tab.h bison.reset >llgrammar_gen.h
bison -v -t -d --debug --no-lines -p mt mtgrammar.y
mtgrammar.y: warning: 11 shift/reduce conflicts [-Wconflicts-sr]
*       Note: Expect 11 shift/reduce conflicts.
mtgrammar.tab.h generated
cat bison.head mtgrammar.tab.h bison.reset >mtgrammar_tokens.h
flex -L -o cscanner.lex.c cscanner.l
cat flex.head cscanner.lex.c flex.reset | /usr/bin/sed 's/YYSTYPE/cgrammar_YYSTYPE/g'  | /usr/bin/sed 's/lsllex/cgrammar_lsllex/g' >cscanner.c
cat bison.head cgrammar.tab.c bison.reset | /usr/bin/sed 's/YYSTYPE/cgrammar_YYSTYPE/g' | /usr/bin/sed 's/lsllex/cgrammar_lsllex/g' >cgrammar.c
cat bison.head mtgrammar.tab.c bison.reset >mtgrammar.c
cat bison.head llgrammar.tab.c bison.reset >llgrammar.c
cat bison.head signature.tab.c bison.reset >signature.c
/usr/bin/grep "FLG_" flags.def >flag_codes.gen
make  all-am
make[3]: Entering directory '/home/styx/splint/src'
gcc -DHAVE_CONFIG_H -I. -I..  -I./Headers -I.   -g -O2 -MT cscanner.o -MD -MP -MF .deps/cscanner.Tpo -c -o cscanner.o cscanner.c
mv -f .deps/cscanner.Tpo .deps/cscanner.Po
...
...
...
gcc -DHAVE_CONFIG_H -I. -I..  -I./Headers -I.   -g -O2 -MT lsymbol.o -MD -MP -MF .deps/lsymbol.Tpo -c -o lsymbol.o lsymbol.c
mv -f .deps/lsymbol.Tpo .deps/lsymbol.Po
gcc -DHAVE_CONFIG_H -I. -I..  -I./Headers -I.   -g -O2 -MT mapping.o -MD -MP -MF .deps/mapping.Tpo -c -o mapping.o mapping.c
mv -f .deps/mapping.Tpo .deps/mapping.Po
gcc  -g -O2   -o splint cscanner.o cgrammar.o mtgrammar.o llgrammar.o signature.o cppmain.o cpplib.o cppexp.o cpphash.o cpperror.o context.o uentry.o cprim.o macrocache.o qual.o qtype.o stateClause.o stateClauseList.o ctype.o cvar.o clabstract.o idDecl.o clause.o globalsClause.o modifiesClause.o warnClause.o functionClause.o functionClauseList.o metaStateConstraint.o metaStateConstraintList.o metaStateExpression.o metaStateSpecifier.o functionConstraint.o pointers.o cscannerHelp.o structNames.o transferChecks.o varKinds.o nameChecks.o exprData.o cstring.o fileloc.o message.o inputStream.o fileTable.o cstringTable.o valueTable.o stateValue.o llerror.o messageLog.o flagMarker.o aliasTable.o ynm.o sRefTable.o genericTable.o ekind.o usymtab.o multiVal.o lltok.o sRef.o lcllib.o randomNumbers.o fileLib.o globals.o flags.o general.o osd.o reader.o mtreader.o clauseStack.o filelocStack.o cstringList.o cstringSList.o sRefSetList.o ctypeList.o enumNameList.o enumNameSList.o exprNodeList.o exprNodeSList.o uentryList.o fileIdList.o filelocList.o qualList.o sRefList.o flagMarkerList.o idDeclList.o flagSpec.o globSet.o intSet.o typeIdSet.o guardSet.o usymIdSet.o sRefSet.o mtscanner.o stateInfo.o stateCombinationTable.o metaStateTable.o metaStateInfo.o annotationTable.o annotationInfo.o mttok.o mtDeclarationNode.o mtDeclarationPieces.o mtDeclarationPiece.o mtContextNode.o mtValuesNode.o mtDefaultsNode.o mtAnnotationsNode.o mtMergeNode.o mtAnnotationList.o mtAnnotationDecl.o mtTransferClauseList.o mtTransferClause.o mtTransferAction.o mtLoseReferenceList.o mtLoseReference.o mtDefaultsDeclList.o mtDefaultsDecl.o mtMergeItem.o mtMergeClause.o mtMergeClauseList.o exprNode.o exprChecks.o llmain.o help.o rcfiles.o constraintList.o constraintResolve.o constraintGeneration.o constraintTerm.o constraintExprData.o constraintExpr.o constraint.o loopHeuristics.o  lsymbolSet.o sigNodeSet.o lslOpSet.o sortSet.o initDeclNodeList.o sortList.o declaratorInvNodeList.o interfaceNodeList.o sortSetList.o declaratorNodeList.o letDeclNodeList.o stDeclNodeList.o storeRefNodeList.o lslOpList.o lsymbolList.o termNodeList.o ltokenList.o traitRefNodeList.o pairNodeList.o typeNameNodeList.o fcnNodeList.o paramNodeList.o programNodeList.o varDeclarationNodeList.o varNodeList.o quantifierNodeList.o replaceNodeList.o importNodeList.o tokentable.o scan.o scanline.o lslparse.o lh.o checking.o lclctypes.o imports.o lslinit.o syntable.o usymtab_interface.o abstract.o ltoken.o lclscanline.o lclsyntable.o lcltokentable.o sort.o symtable.o lclinit.o shift.o lclscan.o lsymbol.o mapping.o -lfl
make[3]: Leaving directory '/home/styx/splint/src'
make[2]: Leaving directory '/home/styx/splint/src'
Making all in lib
make[2]: Entering directory '/home/styx/splint/lib'
../src/splint -nof -nolib +impconj standard.h -dump standard
Splint 3.1.2 --- 05 Mar 2022

Finished checking --- no warnings
../src/splint -nof -nolib +impconj -DSTRICT standard.h -dump standardstrict
Splint 3.1.2 --- 05 Mar 2022

Finished checking --- no warnings
../src/splint -nof -nolib +impconj standard.h posix.h -dump posix
Splint 3.1.2 --- 05 Mar 2022

Finished checking --- no warnings
../src/splint -nof -nolib +impconj -DSTRICT standard.h posix.h -dump posixstrict
Splint 3.1.2 --- 05 Mar 2022

Finished checking --- no warnings
../src/splint -supcounts -nof -incondefs -nolib +impconj standard.h posix.h unix.h stdio.h stdlib.h -dump unix
Splint 3.1.2 --- 05 Mar 2022

Finished checking --- no warnings
../src/splint -supcounts -nof -incondefs -nolib +impconj -DSTRICT standard.h posix.h unix.h stdio.h stdlib.h -dump unixstrict
Splint 3.1.2 --- 05 Mar 2022

Finished checking --- no warnings
make[2]: Leaving directory '/home/styx/splint/lib'
Making all in imports
make[2]: Entering directory '/home/styx/splint/imports'
LARCH_PATH="../lib:../lib" ../src/splint stdlib.lcl
Splint 3.1.2 --- 05 Mar 2022

Finished checking --- no code processed
LARCH_PATH="../lib:../lib" ../src/splint assert.lcl
Splint 3.1.2 --- 05 Mar 2022

Finished checking --- no code processed
LARCH_PATH="../lib:../lib" ../src/splint ctype.lcl
Splint 3.1.2 --- 05 Mar 2022

Finished checking --- no code processed
LARCH_PATH="../lib:../lib" ../src/splint errno.lcl
Splint 3.1.2 --- 05 Mar 2022

Finished checking --- no code processed
LARCH_PATH="../lib:../lib" ../src/splint limits.lcl
Splint 3.1.2 --- 05 Mar 2022

Finished checking --- no code processed
LARCH_PATH="../lib:../lib" ../src/splint locale.lcl
Splint 3.1.2 --- 05 Mar 2022

Finished checking --- no code processed
LARCH_PATH="../lib:../lib" ../src/splint math.lcl
Splint 3.1.2 --- 05 Mar 2022

Finished checking --- no code processed
LARCH_PATH="../lib:../lib" ../src/splint setjmp.lcl
Splint 3.1.2 --- 05 Mar 2022

Finished checking --- no code processed
LARCH_PATH="../lib:../lib" ../src/splint signal.lcl
Splint 3.1.2 --- 05 Mar 2022

Finished checking --- no code processed
LARCH_PATH="../lib:../lib" ../src/splint stdarg.lcl
Splint 3.1.2 --- 05 Mar 2022

Finished checking --- no code processed
LARCH_PATH="../lib:../lib" ../src/splint stdio.lcl
Splint 3.1.2 --- 05 Mar 2022

Finished checking --- no code processed
LARCH_PATH="../lib:../lib" ../src/splint string.lcl
Splint 3.1.2 --- 05 Mar 2022

Finished checking --- no code processed
LARCH_PATH="../lib:../lib" ../src/splint strings.lcl
Splint 3.1.2 --- 05 Mar 2022

Finished checking --- no code processed
LARCH_PATH="../lib:../lib" ../src/splint time.lcl
Splint 3.1.2 --- 05 Mar 2022

Finished checking --- no code processed
make[2]: Leaving directory '/home/styx/splint/imports'
Making all in doc
make[2]: Entering directory '/home/styx/splint/doc'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/styx/splint/doc'
Making all in test
make[2]: Entering directory '/home/styx/splint/test'
Use make check to run the test suite
make[2]: Leaving directory '/home/styx/splint/test'
make[2]: Entering directory '/home/styx/splint'
make[2]: Leaving directory '/home/styx/splint'
make[1]: Leaving directory '/home/styx/splint'

Here is the output from make install:

Making install in src
make[1]: Entering directory '/home/styx/splint/src'
make  install-am
make[2]: Entering directory '/home/styx/splint/src'
make[3]: Entering directory '/home/styx/splint/src'
 /usr/bin/mkdir -p '/usr/local/bin'
  /usr/bin/install -c splint '/usr/local/bin'
/usr/bin/install: cannot create regular file '/usr/local/bin/splint': Permission denied
make[3]: *** [Makefile:628: install-binPROGRAMS] Error 1
make[3]: Leaving directory '/home/styx/splint/src'
make[2]: *** [Makefile:976: install-am] Error 2
make[2]: Leaving directory '/home/styx/splint/src'
make[1]: *** [Makefile:970: install] Error 2
make[1]: Leaving directory '/home/styx/splint/src'
make: *** [Makefile:374: install-recursive] Error 1
6
  • 2
    I assume when you ran make install there was output of some sort? That might be able to tell you what went wrong…
    – jsbillings
    Mar 5, 2022 at 12:57
  • @jsbillings I have added the output from make and make install. Looking at near the end of the output of make, it appears that Splint got installed, but trying to use splint gives a command-not-found message. make install appears to have failed because it does not have write permission in the usr directory.
    – Off Kilter
    Mar 5, 2022 at 13:48
  • What is the exact command that you used to launch splint? Mar 5, 2022 at 14:54
  • @NasirRiley I tried both splint and splint filename.c. This is how I usually use Splint in a Mint distro where I installed Splint via apt-get
    – Off Kilter
    Mar 5, 2022 at 15:03
  • Does it work if you run it from the directory where the sprint binary is located with the command ./splint or with /path/to/directory/splint? Mar 5, 2022 at 17:06

2 Answers 2

1

If what I included in my comment works, then you'll need to add the following to your shell init file.

If bash.

echo export PATH=/path/to/directory_of_splint:$PATH >> ~/.bashrc

If zsh:

echo export PATH=/path/to/directory_of_splint:$PATH >> ~/.zshrc

Afterwards, source the file with either of the following:

. ~/.bashrc

. ~/.zshrc

After that, you can just run the command splint because the binary will be in your environment via the PATH. The reason that it didn't work before and you had to be in the directory and use ./splint or /path/to/directory/splint is because it wasn't which is why you were receiving the error.

If you do what I've included above, the it will be available at login with the shell init file is sourced and you can run the command from wherever without having to be in its directory or having to specify the full path to the binary.

1

You can install splint through zypper:

zypper addrepo https://download.opensuse.org/repositories/openSUSE:Leap:15.2/standard/openSUSE:Leap:15.2.repo
zypper refresh
zypper install splint

splint from openSUSE:Leap:15.2 project

1
  • 1
    This is indeed the best way to do it. It is just that I don't have root privileges. Hence, I'm trying to build from source.
    – Off Kilter
    Mar 5, 2022 at 13:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .