Re: Compling LyX
Angus Leeming <[email protected]>
| Newsgroups | gmane.comp.kde.devel.cygwin |
|---|---|
| Message-ID | <[email protected]> |
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
_______________________________________________
kde-cygwin mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-cygwin
LyX-MinGW-Instructions.txt
(text/plain, 3.6 KB)
1 MinGW & MSYS
1.1 Download the following packages from http://www.mingw.org/download.shtml:
MinGW-3.2.0-rc-3.exe
binutils-2.15.94-20050118-1.tar.gz
MSYS-1.0.11-2004.04.30-1.exe
msysDTK-1.0.1.exe
1.2 Installation
1.2.1 Install MinGW-3.2.0-rc-3.exe in C:\MinGW
1.2.2 Install MSYS-1.0.11-2004.04.30-1.exe in C:\msys
1.2.3 Install msysDTK-1.0.1 in C:\msys
1.2.4 Extract binutils-2.15.94-20050118-1.tar.gz in C:\MinGW
(i.e., overwrite the existing binutils)
2. Gettext & Libiconv
2.1 Download the following packages from http://www.gnu.org/software/gettext/gettext.html:
gettext-tools-0.13.1.bin.woe32.zip
gettext-runtime-0.13.1.bin.woe32.zip
libiconv-1.9.1.bin.woe32.zip
2.2 Extract the three packages in C:\MinGW
3 QT3/Windows Free Edition
3.1 Get the latest CVS version
Open the MSYS window/bash. In your home directory, enter
cvs -d :pserver:[email protected]:/cvsroot/kde-cygwin login
<return> (no password)
cvs -z3 -d :pserver:[email protected]:/cvsroot/kde-cygwin co \
-r QT_WIN32_3_3_BRANCH qt-3
3.2 Compile a static (!) QT library (dynamic linking with MinGW causes nightmares!)
Run "cmd.exe" (i.e., open Window command line). Go to your MSYS home directory
and enter
set QTDIR=C:\MSYS\home\username\qt-3
set MINGW=C:\MinGW
set PATH=%QTDIR%\bin;%MINGW%\bin;%PATH%
set QMAKESPEC=win32-g++
configure.bat -release -static
4. Aspell
4.1 Download Aspell Version 0.50.5, i.e., file aspell-0.50.5.tar.gz,
from http://aspell.sourceforge.net/ (note: version 0.60.2 did not compile)
4.2 Compilation:
4.2.1 Extract aspell-0.50.5.tar.gz in your MSYS home directory and
enter directory aspell-0.50.5,
4.2.2 Enter
./configure --enable-static --disable-shared --prefix=/usr/local
4.2.3 Edit file ./examples/Makefile: Change line 84 to
CC = g++
Change line 175 to
INCLUDES = -I${top_srcdir}/interfaces/cc (i.e., strip trailing slash)
4.2.4 Edit file ./prog/Makefile: Change lines 190-192 to
INCLUDES = -I${top_srcdir}/common\
-I${top_srcdir}/interfaces/cc \
-I${top_srcdir}/modules/speller/default \
(strip trailing slashes)
4.2.5 Enter
make
4.3 Installation: Enter
make install
5. LyX
5.1 Get the latest CVS version
Open the MSYS window/bash. In your home directory, enter
export CVSROOT=:pserver:[email protected]:/cvs/lyx
cvs login
lyx
cvs checkout -r BRANCH_1_3_X -d lyx-devel-1.3.X lyx-devel
5.2 Get the latest CVS docs
cd lyx-devel-1.3.X/lib
cvs checkout -r BRANCH_1_3_X lyxdoc
mv doc/*.in lyxdoc
rm -f -r doc
mv lyxdoc doc
5.3 Compilation:
5.3.1 Enter directory "lyx-devel-1.3.X"
5.3.2 Enter
export LDFLAGS="-L/home/username/qt-3/lib -lqtmain -lqt-mt -lgdi32 -lole32 -luuid -lwsock32 -lcomdlg32"
5.3.3 Enter
patch -p0 < development/Win32/win32_kludge.diff
5.3.4 Edit file ./config/qt.m4: Remove line 204 (i.e., remove MinGW support - don't laugh)
5.3.5 Enter
./autogen.sh
5.3.6 Edit file ./configure: Change line 12613 to
ac_link='$CXX -o conftest$ac_exeext conftest.$ac_ext $CXXFLAGS $CPPFLAGS $LDFLAGS $LIBS >&5'
(i.e., move conftest.$ac_ext in front of CXXFLAGS)
5.3.7 Enter
./configure --without-x --with-pspell --with-extra-prefix=/mingw --with-frontend=qt --disable-maintainer-mode --disable-debug --enable-optimization --with-version-suffix --with-qt-dir=/home/username/qt-3 --prefix=/c/Programme/LyX
5.3.8 Enter
make
5.4 Installation: Enter
make install
xconfig
(application/x-shellscript, 2.5 KB) - not displayed