Software-Installation
如何安裝夾板?
我目前正在嘗試在本地的 openSUSE Leap 15.2 發行版中安裝 Splint(沒有 sudo 權限)。
我嘗試按照此處的說明進行操作:
在我的主目錄中:
git clone https://github.com/splintchecker/splint
之後我進入了
splint
目錄。下一條指令是執行configure
。但是沒有這樣的文件存在。按照這裡的建議,我跑了:autoreconf -i
接著:
./configure make
在這一點上,建構似乎是成功的。所以我嘗試跑步
splint
並收到一條command-not-found
消息。這裡的答案似乎建議執行
make install
,所以我接下來嘗試了,但無濟於事。還有其他一些我應該採取的步驟嗎?我是不是在什麼地方搞砸了?
編輯:
這是來自 的輸出
make
。輸出太長了,所以我截斷了它。(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'
這是來自的輸出
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
如果我在評論中包含的內容有效,那麼您需要將以下內容添加到您的 shell 初始化文件中。
如果
bash
.echo export PATH=/path/to/directory_of_splint:$PATH >> ~/.bashrc
如果
zsh
:echo export PATH=/path/to/directory_of_splint:$PATH >> ~/.zshrc
之後,使用以下任一方式獲取文件:
. ~/.bashrc . ~/.zshrc
之後,您可以執行該命令
splint
,因為二進製文件將通過PATH
. 之前它不起作用並且您必須在目錄中並使用./splint
or/path/to/directory/splint
的原因是因為它不是這就是您收到錯誤的原因。如果您執行我上麵包含的操作,它將在登錄時使用 shell 初始化文件,並且您可以從任何地方執行命令,而無需在其目錄中或必須指定二進製文件的完整路徑。