Subject: help with bootstrap-pkgsrc on Debian Linux 3.0?
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 10/29/2002 17:10:47
Hello,

This is getting long ... I am documenting this as I go (in this email and
more info in my journal).

As mentioned in bootstrap-pkgsrc I am reporting
my failures and successes. (It didn't say who to report to.) See below.

I want to use pkgsrc under Debian Linux 3.0 (i386).

The Zoularis webpage says "You can install Zoularis on your system by ...
using the NetBSD source tree and building it from source."

It didn't say how to build from source (or where located). I found
pkgsrc/cross/zoularis, but realize I need NetBSD's make to take advantage
of this.

So now I realize that Zoularis like this is not a bootstrap for pkgsrc.

The webpage says it "provides a set of Makefiles and patches (called
pkgsrc) which makes building 3rd party software from source easier."

What is Zoularis? (Or how does it make it easier?)

Anyways, I tried the pre-built debian2.2-i386.tar.gz zoularis files.

But /usr/local/bsd/bin/ftp didn't work right:

=> Attempting to fetch gethost-0.03.tar.gz from
http://www.reedmedia.net/software/gethost/.
=> [4226 bytes]
ftp: http://www.reedmedia.net/software/gethost/gethost-0.03.tar.gz:
Unknown host
ftp> quit

I manually typed the quit above and it continued to try different ftp
sites but complained "Unknown host".

So I would like to try bootstrap-pkgsrc to see if it will help. I found
an old bootstrap-pkgsrc-20020720.tar.gz tarball. But I decided to try
newer code. After I "apt-get install cvs", I logged in and did:

 cvs -d:pserver:anoncvs@anoncvs.netbsd.org:/cvsroot checkout -P \
 othersrc/bootstrap-pkgsrc

I made some directories, like: /home/jeremy/netbsd/var/db/pkg.
And moved pkgsrc to /home/jeremy/usr/pkgsrc/.

 time ./bootstrap --prefix=/home/jeremy/netbsd/usr/pkg
--localbase=/home/jeremy/usr/pkg --pkgdbdir=/home/jeremy/netbsd/var/db/pkg
--pkgsrcdir=/home/jeremy/netbsd/usr/pkgsrc

It said: "You must be root to set up pkgsrc for Linux". Okay.

While it was running I saw an error message "Invalid group wheel".
Another error I see is:

./bootstrap: /home/jeremy/usr/pkg/bin/bmake: No such file or directory

~Five minutes later it was done:

 Please remember to add /home/jeremy/usr/pkg/bin to your PATH environment
 variable
 Please remember to set FETCH_CMD in /etc/mk.conf to
 /home/jeremy/usr/pkg/bin/ftp

 Hopefully everything is now complete

So I created /etc/mk.conf and set my PATH.

But I see I don't have any bmake. I ran bootstrap again and saved the
output.

Here are the problems:

1)

make[1]: Leaving directory
`/home/jeremy/netbsd/othersrc/bootstrap-pkgsrc/bmake/
lst.lib'
gcc *.o lst.lib/*.o -o bmake.boot
lst.lib/lstAppend.o: In function `Lst_Append':
lst.lib/lstAppend.o(.text+0x0): multiple definition of `Lst_Append'
lstAppend.o(.text+0x0): first defined here
/usr/bin/ld: Warning: size of symbol `Lst_Append' changed from 158 to 186
in lst
.lib/lstAppend.o
lst.lib/lstAtEnd.o: In function `Lst_AtEnd':
lst.lib/lstAtEnd.o(.text+0x0): multiple definition of `Lst_AtEnd'
... and so on ...
collect2: ld returned 1 exit status
make: *** [bmake.boot] Error 1

2)
install   -c -s   -o root -g wheel -m 555 bmake
/home/jeremy/usr/pkg/bin/bmake
install: invalid group `wheel'
*** Error code 1

Stop.
bmake: stopped in /home/jeremy/netbsd/othersrc/bootstrap-pkgsrc/bmake

It should nicely tell me to add wheel. I may have never seen this.


3)
cd lib && make
make[1]: Entering directory
`/home/jeremy/netbsd/othersrc/bootstrap-pkgsrc/pkg_i
nstall/lib'
gcc -DHAVE_CONFIG_H -I. -I.  -g -O2 -c pen.c -o pen.o
pen.c:271: redefinition of `struct statfs'
pen.c: In function `vfs2fs':
pen.c:361: structure has no member named `val'
pen.c:364: structure has no member named `f_basetype'
pen.c:364: structure has no member named `f_basetype'
pen.c:364: structure has no member named `f_basetype'
pen.c:364: structure has no member named `f_basetype'
pen.c:364: structure has no member named `f_basetype'
make[1]: *** [pen.o] Error 1
make[1]: Leaving directory
`/home/jeremy/netbsd/othersrc/bootstrap-pkgsrc/pkg_in
stall/lib'
make: *** [libdir] Error 2

4) At very end:
/usr/bin/install -c mtree /home/jeremy/usr/pkg/sbin
./bootstrap: /home/jeremy/usr/pkg/bin/bmake: No such file or directory
Please remember to add /home/jeremy/usr/pkg/bin to your PATH environment
variable

These are the binaries I have:
# find /home/jeremy/usr/pkg/*bin
/home/jeremy/usr/pkg/bin
/home/jeremy/usr/pkg/bin/ftp
/home/jeremy/usr/pkg/bin/digest
/home/jeremy/usr/pkg/sbin

Well I will work on this some more. ...

   Jeremy C. Reed
   http://www.reedmedia.net/