Linux script for checking most configurations build

86 views
Skip to first unread message

Neil Hodgson

unread,
May 27, 2012, 7:37:14 AM5/27/12
to scintilla...@googlegroups.com
With the inclusion of Qt targets within Scintilla, its become a bit more of a chore to ensure that there is no decay in the ability to build. There are also some differences in how the code builds for GTK+ versions 2.x and 3.x. On Windows there is scite/scripts/checkbuilds.bat although that is somewhat difficult for others to use - it has to swap between different versions of the same compiler so is tied to how those compilers are installed on my machines.

For Linux, there is a new script scite/scripts/checkbuildlinux.sh which will build for GTK+ 2 and 3 and Qt. Qt is built with gcc and for GTK+, Scintilla and SciTE are built with both gcc and clang. For GTK+ 2, clang's static analyzer may also be run although that is commented out currently as there are some warnings from the Lua code in SciTE and the static analyzer is run as if it is a compiler so there are errors at link time.

Quite often when developing, I'll run checkbuilds.bat to ensure everything still builds - if there are any errors or warnings in the output then something has changed for the worse. This will now be possible on Linux but that requires there be 0 warnings. For PySide and when running clang there were a few warnings which have now been disabled.

For PySide, the warnings occurred in PySide generated code and in PySide headers included by that code. There is no Scintilla code earlier in which to add warning suppressions. Therefore, I changed scintilla/qt/ScintillaEditPy/ScintillaEditPy.pro to add -Wno-unused-parameter -Wno-empty-body to all compiles on non-Mac Unix. Perhaps the Qt users may know of a better way to achieve this.

For clang, most distributions provide version 3.0 which produces a false positive about missing sentinel values in calls when NULL is used as the sentinel. There is now a clang only warning suppression for this in scintilla/gtk/PlatGTK.cxx, scintilla/gtk/ScintillaGTK.cxx and scite/gtk/SciTEGTK.cxx. This is no longer needed on OS X which installs a newer version of clang and will not be needed once Linux distributions upgrade to clang 3.1.

On Windows there are two sets of unit tests, some lower level tests written in C++ using Google Test and some tests using the public Scintilla API written in Python. Both these are run by checkbuilds.bat. The C++ tests (in scintilla/test/unit) worked on Linux at one stage but Google Test has become harder to install - it used to just be a simple apt-get. If anyone is interested in this issue, it would help to find a simple procedure to allow installing Google Test and running the tests within checkbuildlinux.sh.

It would also be great to be able to run API tests using Python on Linux. While the Scintilla interface layer in scintilla/test/XiteWin.py is highly Windows-specific, now that the Qt PySide binding is distributed with Scintilla, it should be possible to build a similar test application with PySide and then reuse the tests in the scintilla/test directory. Anyone sick of coping with regressions should find this a worthwhile project.

There is no check script on OS X yet so that is another area people may want to work on. I don't know if its possible to run all Apple's tools from the command line.

Neil

Noli Sicad

unread,
Nov 15, 2012, 7:16:31 PM11/15/12
to scintilla...@googlegroups.com, nyama...@me.com


On Sunday, 27 May 2012 21:37:14 UTC+10, Neil Hodgson wrote:

   There is no check script on OS X yet so that is another area people may want to work on. I don't know if its possible to run all Apple's tools from the command line.

   Neil

Hi Neil.

I modified your checkbuildlinux.sh script and run in Mac OS X. It removed the gtk entries.

It runs but with errors (below).

Noli
~~~~~
Nolis-MacBook-Pro:scripts nsicad$ ls
CheckMentioned.py    checkbuildMacOSX.sh    commandsdoc.py
CheckPropsDoc.py    checkbuildlinux.sh    makerpms.py
IFaceTableGen.py    checkbuildlinux2.sh    scite.spec
ba            checkbuilds.bat        tags2api.py
ba.bat            clearboth.bat

Nolis-MacBook-Pro:scripts nsicad$ sh checkbuildMacOSX.sh
make: *** No rule to make target `clean'.  Stop.
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `distclean'.  Stop.
make: *** No rule to make target `clean'.  Stop.
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `distclean'.  Stop.
/usr/bin/shiboken --generator-set=shiboken global.h  --avoid-protected-hack --enable-pyside-extensions --include-paths=/usr/include:/usr/include/QtCore:/usr/include/QtGui:.:../ScintillaEdit:../ScintillaEditBase:../../include:/usr/include/shiboken:/usr/include/PySide:/usr/include/PySide/QtCore:/usr/include/PySide/QtGui --typesystem-paths=/usr/share/PySide/typesystems --output-directory=. typesystem_ScintillaEdit.xml
./QtCore.framework/Headers/qglobal.h
/usr/include/QtCore.framework/Headers/qglobal.h
/usr/include/QtCore/QtCore.framework/Headers/qglobal.h
/usr/include/QtGui/QtCore.framework/Headers/qglobal.h
./QtCore.framework/Headers/qglobal.h
../ScintillaEdit/QtCore.framework/Headers/qglobal.h
../ScintillaEditBase/QtCore.framework/Headers/qglobal.h
../../include/QtCore.framework/Headers/qglobal.h
/usr/include/shiboken/QtCore.framework/Headers/qglobal.h
/usr/include/PySide/QtCore.framework/Headers/qglobal.h
/usr/include/PySide/QtCore/QtCore.framework/Headers/qglobal.h
/usr/include/PySide/QtGui/QtCore.framework/Headers/qglobal.h
/usr/include/QtCore.framework/Headers/qglobal.h
./QtCore.framework/Headers/qiodevice.h
/usr/include/QtCore.framework/Headers/qiodevice.h
/usr/include/QtCore/QtCore.framework/Headers/qiodevice.h
/usr/include/QtGui/QtCore.framework/Headers/qiodevice.h
./QtCore.framework/Headers/qiodevice.h
../ScintillaEdit/QtCore.framework/Headers/qiodevice.h
../ScintillaEditBase/QtCore.framework/Headers/qiodevice.h
../../include/QtCore.framework/Headers/qiodevice.h
/usr/include/shiboken/QtCore.framework/Headers/qiodevice.h
/usr/include/PySide/QtCore.framework/Headers/qiodevice.h
/usr/include/PySide/QtCore/QtCore.framework/Headers/qiodevice.h
/usr/include/PySide/QtGui/QtCore.framework/Headers/qiodevice.h
/usr/include/QtCore.framework/Headers/qiodevice.h
./QtCore.framework/Headers/qstring.h
.
.
.
Done, 161 warnings (1014 known issues)
qmake -spec macx-g++
make
g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -fPIC -DSCINTILLA_QT=1 -DMAKING_LIBRARY=1 -DSCI_LEXER=1 -D_CRT_SECURE_NO_DEPRECATE=1 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Qt4.8/mkspecs/macx-g++ -I. -I/Library/Frameworks/QtCore.framework/Versions/4/Headers -I/usr/include/QtCore -I/Library/Frameworks/QtGui.framework/Versions/4/Headers -I/usr/include/QtGui -I/usr/include -I../ScintillaEdit -I../ScintillaEditBase -I../../include -I../../lexlib -I../../src -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/usr/include/shiboken -I/usr/include/PySide -I/usr/include/PySide/QtCore -I/usr/include/PySide/QtGui -I. -F/Library/Frameworks -o scintillaeditpy_module_wrapper.o ScintillaEditPy/scintillaeditpy_module_wrapper.cpp
g++: error: unrecognized command line option '-Xarch_x86_64'
make: *** [scintillaeditpy_module_wrapper.o] Error 1
Failed in make  return code = 2
make distclean
rm -f moc_ScintillaEdit.cpp moc_ScintillaDocument.cpp moc_ScintillaQt.cpp moc_ScintillaEditBase.cpp
rm -f scintillaeditpy_module_wrapper.o sci_notifyheader_wrapper.o scnotification_wrapper.o scintillaeditbase_wrapper.o scintillaedit_wrapper.o scintilladocument_wrapper.o ScintillaEdit.o ScintillaDocument.o PlatQt.o ScintillaQt.o ScintillaEditBase.o AutoComplete.o CallTip.o Catalogue.o CellBuffer.o CharClassify.o ContractionState.o Decoration.o Document.o Editor.o ExternalLexer.o Indicator.o KeyMap.o LineMarker.o PerLine.o PositionCache.o RESearch.o RunStyles.o ScintillaBase.o Selection.o Style.o UniConversion.o ViewStyle.o XPM.o Accessor.o CharacterSet.o LexerBase.o LexerModule.o LexerNoExceptions.o LexerSimple.o PropSetSimple.o StyleContext.o WordList.o LexA68k.o LexAbaqus.o LexAda.o LexAPDL.o LexAsm.o LexAsn1.o LexASY.o LexAU3.o LexAVE.o LexAVS.o LexBaan.o LexBash.o LexBasic.o LexBullant.o LexCaml.o LexCLW.o LexCmake.o LexCOBOL.o LexCoffeeScript.o LexConf.o LexCPP.o LexCrontab.o LexCsound.o LexCSS.o LexD.o LexECL.o LexEiffel.o LexErlang.o LexEScript.o LexFlagship.o LexForth.o LexFortran.o LexGAP.o LexGui4Cli.o LexHaskell.o LexHTML.o LexInno.o LexKix.o LexLisp.o LexLout.o LexLua.o LexMagik.o LexMarkdown.o LexMatlab.o LexMetapost.o LexMMIXAL.o LexModula.o LexMPT.o LexMSSQL.o LexMySQL.o LexNimrod.o LexNsis.o LexOpal.o LexOScript.o LexOthers.o LexPascal.o LexPB.o LexPerl.o LexPLM.o LexPO.o LexPOV.o LexPowerPro.o LexPowerShell.o LexProgress.o LexPS.o LexPython.o LexR.o LexRebol.o LexRuby.o LexScriptol.o LexSmalltalk.o LexSML.o LexSorcus.o LexSpecman.o LexSpice.o LexSQL.o LexTACL.o LexTADS3.o LexTAL.o LexTCL.o LexTCMD.o LexTeX.o LexTxt2tags.o LexVB.o LexVerilog.o LexVHDL.o LexVisualProlog.o LexYAML.o moc_ScintillaEdit.o moc_ScintillaDocument.o moc_ScintillaQt.o moc_ScintillaEditBase.o
rm -f *~ core *.core
rm -f ../../bin/libScintillaEditPy.3.2.3.dylib
rm -f ../../bin/libScintillaEditPy.dylib ../../bin/libScintillaEditPy.3.dylib ../../bin/libScintillaEditPy.3.2.dylib ../../bin/libScintillaEditPy.a
rm -f Makefile
Nolis-MacBook-Pro:scripts nsicad$

Neil Hodgson

unread,
Nov 21, 2012, 2:47:20 PM11/21/12
to scintilla...@googlegroups.com
 Noli Sicad wrote:

I modified your checkbuildlinux.sh script and run in Mac OS X. It removed the gtk entries.

It runs but with errors (below).

   I can't examine something detailed like this until I return from vacation. iPads don't run Xcode yet.

g++: error: unrecognized command line option '-Xarch_x86_64'

    Looks like a g++ version issue or a gcc versus clang issue. Potential architecture names should include x86_64.

    Googling the error message yields

    Neil
Reply all
Reply to author
Forward
0 new messages