NetBSD Problem Report #45767
From www@NetBSD.org Sun Jan 1 19:48:42 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 2289F63D7CD
for <gnats-bugs@gnats.NetBSD.org>; Sun, 1 Jan 2012 19:48:42 +0000 (UTC)
Message-Id: <20120101194841.4EAA763BB83@www.NetBSD.org>
Date: Sun, 1 Jan 2012 19:48:41 +0000 (UTC)
From: pda@freeshell.org
Reply-To: pda@freeshell.org
To: gnats-bugs@NetBSD.org
Subject: databases/db4/ from pkgsrc 11q-3 won't install on HP-UX itanium
X-Send-Pr-Version: www-1.0
>Number: 45767
>Category: pkg
>Synopsis: databases/db4/ from pkgsrc 11q-3 won't install on HP-UX itanium
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: joerg
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jan 01 19:50:00 +0000 2012
>Closed-Date: Thu Aug 09 06:55:04 +0000 2012
>Last-Modified: Thu Aug 09 06:55:04 +0000 2012
>Originator: Paul Ackersviller
>Release: Just pkgsrc 11q-3
>Organization:
>Environment:
HP-UX tdcndv01 B.11.31 U ia64 1579589996 unlimited-user license
>Description:
I'm mystified by this, the package builds but the install step fails, below is the last few lines of output from my bmake install:
+ /usr/local/free/nbsd/11q3-64/ia64/sbin/pkg_add -K /usr/local/free/nbsd/11q3-64/ia64/db/pkg /var/tmp/pda/pkgsrc/packages/All/db4-4.8.30.tgz
pkg_add: Warning: package `db4-4.8.30' was built for a platform:
pkg_add: HPUX/ia64 11.31 (pkg) vs. HPUX/ia64 B.11.31 (this host)
pkg_add: asprintf failed: Error 0
*** Error code 1
This is a 64-bit build using HP's compiler, the same bug is on 32-bit. The warning above regarding 'HPUX/ia64 11.31' may be an additional problem -- everything, including the pkgsrc bootstrap, was all done on the same machine.
>How-To-Repeat:
bmake install -C databases/db4
>Fix:
>Release-Note:
>Audit-Trail:
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/45767: databases/db4/ from pkgsrc 11q-3 won't install on
HP-UX itanium
Date: Mon, 02 Jan 2012 21:22:42 +0900
Probably, OS_VERSION detection in pkgtools_pkg_install must be changed for HP-UX.
From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc:
Subject: Re: pkg/45767: databases/db4/ from pkgsrc 11q-3 won't install on
HP-UX itanium
Date: Mon, 2 Jan 2012 18:52:53 +0100
On Mon, Jan 02, 2012 at 12:25:03PM +0000, OBATA Akio wrote:
> Probably, OS_VERSION detection in pkgtools_pkg_install must be changed for HP-UX.
The code is in compatible_version() in pkgsrc/pkgtools/pkg_install/files/add/perform.c.
I don't know what HPUX version strings are the same.
Thomas
From: "Brian A. Seklecki" <lavalamp@spiritual-machines.org>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: Re: pkg/45767
Date: Thu, 5 Jan 2012 12:26:24 -0500 (EST)
Right then:
HP inservers a alphabetical characater and a period at the beginning of
the POSIX "current release level of the operating system" variable (-r)
====
root(pts/1)@ishpsa01[0][535]:/opt/pkgsrc/shells/bash(\.)$ uname -a
HP-UX ishpsa01 B.11.31 U ia64 1694232511 unlimited-user license
root(pts/1)@ishpsa01[0][536]:/opt/pkgsrc/shells/bash(\.)$ uname -r
B.11.31
root(pts/1)@ishpsa01[0][537]:/opt/pkgsrc/shells/bash(\.)$ uname -v
U
===
aix% uname -a
AIX SACR2 2 5 00CBEF7D4C00
aix%: uname -r
2
aix%: uname -v
5
===
freebsd% uname-r
7.3-STABLE
Likely this will break just about any regex/character matching
What's interesting is that the code is storing BI_OS_VERSION properly and
retrieving it without the char, so somewhere in pkg_create its doing the
right thing(?), or possibly accidentally truncating it.
warnx("%s/%s %s (pkg) vs. %s/%s %s (this host)",
pkg->buildinfo[BI_OPSYS],
pkg->buildinfo[BI_MACHINE_ARCH],
pkg->buildinfo[BI_OS_VERSION],
OPSYS_NAME,
effective_arch,
host_uname.release);
From: pda@freeshell.org
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/45767: databases/db4/ from pkgsrc 11q-3 won't install on
HP-UX itanium
Date: Thu, 5 Jan 2012 20:25:26 +0000
On Mon, Jan 02, 2012 at 05:55:02PM +0000, Thomas Klausner wrote:
> Subject: Re: pkg/45767: databases/db4/ from pkgsrc 11q-3 won't install on
> HP-UX itanium
>
> On Mon, Jan 02, 2012 at 12:25:03PM +0000, OBATA Akio wrote:
> > Probably, OS_VERSION detection in pkgtools_pkg_install must be changed for HP-UX.
>
> The code is in compatible_version() in pkgsrc/pkgtools/pkg_install/files/add/perform.c.
> I don't know what HPUX version strings are the same.
Rather than attempt to figure out what the proper fix to this might be,
I attempted to simply code around it for now... without success, I think
because the real error is happening after that particular warning.
I'm not on that system today, but you can go back to the initial bug
report to see what I mean. I beleive the message is "asprintf failed:
Error 0", and when I look to see where that message comes from, it
appears xasprintf is failing to print whatever the real error is
supposed to be.
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/45767: databases/db4/ from pkgsrc 11q-3 won't install on
HP-UX itanium
Date: Sat, 3 Mar 2012 18:02:28 +0000
Sent to gnats-admin instead of gnats-bugs. (mutt will often do this to
you by default if you reply to your own PR comments)
------
From: Paul Ackersviller <pda@freeshell.org>
To: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/45767: databases/db4/ from pkgsrc 11q-3 won't install on HP-UX
itanium
Date: Sun, 29 Jan 2012 21:41:07 +0000
On Thu, Jan 05, 2012 at 09:35:02PM +0000, pda@freeshell.org wrote:
> I'm not on that system today, but you can go back to the initial bug
> report to see what I mean. I beleive the message is "asprintf failed:
> Error 0", and when I look to see where that message comes from, it
> appears xasprintf is failing to print whatever the real error is
> supposed to be.
I finally got around to looking more closely at this, and it doesn't appear
specific to HP-UX or itanium at all, likely just that my --prefix where I
bootstrapped to is longer than some code was written to handle...
/usr/local/free/nbsd/11q3-64/ia64/ is what I was using at the time.
Firstly, after continuting on a different box, this
pkg_add: Warning: package `db4-4.8.30' was built for a platform:
pkg_add: HPUX/ia64 11.31 (pkg) vs. HPUX/ia64 B.11.31 (this host)
mysteriously went away on its own. It's the same hardware and OS version,
but I'm guessing maybe some patch on this system makes the difference.
The above turns out not to matter anyway, since the real problem was
pkg_add: asprintf failed: Error 0
...especially the fact that the message only gives the merest hint as to
the error. I was able to work around it by increasing the buffer size in
vasprintf() of pkgtools/libnbcompat/files/asprintf.c that gets malloc'ed
on line 61. Given that this buffer is used for file paths, woudn't
something like PATH_MAX make more sense than just 128?
Anyway, after getting db4 installed I'm now able to get a fair amount of
pkgsrc to build on this system. There are still a lot of problem areas,
but they mostly appear to originate in the upstream packages. Most notably
python and things dependent on it fail to build due to devel/libffi -- I'll
go onto the wiki and try to work some of that out.
Responsible-Changed-From-To: pkg-manager->agc
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Thu, 26 Apr 2012 13:49:25 +0000
Responsible-Changed-Why:
Over to maintainer of pkg_install (issue of pkg_add).
Responsible-Changed-From-To: agc->joerg
Responsible-Changed-By: joerg@NetBSD.org
Responsible-Changed-When: Thu, 26 Apr 2012 14:05:04 +0000
Responsible-Changed-Why:
It's about libnbcompat's asprintf workaround.
From: "Joerg Sonnenberger" <joerg@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45767 CVS commit: pkgsrc/pkgtools/libnbcompat
Date: Mon, 2 Jul 2012 16:02:53 +0000
Module Name: pkgsrc
Committed By: joerg
Date: Mon Jul 2 16:02:53 UTC 2012
Modified Files:
pkgsrc/pkgtools/libnbcompat: Makefile
pkgsrc/pkgtools/libnbcompat/files: asprintf.c configure configure.ac
pkgsrc/pkgtools/libnbcompat/files/nbcompat: config.h.in
Log Message:
If either va_copy or __builtin_va_copy is supported, use that in the
asprintf fallback implementation. If neither is supported, still try to
work by copying va_list directly. Should fix PR 45767.
To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 pkgsrc/pkgtools/libnbcompat/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/pkgtools/libnbcompat/files/asprintf.c
cvs rdiff -u -r1.77 -r1.78 pkgsrc/pkgtools/libnbcompat/files/configure
cvs rdiff -u -r1.78 -r1.79 pkgsrc/pkgtools/libnbcompat/files/configure.ac
cvs rdiff -u -r1.29 -r1.30 \
pkgsrc/pkgtools/libnbcompat/files/nbcompat/config.h.in
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: joerg@NetBSD.org
State-Changed-When: Mon, 02 Jul 2012 16:06:02 +0000
State-Changed-Why:
Patch was committed. Please test it.
From: Paul Ackersviller <pda@freeshell.org>
To: gnats-bugs@NetBSD.org
Cc: joerg@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: PR/45767 CVS commit: pkgsrc/pkgtools/libnbcompat
Date: Sun, 8 Jul 2012 21:41:20 +0000
On Mon, Jul 02, 2012 at 04:05:04PM +0000, Joerg Sonnenberger wrote:
> The following reply was made to PR pkg/45767; it has been noted by GNATS.
>
> From: "Joerg Sonnenberger" <joerg@netbsd.org>
> To: gnats-bugs@gnats.NetBSD.org
>
> Log Message:
> If either va_copy or __builtin_va_copy is supported, use that in the
> asprintf fallback implementation. If neither is supported, still try to
> work by copying va_list directly. Should fix PR 45767.
Thanks, this does appear to have done the trick.
From: "Matthias Scheler" <tron@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45767 CVS commit: [pkgsrc-2012Q2] pkgsrc/pkgtools/libnbcompat
Date: Mon, 9 Jul 2012 08:34:53 +0000
Module Name: pkgsrc
Committed By: tron
Date: Mon Jul 9 08:34:53 UTC 2012
Modified Files:
pkgsrc/pkgtools/libnbcompat [pkgsrc-2012Q2]: Makefile
pkgsrc/pkgtools/libnbcompat/files [pkgsrc-2012Q2]: asprintf.c configure
configure.ac
pkgsrc/pkgtools/libnbcompat/files/nbcompat [pkgsrc-2012Q2]: config.h.in
Log Message:
Pullup ticket #3855 - requested by joerg
pkgtools/libnbcompat: portability fix
Revisions pulled up:
- pkgtools/libnbcompat/Makefile 1.77
- pkgtools/libnbcompat/files/asprintf.c 1.3
- pkgtools/libnbcompat/files/configure 1.78
- pkgtools/libnbcompat/files/configure.ac 1.79
- pkgtools/libnbcompat/files/nbcompat/config.h.in 1.30
---
Module Name: pkgsrc
Committed By: joerg
Date: Mon Jul 2 16:02:53 UTC 2012
Modified Files:
pkgsrc/pkgtools/libnbcompat: Makefile
pkgsrc/pkgtools/libnbcompat/files: asprintf.c configure configure.ac
pkgsrc/pkgtools/libnbcompat/files/nbcompat: config.h.in
Log Message:
If either va_copy or __builtin_va_copy is supported, use that in the
asprintf fallback implementation. If neither is supported, still try to
work by copying va_list directly. Should fix PR 45767.
To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.76.6.1 pkgsrc/pkgtools/libnbcompat/Makefile
cvs rdiff -u -r1.2 -r1.2.44.1 pkgsrc/pkgtools/libnbcompat/files/asprintf.c
cvs rdiff -u -r1.77 -r1.77.6.1 pkgsrc/pkgtools/libnbcompat/files/configure
cvs rdiff -u -r1.78 -r1.78.6.1 pkgsrc/pkgtools/libnbcompat/files/configure.ac
cvs rdiff -u -r1.29 -r1.29.18.1 \
pkgsrc/pkgtools/libnbcompat/files/nbcompat/config.h.in
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 09 Aug 2012 06:55:04 +0000
State-Changed-Why:
confirmed fixed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.