#579 Compilation on Mac OSX 10.8

None
closed
nobody
None
5*
2015-02-10
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

  • spieb

    spieb - 2012-08-07

    About the svn version number not been generated:
    It could well be, that I don't have the svn command line tools installed, i have to check that later.

     
  • spieb

    spieb - 2012-08-07

    By the way, i can provide my binary if there is a need for that. I just need some way to upload the file

     
  • Benito van der Zander

    since the variable isn't used in any other file at least it doesn't need to be external.
    It's not really a variable, but some strange symbol defined by the
    linker containing the size of the executable

    macx:LIBS += -framework QtTest

    ...

    Compiling this with qmake and then make created a debug version. Is there any way to change this to a release version?
    You could compile a debug version without QtTest?
    Does it run any tests? If not, it is a mix between debug and release.

    "make release" works sometimes.

    Or pass something like CONFIG-=debug CONFIG-=debug_and_release
    CONFIG+=release to qmake or BUILD.sh to be sure

    By the way, i can provide my binary if there is a need for that. I just
    need some way to upload the file
    That would be nice, you can send it per mail

    On 08/07/2012 09:58 AM, SourceForge.net wrote:

    Bugs

     
  • Tim Hoffmann

    Tim Hoffmann - 2012-08-07

    On windows I have to use
    CONFIG+=release
    and
    make release

     
  • spieb

    spieb - 2012-08-08

    Ok, now i can build both, debug and release version.

    The debug version ran all the tests the first time I opened it. As always those latexcompleter tests failed, like on any other system. BTW: is there any log file or a chance to restart the tests?

    About QtTest: that was a typo, I didn't want to add the comment sign in the beginning, just macx:LIBS += -framework QtTest

    The svn version number also works now, it turned out that my command line svn didn't support svn 1.7, but the working copy was created v1.7

     
  • Tim Hoffmann

    Tim Hoffmann - 2012-08-08

    There are command line options:
    --disable-tests Prevent running any tests.
    --execute-tests Force running the most common tests.
    --execute-all-tests Force running all tests.
    Note: The most common tests are run automatically, if there were changes to the executable (TXS has been compiled since the last run). Furthermore all tests are run one a week.

    I have also added the above to the user manual.

    Which completer tests failed?

     
  • spieb

    spieb - 2012-08-09

    In Ubuntu 12.04 this tests fails:
    * Start testing of LatexCompleterTest *
    Config: Using QTest library 4.8.1, Qt 4.8.1
    PASS : LatexCompleterTest::initTestCase()
    FAIL! : LatexCompleterTest::simple(simple) '(ist)==(text)' returned FALSE. (equal failed: got ">>\abstractname<<" !=expected ">>\abstractname{}<<" )

    In Win7 this test fails as well:
    * Start testing of LatexCompleterTest *
    Config: Using QTest library 4.8.1, Qt 4.8.1
    PASS : LatexCompleterTest::initTestCase()
    FAIL! : LatexCompleterTest::simple(simple) '(ist)==(text)' returned FALSE. (equal failed: got ">>\abstract<<" !=expected ">>\abstractname{}<<" )

    but in Win 7 also get this error
    QSYSTEM: LatexEditorViewBenchmark::documentChange(no spellcheck in command) QEventDispatcherWin32::registerTimer: Failed to create a timer (Der aktuelle Prozess verwendet alle Handles der zul?ssigen H?chstanzahl f?r Window Managerobjekte.)

    On OSX 10.8 this test fails:
    * Start testing of LatexCompleterTest *
    Config: Using QTest library 4.8.2, Qt 4.8.2
    PASS : LatexCompleterTest::initTestCase()
    FAIL! : LatexCompleterTest::simple(begin -eowc+pc) '(ist)==(text)' returned FALSE. (equal failed: got ">>\beg{mui muo\% mua muip abc %def ghi ijk
    }<<" !=expected ">>\beg{}<<" )
    Loc: [tests/latexcompleter_t.cpp(284)]
    FAIL! : LatexCompleterTest::simple(begin multiple {{%1) '(ist)==(text)' returned FALSE. (equal failed: got ">>\beg{mui muo\% mua muip abc %def ghi ijk
    }<<" !=expected ">>\beg{}<<" )
    Loc: [tests/latexcompleter_t.cpp(284)]

    So its always something about the LatexCompleterTest

     
  • Benito van der Zander

    The unit tests should be fixed now, as well

     
  • spieb

    spieb - 2012-08-30

    On Linux and Windows i still get the same error messages. On OSX I receive a new error message:
    * Start testing of LatexCompleterTest *
    Config: Using QTest library 4.8.2, Qt 4.8.2
    PASS : LatexCompleterTest::initTestCase()
    FAIL! : LatexCompleterTest::simple(simple) '(ist)==(text)' returned FALSE. (equal failed: got ">>\abstractname<<" !=expected ">>\abstractname{}<<" )
    Loc: [tests/latexcompleter_t.cpp(286)]
    FAIL! : LatexCompleterTest::simple(begin) '(ist)==(text)' returned FALSE. (equal failed: got ">>\begin{addmargin<<" !=expected ">>\begin{align<<" )
    Loc: [tests/latexcompleter_t.cpp(286)]
    FAIL! : LatexCompleterTest::simple(begin +pc) '(ist)==(text)' returned FALSE. (equal failed: got ">>\begin{addmargin<<" !=expected ">>\begin{align<<" )
    Loc: [tests/latexcompleter_t.cpp(286)]
    FAIL! : LatexCompleterTest::simple(begin multiple {{ +ec0) '(ist)==(text)' returned FALSE. (equal failed: got ">>\begin{addmargin}{<<" !=expected ">>\begin{alignat}{<<" )
    Loc: [tests/latexcompleter_t.cpp(286)]
    FAIL! : LatexCompleterTest::simple(begin multiple {{ +ec1) '(ist)==(text)' returned FALSE. (equal failed: got ">>\begin{addmargin}{<<" !=expected ">>\begin{alignat}{<<" )
    Loc: [tests/latexcompleter_t.cpp(286)]
    PASS : LatexCompleterTest::cleanupTestCase()
    Totals: 2 passed, 5 failed, 0 skipped
    * Finished testing of LatexCompleterTest *
    Time: 2672 ms

     
  • Benito van der Zander

    Do you have some completion files selected?

    The test will probably work, if they are disabled

    On 08/30/2012 10:24 PM, SourceForge.net wrote:

    Bugs

     
  • 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*
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks