Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#579 Compilation on Mac OSX 10.8

None
closed
nobody
None
5*
2012-12-03
2012-08-07
spieb
No

Hi,

i compiled TXS from SVN version 3103 on OSX 10.8 Mountain Lion with XCode 4.4 using qt and poppler from homebrew.
However i found out, that you need to patch some files in order to get it working:

  1. In debughelper.cpp you need to remove line 489: extern int LAST_POSSIBLE_TXS_ADDRESS;
    The "extern" keyword is C only and thus does not compile with c++. But as far as I could see this line is not required anyways
    since the variable isn't used in any other file at least it doesn't need to be external. Correct me if i'm wrong, but it worked that way.

  2. In texstudio.pro change the line 251 to:
    x86_64
    Also change line 253 and 254 to:

QMAKE_MAC_SDK = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk

QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.8

In the same file change line 490 to:

macx:LIBS += -framework QtTest

Then it worked for me. However a minor bug: the SVN version is not recognized for the about dialog, its just blank, but I didn't instantly understand how the version number is generated so i couldn't fix it.

Compiling this with qmake and then make created a debug version. Is there any way to change this to a release version?

Discussion

<< < 1 2 (Page 2 of 2)
  • spieb
    spieb
    2012-09-07

    Well, at least on one mac it works

     
  • Robert
    Robert
    2012-11-21

    Hi Chris. When I obtain the TXS SVN through an app such as SVNX on OSX, it does print the version in the about dialog:
    (TeXstudio 2.5.1 (SVN 3479M)
    Using Qt Version 4.8.3, compiled with Qt 4.8.3 R)

    On terminal, I use

    sudo sh build.sh CONFIG-=debug

    to obtain a release version.

     
  • Robert
    Robert
    2012-11-21

    I forgot to add that when I last compiled a debug version, I seem to recall all of the tests passed.

     
  • Robert
    Robert
    2012-11-21

    Here are my debug version (SVN 3484) Tests:
    * Start testing of SmallUsefulFunctionsTest *
    Config: Using QTest library 4.8.3, Qt 4.8.3
    PASS : SmallUsefulFunctionsTest::initTestCase()
    PASS : SmallUsefulFunctionsTest::nextToken_complex()
    PASS : SmallUsefulFunctionsTest::nextWordWithCommands_complex()
    PASS : SmallUsefulFunctionsTest::nextWord_complex()
    PASS : SmallUsefulFunctionsTest::nextTextWord_complex()
    PASS : SmallUsefulFunctionsTest::nextWord_simple()
    PASS : SmallUsefulFunctionsTest::cutComment_simple()
    PASS : SmallUsefulFunctionsTest::test_findContext()
    PASS : SmallUsefulFunctionsTest::test_findContext2()
    PASS : SmallUsefulFunctionsTest::test_findClosingBracket()
    PASS : SmallUsefulFunctionsTest::test_getCommand()
    PASS : SmallUsefulFunctionsTest::test_getSimplifiedSVNVersion()
    PASS : SmallUsefulFunctionsTest::test_minimalJsonParse()
    PASS : SmallUsefulFunctionsTest::test_enquoteDequoteString()
    PASS : SmallUsefulFunctionsTest::test_replaceFileExtension()
    PASS : SmallUsefulFunctionsTest::test_getParamItem()
    PASS : SmallUsefulFunctionsTest::cleanupTestCase()
    Totals: 17 passed, 0 failed, 0 skipped
    * Finished testing of SmallUsefulFunctionsTest *
    Time: 25 ms

    * Start testing of BuildManagerTest *
    Config: Using QTest library 4.8.3, Qt 4.8.3
    PASS : BuildManagerTest::initTestCase()
    PASS : BuildManagerTest::parseExtendedCommandLine()
    PASS : BuildManagerTest::expandCommandLine()
    PASS : BuildManagerTest::cleanupTestCase()
    Totals: 4 passed, 0 failed, 0 skipped
    * Finished testing of BuildManagerTest *
    Time: 10 ms

    * Start testing of CodeSnippetTest *
    Config: Using QTest library 4.8.3, Qt 4.8.3
    PASS : CodeSnippetTest::initTestCase()
    PASS : CodeSnippetTest::insert()
    PASS : CodeSnippetTest::nestedInsert()
    PASS : CodeSnippetTest::undoRedo()
    PASS : CodeSnippetTest::cleanupTestCase()
    Totals: 5 passed, 0 failed, 0 skipped
    * Finished testing of CodeSnippetTest *
    Time: 317 ms

    * Start testing of QDocumentLineTest *
    Config: Using QTest library 4.8.3, Qt 4.8.3
    PASS : QDocumentLineTest::initTestCase()
    PASS : QDocumentLineTest::updateWrap()
    PASS : QDocumentLineTest::cleanupTestCase()
    Totals: 3 passed, 0 failed, 0 skipped
    * Finished testing of QDocumentLineTest *
    Time: 6 ms

    * Start testing of QDocumentCursorTest *
    Config: Using QTest library 4.8.3, Qt 4.8.3
    PASS : QDocumentCursorTest::initTestCase()
    PASS : QDocumentCursorTest::constMethods()
    PASS : QDocumentCursorTest::const2Methods()
    PASS : QDocumentCursorTest::subtractBoundaries()
    PASS : QDocumentCursorTest::cleanupTestCase()
    Totals: 5 passed, 0 failed, 0 skipped
    * Finished testing of QDocumentCursorTest *
    Time: 18 ms

    * Start testing of QDocumentSearchTest *
    Config: Using QTest library 4.8.3, Qt 4.8.3
    PASS : QDocumentSearchTest::initTestCase()
    PASS : QDocumentSearchTest::next_sameText()
    PASS : QDocumentSearchTest::replaceAll()
    PASS : QDocumentSearchTest::searchAndFolding()
    PASS : QDocumentSearchTest::cleanupTestCase()
    Totals: 5 passed, 0 failed, 0 skipped
    * Finished testing of QDocumentSearchTest *
    Time: 591 ms

    * Start testing of QSearchReplacePanelTest *
    Config: Using QTest library 4.8.3, Qt 4.8.3
    PASS : QSearchReplacePanelTest::initTestCase()
    PASS : QSearchReplacePanelTest::incrementalsearch()
    PASS : QSearchReplacePanelTest::findNext()
    PASS : QSearchReplacePanelTest::findReplace()
    PASS : QSearchReplacePanelTest::findReplaceSpecialCase()
    PASS : QSearchReplacePanelTest::findSpecialCase2()
    PASS : QSearchReplacePanelTest::selectionHighlighting()
    PASS : QSearchReplacePanelTest::cleanupTestCase()
    Totals: 8 passed, 0 failed, 0 skipped
    * Finished testing of QSearchReplacePanelTest *
    Time: 2013 ms

    * Start testing of QEditorTest *
    Config: Using QTest library 4.8.3, Qt 4.8.3
    PASS : QEditorTest::initTestCase()
    PASS : QEditorTest::setText()
    PASS : QEditorTest::loadSave()
    PASS : QEditorTest::foldedText()
    PASS : QEditorTest::passiveFolding()
    PASS : QEditorTest::activeFolding()
    PASS : QEditorTest::indentation()
    PASS : QEditorTest::autoClosing()
    PASS : QEditorTest::cleanupTestCase()
    Totals: 9 passed, 0 failed, 0 skipped
    * Finished testing of QEditorTest *
    Time: 618 ms

    * Start testing of LatexEditorViewTest *
    Config: Using QTest library 4.8.3, Qt 4.8.3
    PASS : LatexEditorViewTest::initTestCase()
    PASS : LatexEditorViewTest::insertHardLineBreaks()
    PASS : LatexEditorViewTest::cleanupTestCase()
    Totals: 3 passed, 0 failed, 0 skipped
    * Finished testing of LatexEditorViewTest *
    Time: 167 ms

    * Start testing of LatexCompleterTest *
    Config: Using QTest library 4.8.3, Qt 4.8.3
    PASS : LatexCompleterTest::initTestCase()
    PASS : LatexCompleterTest::simple()
    PASS : LatexCompleterTest::cleanupTestCase()
    Totals: 3 passed, 0 failed, 0 skipped
    * Finished testing of LatexCompleterTest *
    Time: 1781 ms

    * Start testing of ScriptEngineTest *
    Config: Using QTest library 4.8.3, Qt 4.8.3
    PASS : ScriptEngineTest::initTestCase()
    PASS : ScriptEngineTest::script()
    PASS : ScriptEngineTest::cleanupTestCase()
    Totals: 3 passed, 0 failed, 0 skipped
    * Finished testing of ScriptEngineTest *
    Time: 185 ms

    * Start testing of LatexEditorViewBenchmark *
    Config: Using QTest library 4.8.3, Qt 4.8.3
    PASS : LatexEditorViewBenchmark::initTestCase()
    RESULT : LatexEditorViewBenchmark::documentChange():"one line update":
    0.086 msecs per iteration (total: 89, iterations: 1024)
    RESULT : LatexEditorViewBenchmark::documentChange():"multi line update":
    0.10 msecs per iteration (total: 54, iterations: 512)
    RESULT : LatexEditorViewBenchmark::documentChange():"long line update":
    0.21 msecs per iteration (total: 56, iterations: 256)
    RESULT : LatexEditorViewBenchmark::documentChange():"labels":
    0.15 msecs per iteration (total: 80, iterations: 512)
    RESULT : LatexEditorViewBenchmark::documentChange():"refs":
    0.10 msecs per iteration (total: 56, iterations: 512)
    RESULT : LatexEditorViewBenchmark::documentChange():"no spellcheck in command":
    0.090 msecs per iteration (total: 93, iterations: 1024)
    RESULT : LatexEditorViewBenchmark::documentChange():"spellcheck in command":
    0.10 msecs per iteration (total: 53, iterations: 512)
    PASS : LatexEditorViewBenchmark::documentChange()
    RESULT : LatexEditorViewBenchmark::linePaint():"one line update":
    0.18 msecs per iteration (total: 94, iterations: 512)
    RESULT : LatexEditorViewBenchmark::linePaint():"correct german":
    0.14 msecs per iteration (total: 72, iterations: 512)
    RESULT : LatexEditorViewBenchmark::linePaint():"long line update":
    2.5 msecs per iteration (total: 83, iterations: 32)
    RESULT : LatexEditorViewBenchmark::linePaint():"labels":
    0.60 msecs per iteration (total: 77, iterations: 128)
    RESULT : LatexEditorViewBenchmark::linePaint():"refs":
    0.53 msecs per iteration (total: 69, iterations: 128)
    RESULT : LatexEditorViewBenchmark::linePaint():"no spellcheck in command":
    0.27 msecs per iteration (total: 70, iterations: 256)
    RESULT : LatexEditorViewBenchmark::linePaint():"spellcheck in command":
    0.72 msecs per iteration (total: 93, iterations: 128)
    PASS : LatexEditorViewBenchmark::linePaint()
    RESULT : LatexEditorViewBenchmark::paintEvent():"one line update":
    0.0037 msecs per iteration (total: 61, iterations: 16384)
    RESULT : LatexEditorViewBenchmark::paintEvent():"correct german":
    0.0037 msecs per iteration (total: 61, iterations: 16384)
    RESULT : LatexEditorViewBenchmark::paintEvent():"long line update":
    0.0037 msecs per iteration (total: 62, iterations: 16384)
    RESULT : LatexEditorViewBenchmark::paintEvent():"labels":
    0.0037 msecs per iteration (total: 62, iterations: 16384)
    RESULT : LatexEditorViewBenchmark::paintEvent():"refs":
    0.0038 msecs per iteration (total: 63, iterations: 16384)
    RESULT : LatexEditorViewBenchmark::paintEvent():"no spellcheck in command":
    0.0038 msecs per iteration (total: 63, iterations: 16384)
    RESULT : LatexEditorViewBenchmark::paintEvent():"spellcheck in command":
    0.0038 msecs per iteration (total: 63, iterations: 16384)
    PASS : LatexEditorViewBenchmark::paintEvent()
    PASS : LatexEditorViewBenchmark::cleanupTestCase()
    Totals: 5 passed, 0 failed, 0 skipped
    * Finished testing of LatexEditorViewBenchmark *
    Time: 7266 ms

    * Start testing of StructureViewTest *
    Config: Using QTest library 4.8.3, Qt 4.8.3
    PASS : StructureViewTest::initTestCase()
    PASS : StructureViewTest::script()
    RESULT : StructureViewTest::benchmark():"single line text":
    0.15 msecs per iteration (total: 80, iterations: 512)
    RESULT : StructureViewTest::benchmark():"labels1":
    0.26 msecs per iteration (total: 68, iterations: 256)
    RESULT : StructureViewTest::benchmark():"labels2":
    0.25 msecs per iteration (total: 66, iterations: 256)
    RESULT : StructureViewTest::benchmark():"labels3":
    0.26 msecs per iteration (total: 67, iterations: 256)
    RESULT : StructureViewTest::benchmark():"sections":
    0.22 msecs per iteration (total: 57, iterations: 256)
    RESULT : StructureViewTest::benchmark():"sections with many children":
    0.28 msecs per iteration (total: 73, iterations: 256)
    PASS : StructureViewTest::benchmark()
    PASS : StructureViewTest::cleanupTestCase()
    Totals: 4 passed, 0 failed, 0 skipped
    * Finished testing of StructureViewTest *
    Time: 2406 ms

    * Start testing of TableManipulationTest *
    Config: Using QTest library 4.8.3, Qt 4.8.3
    PASS : TableManipulationTest::initTestCase()
    PASS : TableManipulationTest::splitColDef()
    PASS : TableManipulationTest::simplifyColDef()
    PASS : TableManipulationTest::addCol()
    PASS : TableManipulationTest::addRow()
    PASS : TableManipulationTest::remCol()
    PASS : TableManipulationTest::remRow()
    PASS : TableManipulationTest::getCol()
    PASS : TableManipulationTest::getNumberOfCol()
    PASS : TableManipulationTest::findNextToken()
    PASS : TableManipulationTest::findNextTokenBackwards()
    PASS : TableManipulationTest::addHLine()
    PASS : TableManipulationTest::splitCol()
    PASS : TableManipulationTest::getDef()
    PASS : TableManipulationTest::parseTableLine()
    PASS : TableManipulationTest::cleanupTestCase()
    Totals: 16 passed, 0 failed, 0 skipped
    * Finished testing of TableManipulationTest *
    Time: 319 ms

    * Start testing of SyntaxCheckTest *
    Config: Using QTest library 4.8.3, Qt 4.8.3
    PASS : SyntaxCheckTest::initTestCase()
    PASS : SyntaxCheckTest::checktabular()
    PASS : SyntaxCheckTest::cleanupTestCase()
    Totals: 3 passed, 0 failed, 0 skipped
    * Finished testing of SyntaxCheckTest *
    Time: 1135 ms

    * Start testing of UpdateCheckerTest *
    Config: Using QTest library 4.8.3, Qt 4.8.3
    PASS : UpdateCheckerTest::initTestCase()
    PASS : UpdateCheckerTest::versionCompare()
    PASS : UpdateCheckerTest::getLatestVersion()
    PASS : UpdateCheckerTest::cleanupTestCase()
    Totals: 4 passed, 0 failed, 0 skipped
    * Finished testing of UpdateCheckerTest *
    Time: 212 ms

    Total testing time: 17069 ms

     
  • spieb
    spieb
    2012-11-28

    Yeah, I don't know why this is still open, it has been working for a while. The debug tests fail every once in a while depending on the version, but since I could't experience any issues I just ignored it.
    Maybe I forgot to post the solution to the SVN number problem: My SVN GUI used svn client v1.7, however for the command line the standard was still v1.6. These versions are not downwards compatible.

     
  • Tim Hoffmann
    Tim Hoffmann
    2012-12-03

    • status: open --> closed
    • milestone: -->
    • priority: 5 --> 5*
     
<< < 1 2 (Page 2 of 2)