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 1 of 2)
  • 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

     
  • 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

     
  • 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

     
  • 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

     
1 2 > >> (Page 1 of 2)