Hi all,

Apologies for the length of what follows.  I had problems getting the 
Ruurd's latest port (1.3.3) to reconfigure on a Windows XP system, and I 
was wondering if anyone else had the same problem.  On my system, if I do 
Edit | Reconfigure, textclass.lst gets clobbered and LyX subsequently 
refuses to start.

I've narrowed down the where but not the why.  This is different from the 
sed version problem previously identified.  If I run the configure script 
from inside LyX (Edit | Reconfigure), the textclass.lst file comes out 0 
bytes long.  If I run the configure script from outside LyX, using the 
shell utilities included in Ruurd's port (other than sed, which I've 
replaced with the Cygwin version), textclass.lst has the usual five 
comment lines at the top but nothing else (in particular, no layouts).  
Either case causes LyX to decline to start when next called.  If I run 
the configure script outside LyX using the Cygwin command utilities, 
everything is fine.

I pinned down the problem to the following lines in configure:

  for file in ./layouts/*.layout ${srcdir}/layouts/*.layout ; do
    case $file in
      */\*.layout) ;;
      *) test -r "$file" && echo $file ;;
    esac
  done | sed -e 's%^.*layouts/\(.*\)\.layout$%\\TestDocClass{\1}%'\
             > chklayouts.tex
 
What happens (when not using Cygwin) is that the list of layout files is 
echoed correctly but passes through sed unchanged.  As a result, 
chklayouts.tex ends up with a lot of lines looking like

../share/lyx/layouts/IEEEtran.layout

which causes latex massive indigestion when it tries to run chkconfig.ltx 
(which \includes chklayouts.tex).

I modified the script to echo the $file names to a temp file named junk, 
and then (in a separate script) tried

type junk | sed -e 's%^.*layouts/\(.*\)\.layout$%\\TestDocClass{\1}%'

That works as expected if I run it with Cygwin's sh.exe and echos junk 
unmodified using Ruurd's copy of sh.exe.

I didn't see this pathology in the prior version of Ruurd's port, and I 
don't know why I'm seeing it now.  For those of us with Cygwin, the only 
workaround I can find is to run the configure script outside of LyX using 
the Cygwin utilities.  Things that don't work:

1.  Trying to force the Cygwin bin directory ahead of the LyX bin 
directory on the path.  Ruurd apparently prepends LyX\bin from inside LyX 
(check the path in the DOS window when you try Edit | Reconfigure).

2.  Hiding/removing the sh.exe utility and replacing it with the Cygwin 
copy.  This causes failures later in the script.  (Note that replacing 
sed.exe with the Cygwin version does work, although it doesn't cure the 
current problem.)

3.  Hiding/removing all the shell utilities and replacing them with the 
Cygwin versions.  The path C:\<LyX home>\bin\sh.exe is apparently hard-
coded in Ruurd's port, so you have to put the Cygwin sh.exe in the LyX 
bin directory.  I tried this, and Edit | Reconfigure immediately gave an 
error "Illegal option --", so I gave up on it.

If you don't have Cygwin, I have no suggestions.

Is it just me, or are others having this problem?

-- Paul

*************************************************************************
Paul A. Rubin                                  Phone:    (517) 432-3509
Department of Management                       Fax:      (517) 432-1111
The Eli Broad Graduate School of Management    E-mail:   [EMAIL PROTECTED]
Michigan State University                      http://www.msu.edu/~rubin/
East Lansing, MI  48824-1122  (USA)
*************************************************************************
Mathematicians are like Frenchmen:  whenever you say something to them,
they translate it into their own language, and at once it is something
entirely different.                                    J. W. v. GOETHE

Reply via email to