delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/09/20/01:20:55

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <12791093.post@talk.nabble.com>
Date: Wed, 19 Sep 2007 22:20:27 -0700 (PDT)
From: lent <chrislent AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: RE: Cygwin Installation Problems on Windows Vista (gnuplot.sh and install-info)
In-Reply-To: <12786663.post@talk.nabble.com>
MIME-Version: 1.0
X-Nabble-From: chrislent AT gmail DOT com
References: <96c450350704071826qe3e5f5di80b7dd4375619f38 AT mail DOT gmail DOT com> <96c450350704071900s7c559797pcdde0542636db9b8 AT mail DOT gmail DOT com> <12780123 DOT post AT talk DOT nabble DOT com> <006701c7fad4$a0835200$2e08a8c0 AT CAM DOT ARTIMI DOT COM> <12786663 DOT post AT talk DOT nabble DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Hi, 

Please point out if I'm wrong or misinformed...

I'm trying to trace down the Vista cygwin setup.exe
/etc/postinstall/gnuplot.sh "hang forever at 99%" problem.

The current /etc/postinstall/gnuplot.sh contains the line:

/usr/bin/install-info --dir-file=/usr/share/info/dir
--info-file=/usr/share/info/gnuplot.info.gz

From Googling about, the install-info part seems to be the part of the shell
scripts that is hanging.

The install-info command is supposed to insert the "info" format information
about gnuplot into the indexing file "/usr/share/info/dir".  The "info"
format stuff is basically plain text with ^_'s ('\x1F' characters) as
section markers and ^? (DEL) as field separators in the index at the end of
the "info" file. The file is GZIP'd, to save space.  The gnuplot.info.gz
gunzip's fine on my XP machine, so a corrupt distribution file seems
unlikely.

So perhaps the problem is the "install-info.exe" program banging into some
Vista difference.

The "install-info.exe" program seems to be "texinfo" package, as shown by:

http://cygwin.com/cgi-bin2/package-grep.cgi?grep=install-info.exe

which yields:

http://cygwin.com/cgi-bin2/package-cat.cgi?file=texinfo%2Ftexinfo-4.8a-1&grep=install-info.exe

This seems to imply that the package version is something like "texinfo
4.8a-1".

Installing the source for the "texinfo 4.8a-1" , we find the file:
/usr/src/texinfo-4.8a-1/util/install-info.c
See Lines 604-643 at end of this post:

My guess is that the popen is not working right. 
Pipe emulation is often cranky. I can imagine Vista breaking something. 

Or perhaps as all postinstall steps are not finished at that point in
setup.exe, so perhaps gzip is unavailable at that point in the setup.exe's
initial environment. 

Or perhaps the hang is related to the fact that install-info.exe reads the
entire file into memory, xmalloc'ing along the way.

I expect to have a Vista machine available again soon to check this out. 
Any suggestions on best investigative tactics?

----------------
Lines 604-643:
  if (!compression_program)
    compression_program = &local_compression_program;

  if (data[0] == '\x1f' && data[1] == '\x8b')
#if STRIP_DOT_EXE
    /* An explicit .exe yields a better diagnostics from popen below
       if they don't have gzip installed.  */
    *compression_program = "gzip.exe";
#else
    *compression_program = "gzip";
#endif
  else if(data[0] == 'B' && data[1] == 'Z' && data[2] == 'h')
#ifndef STRIP_DOT_EXE
    *compression_program = "bzip2.exe";
#else
    *compression_program = "bzip2";
#endif
  else if(data[0] == 'B' && data[1] == 'Z' && data[2] == '0')
#ifndef STRIP_DOT_EXE
    *compression_program = "bzip.exe";
#else
    *compression_program = "bzip";
#endif
  else
    *compression_program = NULL;

  if (*compression_program)
    { /* It's compressed, so fclose the file and then open a pipe.  */
      char *command = concat (*compression_program," -cd <",
*opened_filename); 
      if (fclose (f) < 0)
        pfatal_with_name (*opened_filename);
      f = popen (command, "r");
      if (f)
        *is_pipe = 1;
      else
        pfatal_with_name (command);
    }
  else
    { /* It's a plain file, seek back over the magic bytes.  */
      if (fseek (f, 0, 0) < 0)

-- 
View this message in context: http://www.nabble.com/Cygwin-Installation-Problems-on-Windows-Vista-tf3542482.html#a12791093
Sent from the Cygwin Users mailing list archive at Nabble.com.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019