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/ 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! =) Next I try to make. g++-4 -DHAVE_CONFIG_H -I. -I../../../src/support -I../.. -I../../../src/support/.. -I../../../boost -DQT_NO_STL -DQT_NO_KEYWORDS -I/usr/local/qt/4.5.1//include -I/usr/local/qt/4.5.1//include/QtCore -pipe -O2 -MT os.lo -MD -MP -MF .deps/os.Tpo -c ../../../src/support/os.cpp -o os.o In file included from ../../../src/support/os.cpp:14: ../../../src/support/../support/os_cygwin.cpp: In function 'std::string lyx::support::os::<unnamed>::convert_path(const std::string&, const lyx::support::os::<unnamed>::PathStyle&)': ../../../src/support/../support/os_cygwin.cpp:70: error: 'PATH_MAX' was not declared in this scope ../../../src/support/../support/os_cygwin.cpp:76: error: 'path_buf' was not declared in this scope ../../../src/support/../support/os_cygwin.cpp: At global scope: ../../../src/support/../support/os_cygwin.cpp:125: error: explicit qualification in declaration of 'void lyx::support::os::init(int, char**)' make[5]: *** [os.lo] Error 1 make[5]: Leaving directory `/usr/local/src/lyx-1.6.2/build-cygwin/src/support' [...] To fix this, I modify /usr/local/src/lyx-1.6.2/src/support/os_cygwin.cpp 30a31,32 > #include <limits.h> > 125c127 < void os::init(int, char *[]) --- > void init(int, char *[]) When I re-run make, I encounter: g++-4 -DHAVE_CONFIG_H -I. -I../../../../src/frontends/qt4 -I../../.. -DQT_NO_STL -DQT_NO_KEYWORDS -DQT_NO_CAST_TO_ASCII -DQT_NO_STL -I../../../../src -I../../../../src/frontends -I../../../../images -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 -I../../../../boost -pipe -O2 -MT GuiAbout.lo -MD -MP -MF .deps/GuiAbout.Tpo -c ../../../../src/frontends/qt4/GuiAbout.cpp -o GuiAbout.o ../../../../src/frontends/qt4/GuiAbout.cpp:24:18: error: QtCore: No such file or directory ../../../../src/frontends/qt4/GuiAbout.cpp:25:17: error: QtGui: No such file or directory ../../../../src/frontends/qt4/GuiAbout.cpp: In function 'QString lyx::frontend::credits()': [and lots of errors from undefined stuff...] Now my ignorance and desperation become apparent, as I hack away at config.status to add the missing dependencies. 661c661 < S["QT4_INCLUDES"]="-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" --- > S["QT4_INCLUDES"]="-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 -I/usr/local/src/qtwin-4.5.1/include > -I/usr/local/src/qtwin-4.5.1/include/QtCore > -I/usr/local/src/qtwin-4.5.1/include/QtGui > -I/usr/local/src/qtwin-4.5.1/include/Qt" 666c666 < S["QT4_CORE_INCLUDES"]="-I/usr/local/qt/4.5.1//include -I/usr/local/qt/4.5.1//include/QtCore" --- > S["QT4_CORE_INCLUDES"]="-I/usr/local/qt/4.5.1//include > -I/usr/local/qt/4.5.1//include/QtCore -I/usr/local/src/qtwin-4.5.1/include > -I/usr/local/src/qtwin-4.5.1/include/QtCore" Trying once again, I encounter problems apparently related to missing X11 libraries: g++-4 -DHAVE_CONFIG_H -I. -I../../../../src/frontends/qt4 -I../../.. -DQT_NO_STL -DQT_NO_KEYWORDS -DQT_NO_CAST_TO_ASCII -DQT_NO_STL -I../../../../src -I../../../../src/frontends -I../../../../images -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 -I/usr/local/src/qtwin-4.5.1/include -I/usr/local/src/qtwin-4.5.1/include/QtCore -I/usr/local/src/qtwin-4.5.1/include/QtGui -I/usr/local/src/qtwin-4.5.1/include/Qt -I../../../../boost -pipe -O2 -MT GuiApplication.lo -MD -MP -MF .deps/GuiApplication.Tpo -c ../../../../src/frontends/qt4/GuiApplication.cpp -o GuiApplication.o ../../../../src/frontends/qt4/GuiApplication.cpp:98:23: error: X11/Xatom.h: No such file or directory ../../../../src/frontends/qt4/GuiApplication.cpp:99:22: error: X11/Xlib.h: No such file or directory ../../../../src/frontends/qt4/GuiApplication.cpp: In member function 'virtual bool lyx::frontend::GuiApplication::x11EventFilter(XEvent*)': [and many more related errors...] At this point, I give up hope. The wiki states, "X11 is not required", so I don't know what's going wrong. Any hints would be greatly appreciated. Thanks! -Ben