NetBSD Problem Report #23683
Received: (qmail 19067 invoked by uid 605); 7 Dec 2003 05:09:05 -0000
Message-Id: <200312070508.hB758jwg002729@egsner.cirr.com>
Date: Sat, 6 Dec 2003 23:08:45 -0600 (CST)
From: eric@cirr.com
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: eric@cirr.com
To: gnats-bugs@gnats.netbsd.org
Cc: eric@cirr.com
Subject: bootstrap-pkgsrc -> hp-ux
X-Send-Pr-Version: 3.95
>Number: 23683
>Category: pkg
>Synopsis: bootstrap-pkgsrc can now work on hpux
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: grant
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Dec 07 05:10:00 +0000 2003
>Closed-Date: Mon Mar 14 12:12:17 +0000 2005
>Last-Modified: Mon Mar 14 12:12:17 +0000 2005
>Originator: Eric Schnoebelen
>Release: HP-UX B.11.11
>Organization:
Central Iowa (Model) Railroad, Plano, TX US
>Environment:
HP-UX peake B.11.11 U 9000/782 2005225191 unlimited-user license
>Description:
bootstrap-pkgsrc doesn't work on HP-UX
>How-To-Repeat:
???
>Fix:
The following patches allow bootstrap pkgsrc to successfully
build and install on HP-UX 11.11 (and probably 11.0)
One question: Why did configure in libnbcompat want QUAD support
to depend upon having both long long and an 8 octet off_t? That
requirement keeps 32 bit HPUX from building strtoll() when it otherwise
has the needed features.
Index: bootstrap
===================================================================
RCS file: /cvsroot/othersrc/bootstrap-pkgsrc/bootstrap,v
retrieving revision 1.79
diff -b -u -w -r1.79 bootstrap
--- bootstrap 18 Oct 2003 09:56:06 -0000 1.79
+++ bootstrap 6 Dec 2003 06:33:38 -0000
@@ -233,6 +233,15 @@
set_opsys=no
whoamiprog=/usr/ucb/whoami
;;
+HP-UX)
+ root_group=root
+ need_pax=yes
+ need_mtree=yes
+ need_bsd_install=yes
+ need_sed=yes
+ set_opsys=no
+ ;;
+
*)
echo "This platform ($opsys) is untried - good luck, and thanks for using pkgsrc"
root_group=wheel
Index: bmake/configure
===================================================================
RCS file: /cvsroot/othersrc/bootstrap-pkgsrc/bmake/configure,v
retrieving revision 1.2
diff -b -u -w -r1.2 configure
--- bmake/configure 20 Feb 2003 18:25:20 -0000 1.2
+++ bmake/configure 6 Dec 2003 06:33:45 -0000
@@ -2536,7 +2536,7 @@
case "${withval}" in
yes) { echo "configure: error: bad value ${withval} given for bmake _PATH_DEFSYSPATH" 1>&2; exit 1; } ;;
no) ;;
-*) CPPFLAGS="$CPPFLAGS \"-D_PATH_DEFSYSPATH=\\\"$with_default_sys_path\\\"\"" ;;
+*) CPPFLAGS="$CPPFLAGS -D_PATH_DEFSYSPATH=\\\"$with_default_sys_path\\\"" ;;
esac
fi
@@ -2546,7 +2546,7 @@
case "${withval}" in
yes) { echo "configure: error: bad value ${withval} given for bmake _PATH_PREFIX_SYSPATH" 1>&2; exit 1; } ;;
no) ;;
-*) CPPFLAGS="$CPPFLAGS \"-D_PATH_PREFIX_SYSPATH=\\\"$with_prefix_sys_path\\\"\"" ;;
+*) CPPFLAGS="$CPPFLAGS -D_PATH_PREFIX_SYSPATH=\\\"$with_prefix_sys_path\\\"" ;;
esac
fi
Index: bmake/configure.in
===================================================================
RCS file: /cvsroot/othersrc/bootstrap-pkgsrc/bmake/configure.in,v
retrieving revision 1.2
diff -b -u -w -r1.2 configure.in
--- bmake/configure.in 20 Feb 2003 18:25:20 -0000 1.2
+++ bmake/configure.in 6 Dec 2003 06:33:45 -0000
@@ -142,7 +142,7 @@
[case "${withval}" in
yes) AC_MSG_ERROR(bad value ${withval} given for bmake _PATH_DEFSYSPATH) ;;
no) ;;
-*) CPPFLAGS="$CPPFLAGS \"-D_PATH_DEFSYSPATH=\\\"$with_default_sys_path\\\"\"" ;;
+*) CPPFLAGS="$CPPFLAGS -D_PATH_DEFSYSPATH=\\\"$with_default_sys_path\\\"" ;;
esac])
dnl
dnl Or just to prefix it
@@ -152,7 +152,7 @@
[case "${withval}" in
yes) AC_MSG_ERROR(bad value ${withval} given for bmake _PATH_PREFIX_SYSPATH) ;;
no) ;;
-*) CPPFLAGS="$CPPFLAGS \"-D_PATH_PREFIX_SYSPATH=\\\"$with_prefix_sys_path\\\"\"" ;;
+*) CPPFLAGS="$CPPFLAGS -D_PATH_PREFIX_SYSPATH=\\\"$with_prefix_sys_path\\\"" ;;
esac])
dnl
dnl Some folk don't like this one
Index: bmake/makefile.boot.in
===================================================================
RCS file: /cvsroot/othersrc/bootstrap-pkgsrc/bmake/makefile.boot.in,v
retrieving revision 1.4
diff -b -u -w -r1.4 makefile.boot.in
--- bmake/makefile.boot.in 3 Dec 2002 04:06:05 -0000 1.4
+++ bmake/makefile.boot.in 6 Dec 2003 06:33:45 -0000
@@ -14,7 +14,7 @@
MK=${prefix}/share/mk
MKSRC=${srcdir}/mk
-CFLAGS=-I. -I$(srcdir) @DEFS@ @CPPFLAGS@ -DMAKE_BOOTSTRAP ${XDEFS}
+CFLAGS=-I. -I$(srcdir) @DEFS@ @CPPFLAGS@ -DMAKE_BOOTSTRAP ${XDEFS} @CFLAGS@
MDEFS="-D@force_machine@MACHINE=\"@machine@\"" "-DMACHINE_ARCH=\"@machine_arch@\""
OBJ=arch.o buf.o compat.o cond.o dir.o for.o hash.o job.o main.o make.o \
@@ -31,7 +31,9 @@
rm -f *.[ado] */*.[ado]
bootstrap: bmake.boot
- CC="$(CC)" MAKESYSPATH=${MK} ./bmake.boot -f Makefile
+ CC="$(CC)" CFLAGS="$(CFLAGS)" MAKESYSPATH=${MK} \
+ ./bmake.boot -f Makefile bmake
+
install: install-bin install-man install-mk
install-bin:
Index: bmake/sigcompat.c
===================================================================
RCS file: /cvsroot/othersrc/bootstrap-pkgsrc/bmake/sigcompat.c,v
retrieving revision 1.1.1.1
diff -b -u -w -r1.1.1.1 sigcompat.c
--- bmake/sigcompat.c 19 Sep 2002 10:40:11 -0000 1.1.1.1
+++ bmake/sigcompat.c 6 Dec 2003 06:33:46 -0000
@@ -125,14 +125,14 @@
#endif
#ifndef MASK_T
-# ifdef __hpux__
+# if defined(__hpux__) || defined(_HPUX_SOURCE)
# define MASK_T long
# else
# define MASK_T int
# endif
#endif
-/* I just hate HPsUX */
-#if defined(__HPUX_VERSION) && __HPUX_VERSION > 9
+/* the bloody documentation doesn't match the implementation on HP-UX */
+#if defined(_HPUX_SOURCE)
# define PAUSE_MASK_T int
#else
# define PAUSE_MASK_T MASK_T
Index: bmake/util.c
===================================================================
RCS file: /cvsroot/othersrc/bootstrap-pkgsrc/bmake/util.c,v
retrieving revision 1.1.1.1
diff -b -u -w -r1.1.1.1 util.c
--- bmake/util.c 19 Sep 2002 10:40:13 -0000 1.1.1.1
+++ bmake/util.c 6 Dec 2003 06:33:47 -0000
@@ -105,7 +105,7 @@
}
#endif
-#ifdef __hpux
+#if defined(__hpux) && !defined(_HPUX_SOURCE)
#include <sys/types.h>
#include <sys/param.h>
#include <sys/syscall.h>
@@ -167,7 +167,7 @@
{
return setresgid(egid, rgid, -1);
}
-#endif /* __hpux */
+#endif /* __hpux && !_HPUX_SOURCE */
#if defined(__hpux__) || defined(__hpux)
@@ -224,7 +224,7 @@
};
#endif /* __hpux__ || __hpux */
-#ifdef __hpux
+#if defined(__hpux) && !defined(_HPUX_SOURCE)
int
utimes(file, tvp)
@@ -347,7 +347,7 @@
}
} /* end getwd */
-#endif /* __hpux */
+#endif /* __hpux && !defined(_HPUX_SOURCE) */
#if !defined(HAVE_GETCWD)
char *
Index: libnbcompat/Makefile.in
===================================================================
RCS file: /cvsroot/othersrc/bootstrap-pkgsrc/libnbcompat/Makefile.in,v
retrieving revision 1.1.1.2
diff -b -u -w -r1.1.1.2 Makefile.in
--- libnbcompat/Makefile.in 15 Sep 2003 04:15:14 -0000 1.1.1.2
+++ libnbcompat/Makefile.in 6 Dec 2003 06:33:48 -0000
@@ -81,7 +81,7 @@
done
clean:
- rm -f *.a *.o bits nbcompat/nbtypes.h nbcompat/nbcompat.h
+ rm -f *.a *.o bits nbcompat/nbtypes.h nbcompat/nbconfig.h
distclean: clean
rm -f Makefile config.log config.status configure.lineno
#
# Question: why was the quad support dependent upon 8 octet off_t's?
#
Index: libnbcompat/configure
===================================================================
RCS file: /cvsroot/othersrc/bootstrap-pkgsrc/libnbcompat/configure,v
retrieving revision 1.1.1.2
diff -b -u -w -r1.1.1.2 configure
--- libnbcompat/configure 16 Sep 2003 16:58:09 -0000 1.1.1.2
+++ libnbcompat/configure 6 Dec 2003 06:34:07 -0000
@@ -7990,7 +7990,7 @@
LIBOBJS="$LIBOBJS statfs.$ac_objext"
fi
-if test $ac_cv_type_long_long = yes -a $ac_cv_sizeof_off_t -ge 8; then
+if test $ac_cv_type_long_long = yes ; then
echo "$as_me:$LINENO: checking *printf() support for %lld" >&5
Index: libnbcompat/configure.ac
===================================================================
RCS file: /cvsroot/othersrc/bootstrap-pkgsrc/libnbcompat/configure.ac,v
retrieving revision 1.1.1.2
diff -b -u -w -r1.1.1.2 configure.ac
--- libnbcompat/configure.ac 16 Sep 2003 16:58:09 -0000 1.1.1.2
+++ libnbcompat/configure.ac 6 Dec 2003 06:34:07 -0000
@@ -210,7 +210,7 @@
AC_LIBOBJ(statfs)
fi
-if test $ac_cv_type_long_long = yes -a $ac_cv_sizeof_off_t -ge 8; then
+if test $ac_cv_type_long_long = yes ; then
dnl We assume that if sprintf() supports %lld or %qd,
dnl then all of *printf() does. If not, disable long long
Index: libnbcompat/nbcompat.h
===================================================================
RCS file: /cvsroot/othersrc/bootstrap-pkgsrc/libnbcompat/nbcompat.h,v
retrieving revision 1.1.1.5
diff -b -u -w -r1.1.1.5 nbcompat.h
--- libnbcompat/nbcompat.h 18 Oct 2003 09:27:40 -0000 1.1.1.5
+++ libnbcompat/nbcompat.h 6 Dec 2003 06:34:08 -0000
@@ -471,10 +471,10 @@
# if !defined(HAVE_STRTOLL) && defined(HAVE_LONG_LONG)
long long strtoll(const char *, char **, int);
# if ! defined(QUAD_MIN)
-# define QUAD_MIN (-0x7fffffffffffffffL-1)
+# define QUAD_MIN (-0x7fffffffffffffffLL-1)
# endif
# if ! defined(QUAD_MAX)
-# define QUAD_MAX (0x7fffffffffffffffL)
+# define QUAD_MAX (0x7fffffffffffffffLL)
# endif
# endif
#else /* ! HAVE_QUAD_SUPPORT */
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->grant
Responsible-Changed-By: grant
Responsible-Changed-When: Mon Dec 8 15:29:56 UTC 2003
Responsible-Changed-Why:
I'll take this.
From: grant beattie <grant@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: pr/23683 CVS commit: othersrc/bootstrap-pkgsrc
Date: Wed, 14 Jan 2004 11:19:47 +0000 (UTC)
Module Name: othersrc
Committed By: grant
Date: Wed Jan 14 11:19:47 UTC 2004
Modified Files:
othersrc/bootstrap-pkgsrc: bootstrap
Log Message:
add some settings for HP-UX. from Eric Schnoebelen in PR pkg/23683.
To generate a diff of this commit:
cvs rdiff -r1.81 -r1.82 othersrc/bootstrap-pkgsrc/bootstrap
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: grant beattie <grant@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: pr/23683 CVS commit: othersrc/bootstrap-pkgsrc/bmake
Date: Wed, 14 Jan 2004 11:20:30 +0000 (UTC)
Module Name: othersrc
Committed By: grant
Date: Wed Jan 14 11:20:30 UTC 2004
Modified Files:
othersrc/bootstrap-pkgsrc/bmake: sigcompat.c util.c
Log Message:
fixes for HP-UX 11.11. from Eric Schnoebelen in PR pkg/23683.
To generate a diff of this commit:
cvs rdiff -r1.1.1.1 -r1.2 othersrc/bootstrap-pkgsrc/bmake/sigcompat.c \
othersrc/bootstrap-pkgsrc/bmake/util.c
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: grant
State-Changed-When: Wed Jan 14 12:47:08 UTC 2004
State-Changed-Why:
committed some of these fixes, awaiting feedback from Eric.
From: eric@cirr.com (Eric Schnoebelen)
To: grant beattie <grant@NetBSD.org>
Cc:
Subject: Re: pkg/23683: bootstrap-pkgsrc -> hp-ux
Date: Sat, 27 Mar 2004 01:03:28 -0600
grant beattie writes:
- I wasn't able to get bmake built on HP-UX 11.11 or 11.22, however.
- please forgive me if any of the following doesn't make sense or is
- the result of a stupid mistake -- I have no clue about HPUX.
-
- it fails here:
-
- CC="cc" CFLAGS="-I. -I. -DHAVE_CONFIG_H -I./missing -D_PATH_DEFSYSPATH=\"/house/grant/pkg/share/mk\" -DMAKE_BOOTSTRAP " MAKESYSPATH=/house/grant/pkg/share/mk ./bmake.boot -f Makefile
- bmake.boot: don't know how to make b. Stop
-
- I guess this is a quoting problem, because manually running
- 'bmake.boot -f Makefile' works, but I wasn't able to track it down.
- do you know where the problem might be?
Ok, I finally got this tracked down. The HP-UX make is
setting MAKEFLAGS to 'b', to ensure Version 7 make(1)
compatibility. However, they don't add the leading flag
indicator... So, bmake takes it as a target.
My change to make this work: Add ``MAKEFLAGS=""'' to the
above invocation of bmake.boot.
I'm a little surprised that this isn't seen on Solaris,
as I thought Solaris and HP-UX had roughly similar makes.
Ah well..
Will the addition of MAKEFLAGS to the bootstrap
invocation cause any problems?
Here's the change in patch/diff format..
Index: bmake/makefile.boot.in
===================================================================
RCS file: /cvsroot/pkgsrc/bootstrap/bmake/makefile.boot.in,v
retrieving revision 1.1.1.1
diff -b -u -w -r1.1.1.1 makefile.boot.in
--- bmake/makefile.boot.in 11 Mar 2004 13:04:10 -0000
1.1.1.1
+++ bmake/makefile.boot.in 27 Mar 2004 06:27:05 -0000
@@ -31,7 +31,7 @@
rm -f *.[ado] */*.[ado]
bootstrap: bmake.boot
- CC="$(CC)" MAKESYSPATH=${MK} ./bmake.boot -f Makefile
+ CC="$(CC)" MAKEFLAGS="" MAKESYSPATH=${MK} ./bmake.boot -f Makefile
install: install-bin install-man install-mk
install-bin:
--
Eric Schnoebelen eric@cirr.com http://www.cirr.com
"Hey, sometimes reinventing the wheel is a good thing. Ever tried
driving on wheels from 3500 BC? :)" -- Mirian Crzig Lennox
State-Changed-From-To: feedback->open
State-Changed-By: wiz
State-Changed-When: Tue Jul 27 15:44:36 UTC 2004
State-Changed-Why:
Feedback supplied.
From: grant beattie <grant@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: PR/23683 CVS commit: pkgsrc/bootstrap/bmake
Date: Fri, 26 Nov 2004 12:08:44 +0000 (UTC)
Module Name: pkgsrc
Committed By: grant
Date: Fri Nov 26 12:08:44 UTC 2004
Modified Files:
pkgsrc/bootstrap/bmake: makefile.boot.in
Log Message:
ensure MAKEFLAGS is empty when calling bmake.boot. HP-UX make(1) sets
MAKEFLAGS incorrectly and bmake interprets this as a target.
from Eric Schnoebelen in PR pkg/23683. thanks!
To generate a diff of this commit:
cvs rdiff -r1.2 -r1.3 pkgsrc/bootstrap/bmake/makefile.boot.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->closed
State-Changed-By: grant@netbsd.org
State-Changed-When: Fri, 26 Nov 2004 12:09:19 +0000
State-Changed-Why:
I have applied this change. thanks!
State-Changed-From-To: closed->feedback
State-Changed-By: grant@netbsd.org
State-Changed-When: Fri, 26 Nov 2004 12:17:35 +0000
State-Changed-Why:
oops - feedback, not closed.
State-Changed-From-To: feedback->closed
State-Changed-By: wiz@netbsd.org
State-Changed-When: Mon, 14 Mar 2005 12:12:17 +0000
State-Changed-Why:
No real reason this is in feedback.
>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.