yash069 / puttycyg

Automatically exported from code.google.com/p/puttycyg
0 stars 0 forks source link

Unable to compile from putty-0.60-cygterm-20090811.patch.gz; windres error on puttycyg.ico #29

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Using Cygwin:
1. $ wget
http://puttycyg.googlecode.com/files/putty-0.60-cygterm-20090811.patch.gz
2. $ gunzip putty-0.60-cygterm-20090811.patch.gz
3. $ ./putty-0.60-cygterm-20090811.patch
4. Observe that the build fails with a windres error:

windres   --define WIN32=1 --define _WIN32=1 --define WINVER=0x0400 
../windows/putty.rc putty.res.o
windres: icon file `puttycyg.ico' does not contain icon data

The putty-0.60\windows\puttycyg.ico file generated from the patch is
apparently invalid.  Windows Explorer does not show this puttycyg.ico file
with an icon.  It has a file size of 969 bytes, compared to most other
*.ico files in the same directory that all have file sizes of 4,078 bytes.
 The CRC-32 of the suspect puttycyg.ico is bd53c76a .

Cygwin version: 1.7.1
Windows version: Windows 7

Original issue reported on code.google.com by ziese...@gmail.com on 27 Dec 2009 at 4:51

GoogleCodeExporter commented 8 years ago
The puttycyg.ico from the repository looks OK.  
(http://puttycyg.googlecode.com/svn/trunk/putty-0.60/windows/puttycyg.ico)

This is a bug in the way I've created the patch file (the -a flag to diff).  
Please use the 
above icon file and I will fix the patch file soon.

Original comment by medgar123 on 27 Dec 2009 at 8:05

GoogleCodeExporter commented 8 years ago
Sounds great.  Already did pull down the icon from SVN.  Thanks!

Original comment by ziese...@gmail.com on 27 Dec 2009 at 8:08

GoogleCodeExporter commented 8 years ago
It's not a problem with the patch itself, but with the ability to execute the 
patch.  It 
seems bash doesn't like NUL bytes appearing in a << here doc.  This problem 
goes away 
if you use zsh:

zcat putty-0.60-cygterm-20090811.tar.gz | zsh

I don't have a good fix for this which preserves the ability to use the file 
with patch(1) as 
well as executing it directly without also bringing in another dependency (like 
uudecode).  I suppose since perl is required to build PuTTY, I can assume it is 
available...

Original comment by medgar123 on 28 Dec 2009 at 4:57

GoogleCodeExporter commented 8 years ago
zsh should also be considered as an additional dependency, as it is not 
included in
the default Cygwin install, not required by the PuTTY build, and otherwise just 
not
generally necessary.  That said, I think either approach (zsh or uudecode, 
etc.) is
valid, as long as the documentation is updated accordingly.  I guess I would 
prefer
something more along the lines of the uudecode approach, since it eliminates a
dependency on a particular shell.

Thanks!

Original comment by ziese...@gmail.com on 28 Dec 2009 at 6:31

GoogleCodeExporter commented 8 years ago
The patch is now a thin sheen of perl which wraps the shell script.  I've 
updated the 
http://code.google.com/p/puttycyg/wiki/Building page.

Original comment by medgar123 on 29 Dec 2009 at 6:17