Compling LyX

Angus Leeming leeming at lyx.org
Mon May 9 22:27:54 CEST 2005


Michael Schmitt wrote:

> Hi Christian,
> 
> two comments on Angus' reply:
> 
> I suggest using LyX 1.3 for testing purposes. This version is solid rock
> software and in 99.9% of all cases you can assume that a drawing problem
> is indeed a problem of your Qt library.

It's also much quicker to build LyX 1.3 than LyX 1.4 which makes much
heavier use of templates.

> I rather doubt that LyX 1.3 can be compiled with MSVC.

No it can't. I didn't have the energy or desire to create a 4000 file
project. Apparently it's possible to use the free MSVC command line
compiler together with the 'usual' msys command line approach, but it
requires a unix-savvy wrapper for the MSVC compiler that I never bothered
trying to set up.

> However, I have created a short document that describes how 
> to generate a LyX binary with MinGW in reasonable time. 
> For debugging purposes, you can ignore the aspell part (step 4)
> as well as the LyX docs (step 5.2). 
> 
> As Angus pointed out, linking takes endlessly with MinGW - unless you
> use a static version of the Qt library. The latter results in reasonable
> link time, although MSVC is certainly faster.

Here's Michael's static-lyx HOWTO. Note that I hope to commit code in the
next day of so that will render this step redundant:
    5.3.3 Enter
        patch -p0 < development/Win32/win32_kludge.diff

In this step, Michael is removing -DQT_DLL from the data passed to the
compiler:
    5.3.4 Edit file ./config/qt.m4: Remove line 204
    (i.e., remove MinGW support - don't laugh)

My xconfig wrapper (also attached) for configure achieves both of these
'fixes' automatically, although you probably won't want to pass all those
cross-compilation tools to configure :)

Building lyx 1.3.x from scratch on a 2.7GHz machine using the mingw
cross-compiler takes:
    $ time make
    real    65m49.856s
    user    47m1.162s
    sys     2m56.194s

Personally, I build the Windows executable to use the qt .dll, so linking
takes about 10 minutes, as opposed to about 1 minute for Michael's linking
against the static qt lib. For comparison, building the same code using
the native linux g++ 3.4 takes:
    $ time make
    real    22m27.623s
    user    18m51.923s
    sys     2m2.299s

> If you need more assistance: Let me know! (Send email directly to
> michael.schmitt (at) teststep (dot) org)
> 
> Regards, Michael

Angus
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: LyX-MinGW-Instructions.txt
Url: http://mail.kde.org/pipermail/kde-cygwin/attachments/20050509/504a7e98/LyX-MinGW-Instructions.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xconfig
Type: application/x-shellscript
Size: 2515 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-cygwin/attachments/20050509/504a7e98/xconfig.bin


More information about the kde-cygwin mailing list