On Mon, May 18, 2009 at 04:55:55PM -0400, Ben M. wrote: > Greetings! > > I'm trying to compile LyX 1.6.2 on Cygwin using the instructions at > http://wiki.lyx.org/LyX/LyXOnCygwin > with the eventual goal of compiling the lyx-devel branch. > > I encountered several difficulties, and was hoping someone could help > me out. I'm using a fresh install of Cygwin, with gcc4-g++ 4.3.2-2. > > Qt builds fine. However, when I run the qt-copy-includes script, the > following commands fail since Cygwin doesn't by default come with an > /opt directory. > cp -p include/QtCore/QtCore /opt/qt4/include/QtCore/ > cp -p include/QtGui/QtGui /opt/qt4/include/QtGui/
Sorry, my fault. Replace "/opt/qt4" with "$dest" above and re-run the script. Those two lines should have read: cp -p include/QtCore/QtCore $dest/include/QtCore/ cp -p include/QtGui/QtGui $dest/include/QtGui/ I have updated the script on the wiki. > My first major problem is that lyxconfig-cygwin reports qt4 is not > found. The problem in config.log is: > configure:26131: checking for Qt 4 library name > configure:26180: g++-4 -o conftest.exe -O2 > -I/usr/local/qt/4.5.1//include -I/usr/local/qt/4.5.1//include/Qt > -I/usr/local/qt/4.5.1//include/QtCore > -I/usr/local/qt/4.5.1//include/QtGui -L/usr/local/qt/4.5.1//lib -pipe > -L/usr/local/lib -shared-libgcc -Wl,-enable-stdcall-fixup > -Wl,-enable-auto-import -Wl,-s conftest.cpp -lgdi32 -liconv -lz > -lQtCore >&5 > /usr/local/qt/4.5.1//lib/libQtCore.a(qbytearray.o):qbytearray.cpp:(.text+0x2417): > undefined reference to `_uncompress' > /usr/local/qt/4.5.1//lib/libQtCore.a(qbytearray.o):qbytearray.cpp:(.text+0x3a7b): > undefined reference to `_compress2' > collect2: ld returned 1 exit status > > For some reason, it's not finding zlib, even though -lz is right > before -lQtCore. However, it works when -lz comes *after* -lQtCore. > So I modified /usr/local/src/lyx-1.6.2/configure > 26146c26146 > < for libname in -lQtCore -lQtCore4 > --- > > for libname in "-lQtCore -lz" -lQtCore4 > 26214c26214 > < for libname in '-lQtCore -lQtGui' \ > --- > > for libname in '-lQtCore -lQtGui -lz' \ > > Now it configures! =) You should not touch the configure script. Please, report the output of the following 3 commands: pkg-config --version env PKG_CONFIG_PATH=/usr/local/qt/4.5.1/lib/pkgconfig pkg-config --cflags QtCore env PKG_CONFIG_PATH=/usr/local/qt/4.5.1/lib/pkgconfig pkg-config --libs QtCore and then we will work out the remaining problems. -- Enrico