Subject: pkgtools/pkg_install on sparc
To: netbsd-help <netbsd-help@netbsd.org>
From: James K. Lowden <jklowden@schemamania.org>
List: port-sparc
Date: 08/10/2002 13:34:07
Hello everyone, 

I'm having trouble getting pkgsrc to work on my very first sparcstation,
which began running NetBSD 1.5.2 nine hours ago.  Having finished the
installation, I thought I'd install some of my favorite packages before
upgrading to 1.5.3.  I fetched /pub/NetBSD/packages/pkgsrc.tar.gz from
ftp.netbsd.org last night.  

I'm stuck in /usr/pkgsrc/pkgtools/pkg_install, unable to compile most of
work/pkg_install/lib/, starting with file.c.  The complaint is that
-Werror is set, and errors of the sort:

  warning: cast discards `const' from pointer target type

appear everywhere.  Thinking maybe file.c was alone in this, I compiled it
and the next few "by hand" (copying the make output and deleting the
-Werror switch), but that got old fast.  An example is appended below.  

Am I using the wrong tarball?  Should I turn off -Werror globally (how?)? 
Something else?  

Naïvely, I looked for a binary package of pkg_install.  I don't think it
exists;
ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/pkgtools/README.html
doesn't point to one.  And I couldn't find anything in the archives about
this.  

Thanks for any advice.  I know this is a funny time to install a new box,
with 1.6 in the wings, but it's really time (don't you think?) I swapped
in the sparc, so I can upgrade my aging 1.4.2 server.  

Regards, 

--jkl

# pwd;make
/usr/pkgsrc/pkgtools/pkg_install
===> Building for pkg_install-20020723
all ===> lib
cc -O2  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
-Wno-uninitialized -Wreturn-type -Wcast-qual -Wpointer-arith
-Wwrite-strings -Wswitch -Wshadow -Werror   
-I/usr/pkgsrc/pkgtools/pkg_install/work/pkg_install/lib/../lib 
-DBINDIR='"/usr/sbin"' -DCHMOD='"/bin/chmod"' -DCHOWN='"/usr/sbin/chown"'
-DCHGRP='"/usr/bin/chgrp"' -c pkgdb.c
cc1: warnings being treated as errors
pkgdb.c: In function `pkgdb_store':
pkgdb.c:111: warning: cast discards `const' from pointer target type
pkgdb.c:113: warning: cast discards `const' from pointer target type
pkgdb.c: In function `pkgdb_retrieve':
pkgdb.c:137: warning: cast discards `const' from pointer target type
pkgdb.c: In function `pkgdb_remove':
pkgdb.c:168: warning: cast discards `const' from pointer target type
pkgdb.c: In function `_pkgdb_getPKGDB_DIR':
pkgdb.c:235: warning: assignment discards `const' from pointer target type
*** Error code 1