In regards to the WinXP build problem reported earlier 
(See http://bugzilla.lyx.org/show_bug.cgi?id=260 for details),
I have some more info.

It looks like "ld -r" used by ``libtool --mode=link'' just does not
work on Cygwin.

Since I managed to build the latest CVS after some work, I thought
I would share the procedure (and a small patch) in the hopes that
someone who understands the build process (Lars) will go ahead and
fix this for Cygwin.

1) Apply the small patch (attached). This patch is safe. Please apply
   to CVS.

2) ./autogen.sh; ./configure; make dist

3) unpack the newly created lyx-1.2.0cvs.tar.gz and do

   ./configure; make

   The make fails when trying to make libmathed.o

4) Add the following to src/Makefile (right before the all: rule)

   AM_MAKEFLAGS='CXXLINK=arhack $$@'

   where arhack is the following shell script:

   ========================================
   #!/bin/sh

   archive=$1; shift

   args=""

   while [ $# -ne 0 ]
   do
       f=$1; shift
       f=`echo $f | sed 's/\.lo$/.o/'`
       args="$args $f"
   done

   ar ru $archive $args
   ranlib $archive
   ========================================

4) make

   This time, the make fails at the final link phase for lyx.exe.

   Now, comment out the AM_MAKEFLAGS line and "make"

   You now have a working lyx.

5) make install

Anyways... Please apply this patch.

-- 
Kayvan A. Sylvan          | Proud husband of       | Father to my kids:
Sylvan Associates, Inc.   | Laura Isabella Sylvan  | Katherine Yelena (8/8/89)
http://sylvan.com/~kayvan | "crown of her husband" | Robin Gregory (2/28/92)
Index: ChangeLog
===================================================================
RCS file: /cvs/lyx/lyx-devel/ChangeLog,v
retrieving revision 1.824
diff -u -u -r1.824 ChangeLog
--- ChangeLog   2002/03/14 14:03:54     1.824
+++ ChangeLog   2002/03/14 21:27:29
@@ -1,3 +1,8 @@
+2002-03-14  Kayvan A. Sylvan  <[EMAIL PROTECTED]>
+
+       * configure.in: Fix order of -lXpm and -lforms for
+       Cygwin linker.
+
 2002-03-14  Michael A. Koziarski  <[EMAIL PROTECTED]>
 
        * configure.in: First stage of fixing the gnome compile problems.
Index: configure.in
===================================================================
RCS file: /cvs/lyx/lyx-devel/configure.in,v
retrieving revision 1.98
diff -u -u -r1.98 configure.in
--- configure.in        2002/03/14 14:03:54     1.98
+++ configure.in        2002/03/14 21:27:29
@@ -191,7 +191,7 @@
        FRONTEND="xforms"
        FRONTEND_GUILIB="xforms/*.lo"
        FRONTEND_INCLUDES="-I\$(srcdir)/xforms"
-       FRONTEND_LIBS="@XPM_LIB@ @XFORMS_LIB@"
+       FRONTEND_LIBS="@XFORMS_LIB@ @XPM_LIB@"
        FRONTEND_INFO=`cat <<EOF
     libXpm version:               ${XPM_VERSION}\n\
     libforms version:             ${XFORMS_VERSION}\n
Index: src/ChangeLog
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/ChangeLog,v
retrieving revision 1.626
diff -u -u -r1.626 ChangeLog
--- src/ChangeLog       2002/03/14 15:28:43     1.626
+++ src/ChangeLog       2002/03/14 21:27:30
@@ -1,3 +1,8 @@
+2002-03-14  Kayvan A. Sylvan  <[EMAIL PROTECTED]>
+
+       * Makefile.am (lyx_DEPENDENCIES): Swap the order of libfrontend
+       and libgraphics to build on Cygwin.
+
 2002-03-14  Juergen Vigna  <[EMAIL PROTECTED]>
 
        * undo_funcs.C (textHandleUndo): do the right thing when updating
Index: src/Makefile.am
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/Makefile.am,v
retrieving revision 1.114
diff -u -u -r1.114 Makefile.am
--- src/Makefile.am     2002/03/13 18:24:43     1.114
+++ src/Makefile.am     2002/03/14 21:27:30
@@ -9,8 +9,8 @@
 bin_PROGRAMS = lyx
 
 lyx_DEPENDENCIES = mathed/libmathed.o insets/libinsets.o \
-       graphics/libgraphics.o \
        frontends/libfrontends.o \
+       graphics/libgraphics.o \
        support/libsupport.o \
        @INCLUDED_SIGC@
 

Attachment: msg34435/pgp00000.pgp
Description: PGP signature

Reply via email to