gnupic: Re: [gnupic] XWisp2 with gcc patch
Subject:
Re: [gnupic] XWisp2 with gcc patch
From:
Daniel Serpell ####@####.####
Date:
14 Sep 2005 16:44:07 +0100
Message-Id: <20050914154334.GB4219@aplik.cl>
Hi!
El Wed, Sep 14, 2005 at 10:27:43PM +0800, Xiaofan Chen escribio:
> Strange the patch does not on my system.
>
> mcuee@ubuntu:~/Desktop/build/xwisp2/gcc$ patch -p1 < xwisp2.170.linux.patch
> (Stripping trailing CRs from patch.)
> patching file Makefile
> (Stripping trailing CRs from patch.)
> patching file xwisp2.c
> Hunk #1 FAILED at 42.
> 1 out of 1 hunk FAILED -- saving rejects to file xwisp2.c.rej
[...]
Seeing the errro messages, I think that the problem is with the unzip of
the original source. The source uses "dos" line terminations (the "CR"
and "LF" characters ath end of line), so my patch also uses them.
One solution is to 'fix' the original sources and the patch to use only
"LF" line ends (the unix standard). You can use the following comand:
perl -pi -e 's/^M$//' myFiles
To type "^M", you first press "CONTROL"+"V", and then "CONTROL"+"M".
> mcuee@ubuntu:~/Desktop/build/xwisp2/gcc$ make
> Compiling xwisp2.c
> cc1: error: unrecognized option `-Wno-pointer-sign'
Seems that your gcc version don't know that switch. You can simply
edit the "Makefile" and change:
CFLAGS = -Wall -O2 -Wno-pointer-sign
into:
CFLAGS = -Wall -O2
> mcuee@ubuntu:~/Desktop/build/xwisp2/gcc$ uname -a
> Linux ubuntu 2.6.12-7-k7 #1 Fri Aug 19 13:46:31 UTC 2005 i686 GNU/Linux
> mcuee@ubuntu:~/Desktop/build/xwisp2/gcc$ patch -v
> patch 2.5.9
Here, I have:
~$ uname -a
Linux pcdaniel 2.6.12-1-k7 #1 Tue Sep 6 16:28:10 UTC 2005 i686 GNU/Linux
~$ patch -v
patch 2.5.9
~$ gcc --version
gcc (GCC) 4.0.2 20050821 (prerelease) (Debian 4.0.1-6)
Daniel.