Subject: strange compiler error for security/putty on Darwin
To: None <pkgsrc-users@netbsd.org>
From: Georg Schwarz <georg.schwarz@freenet.de>
List: pkgsrc-users
Date: 10/29/2006 09:49:40
Compiling security/putty on MacOS 10.4.8 (PPC) I end up like this:

gcc -pipe   -O3 -I/Users/schwarz/pkg/include -I/usr/include -Wall - 
Werror -I.././ -I../charset/ -I../windows/ -I../unix/ -I../mac/ -I../ 
macosx/ `gtk-config --cflags` -c ../sshzlib.c
cc1: warnings being treated as errors
../sshzlib.c: In function 'lz77_compress':
../sshzlib.c:204: warning: 'defermatch.distance' may be used  
uninitialized in this function
{standard input}:577:non-relocatable subtraction expression,  
"_zlib_match" minus "L00000000001$pb"
{standard input}:577:symbol: "_zlib_match" can't be undefined in a  
subtraction expression
{standard input}:576:non-relocatable subtraction expression,  
"_zlib_literal" minus "L00000000001$pb"
{standard input}:576:symbol: "_zlib_literal" can't be undefined in a  
subtraction expression
{standard input}:573:non-relocatable subtraction expression,  
"_zlib_match" minus "L00000000001$pb"
{standard input}:573:symbol: "_zlib_match" can't be undefined in a  
subtraction expression
{standard input}:572:non-relocatable subtraction expression,  
"_zlib_literal" minus "L00000000001$pb"
{standard input}:572:symbol: "_zlib_literal" can't be undefined in a  
subtraction expression
gnumake: *** [sshzlib.o] Error 1
*** Error code 2

Stop.


When compiling with -O2 or -O only I get:

gcc -pipe   -O -I/Users/schwarz/pkg/include -I/usr/include -Wall - 
Werror -I.././ -I../charset/ -I../windows/ -I../unix/ -I../mac/ -I../ 
macosx/ `gtk-config --cflags` -c ../sshzlib.c
cc1: warnings being treated as errors
../sshzlib.c: In function 'lz77_compress':
../sshzlib.c:204: warning: 'defermatch.distance' may be used  
uninitialized in this function
gnumake: *** [sshzlib.o] Error 1



I'm using the following cc:

powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc.  
build 5363)


What's the situation like on other platforms?

-- 
Georg Schwarz    http://home.pages.de/~schwarz/
georg.schwarz@freenet.de  +49 178 8545053