NetBSD Problem Report #49668

From www@NetBSD.org  Sun Feb 15 05:25:07 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 0E3B7A6554
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 15 Feb 2015 05:25:07 +0000 (UTC)
Message-Id: <20150215052505.32EDBA6555@mollari.NetBSD.org>
Date: Sun, 15 Feb 2015 05:25:05 +0000 (UTC)
From: scott@slowass.net
Reply-To: scott@slowass.net
To: gnats-bugs@NetBSD.org
Subject: bootstrap fails on Debian wheezy/sid
X-Send-Pr-Version: www-1.0

>Number:         49668
>Category:       pkg
>Synopsis:       bootstrap fails on Debian wheezy/sid
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 15 05:30:01 +0000 2015
>Closed-Date:    Wed Jun 16 22:37:14 +0000 2021
>Last-Modified:  Wed Jun 16 22:37:14 +0000 2021
>Originator:     Scott Walters
>Release:        csv current as of today as well as http://ftp.netbsd.org/pub/pkgsrc/stable/pkgsrc.tar.gz; Feb 14 2015
>Organization:
>Environment:
Linux Microknoppix 3.15.0 #6 SMP Mon Feb 9 07:04:06 CST 2015 i686 GNU/Linux

>Description:
On the first attempt, it failed with an error about "bootstrap-mk-files-20140516" already existing.  I removed the work directory and tried again.  Same failure.  Switched from the tar.gz version to the cvs checkout.  Same failure.  There's probably terrible and strange about my system.

gcc -DHAVE_CONFIG_H -I../libnbcompat -I../../libnbcompat -I. -I. -I../lib -DBOOTSTRAP -g -O2 -c main.c
gcc -DHAVE_CONFIG_H -I../libnbcompat -I../../libnbcompat -I. -I. -I../lib -DBOOTSTRAP -g -O2 -c perform.c
gcc -DHAVE_CONFIG_H -I../libnbcompat -I../../libnbcompat -I. -I. -I../lib -DBOOTSTRAP -g -O2 -c show.c
gcc -L../libnbcompat -L../../libnbcompat -L../lib -o pkg_info main.o perform.o show.o -linstall  -lnbcompat
===> running: /bin/sh /opt/pkgsrc/bootstrap/work/bin/install-sh -c -o root -g root -m 755 /opt/pkgsrc/bootstrap/work/pkg_install/admin/pkg_admin /opt/pkgsrc/bootstrap/work/sbin/pkg_admin
===> running: /bin/sh /opt/pkgsrc/bootstrap/work/bin/install-sh -c -o root -g root -m 755 /opt/pkgsrc/bootstrap/work/pkg_install/create/pkg_create /opt/pkgsrc/bootstrap/work/sbin/pkg_create
===> running: /bin/sh /opt/pkgsrc/bootstrap/work/bin/install-sh -c -o root -g root -m 755 /opt/pkgsrc/bootstrap/work/pkg_install/info/pkg_info /opt/pkgsrc/bootstrap/work/sbin/pkg_info
===> Installing packages
===> running: (cd /opt/pkgsrc/pkgtools/bootstrap-mk-files && /opt/pkgsrc/bootstrap/work/bin/bmake  MAKE_JOBS=1 USE_DESTDIR=no -DPKG_PRESERVE MAKECONF=/opt/pkgsrc/bootstrap/work/mk.conf install)
===> Installing dependencies for bootstrap-mk-files-20141122
===> Overriding tools for bootstrap-mk-files-20141122
===> Extracting for bootstrap-mk-files-20141122
===> Patching for bootstrap-mk-files-20141122
===> Creating toolchain wrappers for bootstrap-mk-files-20141122
===> Configuring for bootstrap-mk-files-20141122
cd /opt/pkgsrc/bootstrap/work/wrk/pkgtools/bootstrap-mk-files/work/bootstrap-mk-files-20141122; for file in bsd.* sys.mk; do                     test ! -f mods/Linux.$file ||                   /bin/cp -f mods/Linux.$file /opt/pkgsrc/bootstrap/work/wrk/pkgtools/bootstrap-mk-files/work/bootstrap-mk-files-20141122/$file;              done
cd /opt/pkgsrc/bootstrap/work/wrk/pkgtools/bootstrap-mk-files/work/bootstrap-mk-files-20141122;                                                  if test -f mods/Linux.bsd.own.mk.in; then                       own_mk=mods/Linux.bsd.own.mk.in;                    else                                                            own_mk=mods/bsd.own.mk.in;                              fi;                                        /bin/sed        -e 's|@ROOT_GROUP@|'root'|g'                     -e 's|@ROOT_USER@|'root'|g'                     -e 's|@SYSCONFDIR@|'/usr/pkg/etc'|g'            $own_mk > bsd.own.mk
===> Installing for bootstrap-mk-files-20141122
ERROR: bootstrap-mk-files-20140516 is already installed - perhaps an older version?
ERROR: If so, you may use either of:
ERROR:     - "pkg_delete bootstrap-mk-files-20140516" and "/opt/pkgsrc/bootstrap/work/bin/bmake reinstall"
ERROR:       to upgrade properly
ERROR:     - "/opt/pkgsrc/bootstrap/work/bin/bmake update" to rebuild the package and all
ERROR:       of its dependencies
ERROR:     - "/opt/pkgsrc/bootstrap/work/bin/bmake replace" to replace only the package without
ERROR:       re-linking dependencies, risking various problems.
*** Error code 1

Stop.
bmake: stopped in /opt/pkgsrc/pkgtools/bootstrap-mk-files
*** Error code 1

Stop.
bmake: stopped in /opt/pkgsrc/pkgtools/bootstrap-mk-files
*** Error code 1

Stop.
bmake: stopped in /opt/pkgsrc/pkgtools/bootstrap-mk-files
===> exited with status 1
aborted.
bash-4.3# pkg_delete bootstrap-mk-files-20140516
Package `bootstrap-mk-files-20140516' is still required by other packages:
        bmake-20140314
bash-4.3# pkg_delete bootstrap-mk-files-20140516 bmake-20140314
pkg_delete: The following packages are marked as not for deletion:
        bmake-20140314
        bootstrap-mk-files-20140516
bash-4.3# /opt/pkgsrc/bootstrap/work/bin/bmake reinstall
bmake: don't know how to make reinstall. Stop

bmake: stopped in /opt/pkgsrc/bootstrap


>How-To-Repeat:
Install Knoppix to disk.  Rebuild your kernel periodically desperately trying to find one that doesn't crash randomly.  Seriously, Linux is as bad as FreeBSD post 5.x.  Install lots of packages from apt and from source into /usr/local.  Try to bootstrap pkgsrc.

  520  tar -xjvf /home/tgz/pkgsrc.tar.gz 
  521  tar -xzvf /home/tgz/pkgsrc.tar.gz 
  522  pwd
  523  cd pkgsrc/bootstrap/
  524  echo $PATH
  525  vi /home/scott/.bashrc
  526  export PATH="$PATH:/opt/pkg/bin" # pkgsrc
  527  export SH=/bin/bash
  528  ./bootstrap
  529  pwd
  530  ls /opt
  531  pkg_delete bootstrap-mk-files-20140516
  532  pkg_delete bootstrap-mk-files-20140516 bmake-20140314
  533  /opt/pkgsrc/bootstrap/work/bin/bmake reinstall
  534  /opt/pkgsrc/bootstrap/work/bin/bmake update
  535  /opt/pkgsrc/bootstrap/work/bin/bmake replace
  536  find / --name 'bootstrap-mk-files-20140516'
  537  find / -name 'bootstrap-mk-files-20140516'
  538  pwd
  539  ls
  540  ls | grep mk
  541  ls | grep files
  542  ls work
  543  find work | grep bootstrap-mk
  544  rm -rf work/wrk/pkgtools/bootstrap-mk-files/
  545  jobs
  546  kill %1
  547  pwd
  548  ls
  549  pwd
  550  jobs
  551  ls
  552  ./bootstrap
  553  rm -rf work
  554  ./bootstrap
  555  ls /opt
  556  pwd
  557  cd /opt
  558  rm -rf pkgsrc
  559  env CVS_RSH=ssh cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P pkgsrc
  560  env CVS_RSH=ssh cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P pkgsrc
  561  pwd
  562  pwd
  563  cd pkgsrc/bootstrap
  564  ls
  565  ./bootstrap
  566  pkg_delete bootstrap-mk-files-20140516
  567  pkg_delete bootstrap-mk-files-20140516 bmake-20140314
  568  /opt/pkgsrc/bootstrap/work/bin/bmake reinstall
  569  cat /etc/debian_version 
  570  date

>Fix:
This PR is probably trash and should be deleted, but I did want to offhandedly mention that pkgsrc failed for me.

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->feedback
State-Changed-By: tnn@NetBSD.org
State-Changed-When: Sun, 15 Feb 2015 08:58:48 +0000
State-Changed-Why:
To start over from scratch you should rm -rf both the work directory,
/usr/pkg as well as /var/db/pkg*. Please try to bootstrap again after this
and reply with the error message.


From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/49668: bootstrap fails on Debian wheezy/sid
Date: Sun, 15 Feb 2015 22:56:15 +0000

 On Sun, Feb 15, 2015 at 05:30:01AM +0000, scott@slowass.net wrote:
  > On the first attempt, it failed with an error about
  > "bootstrap-mk-files-20140516" already existing.  I removed the work
  > directory and tried again.  Same failure.  Switched from the tar.gz
  > version to the cvs checkout.  Same failure.  There's probably
  > terrible and strange about my system.

 If you had a previous installation and you nuked it, did you nuke the
 package database as well as /usr/pkg? It goes by default in a
 different subtree in /var. That's the most common cause of problems
 like this... not that it's necessarily what's happening.

  > This PR is probably trash and should be deleted, but I did want to
  > offhandedly mention that pkgsrc failed for me.

 nah, it's supposed to work :-)

 -- 
 David A. Holland
 dholland@netbsd.org

From: Scott Walters <scott@slowass.net>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: bin/49668: bootstrap fails on Debian wheezy/sid
Date: Sun, 15 Feb 2015 19:16:02 -0500

 Ahh.  Okay, success.

 Okay, I wasn't aware of those directories (not having carefully observed
 all of the output).

 It seems like what happened was I had a previous attempt at building something
 from pkgsrc some time ago and those directories were left over from then.

 It also seems like these instructions (generated when it failed) were not
 sufficient to resolve this particular problem:

 ===> Installing for bootstrap-mk-files-20141122
 ERROR: bootstrap-mk-files-20140516 is already installed - perhaps an older version?
 ERROR: If so, you may use either of:
 ERROR:     - "pkg_delete bootstrap-mk-files-20140516" and "/opt/pkgsrc/bootstrap/work/bin/bmake reinstall"
 ERROR:       to upgrade properly
 ERROR:     - "/opt/pkgsrc/bootstrap/work/bin/bmake update" to rebuild the package and all
 ERROR:       of its dependencies
 ERROR:     - "/opt/pkgsrc/bootstrap/work/bin/bmake replace" to replace only the package without
 ERROR:       re-linking dependencies, risking various problems.

 So maybe this could be considered a diagnostic output/documentation issue.

 Thank you both very much for your replies.

 Regards,
 -scott


 On  0, David Holland <dholland-bugs@netbsd.org> wrote:
 > sts) smtp.mail=gnats@netbsd.org
 > Received: by mollari.NetBSD.org (Postfix, from userid 31008)
 > 	id 8C647A65B8; Sun, 15 Feb 2015 23:00:01 +0000 (UTC)
 > From: David Holland <dholland-bugs@netbsd.org>
 > To: gnats-admin@netbsd.org,pkgsrc-bugs@netbsd.org,scott@slowass.net
 > Reply-To: gnats-bugs@NetBSD.org
 > Subject: Re: bin/49668: bootstrap fails on Debian wheezy/sid
 > References: <pr-pkg-49668@gnats.netbsd.org>  <20150215052505.32EDBA6555@mollari.NetBSD.org>
 > X-Gnats-Was-Stupid: no
 > Cc: 
 > Message-Id: <20150215230001.8C647A65B8@mollari.NetBSD.org>
 > Date: Sun, 15 Feb 2015 23:00:01 +0000 (UTC)
 > 
 > The following reply was made to PR pkg/49668; it has been noted by GNATS.
 > 
 > From: David Holland <dholland-bugs@netbsd.org>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: bin/49668: bootstrap fails on Debian wheezy/sid
 > Date: Sun, 15 Feb 2015 22:56:15 +0000
 > 
 >  On Sun, Feb 15, 2015 at 05:30:01AM +0000, scott@slowass.net wrote:
 >   > On the first attempt, it failed with an error about
 >   > "bootstrap-mk-files-20140516" already existing.  I removed the work
 >   > directory and tried again.  Same failure.  Switched from the tar.

State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 29 May 2016 23:46:12 +0000
State-Changed-Why:
Feedback was received


Responsible-Changed-From-To: bin-bug-people->dholland
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Sun, 29 May 2016 23:46:27 +0000
Responsible-Changed-Why:
I want to improve the docs so it doesn't happen again


Responsible-Changed-From-To: dholland->pkg-manager
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Wed, 16 Jun 2021 22:37:14 +0000
Responsible-Changed-Why:
moving the packagedb dir under $LOCALBASE obsoleted this


State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 16 Jun 2021 22:37:14 +0000
State-Changed-Why:
.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.