pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkgsrc on OpenBSD



On 27/08/2020 18:51, Tom H wrote:
On Thu, Aug 27, 2020 at 3:59 PM Ottavio Caruso
<ottavio2006-usenet2012%yahoo.com@localhost> wrote:
On 27/08/2020 11:09, Tom H wrote:
On Wed, Aug 26, 2020 at 10:54 PM Jonathan Perkin
<jperkin%joyent.com@localhost> wrote:
* On 2020-08-26 at 20:13 BST, Tom H wrote:

-amd64/*) abi=64 machine_arch=x86_64 ;;
+amd64/*) abi=64 machine_arch=amd64 ;;

Why is this needed? The point of this is to standardise across
various OS, and shouldn't need to match the uname arch.

I've just run "bootstrap" without changing anything, followed by a
"bmake install".

It fails with:

===> Building binary package for digest-20190127
=> Creating binary package /usr/pkgsrc/packages/All/digest-20190127.tgz
malloc() warning: unknown char in MALLOC_OPTIONS
===> Installing binary package of digest-20190127
pkg_add: Warning: package `digest-20190127' was built for a platform:
pkg_add: OpenBSD/amd64 6.7 (pkg) vs. OpenBSD/x86_64 6.7 (this host)
pkg_add: 1 package addition failed
*** Error code 1

Stop.
bmake[3]: stopped in /usr/pkgsrc/pkgtools/digest
*** Error code 1

Stop.
bmake[2]: stopped in /usr/pkgsrc/pkgtools/digest
malloc() warning: unknown char in MALLOC_OPTIONS
*** Error code 1

Stop.
bmake[1]: stopped in /usr/pkgsrc/pkgtools/digest
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/shells/oksh

On OpenBSD 6.7

# arch -s
amd64

# uname -m
amd64

# uname -p
amd64

# sysctl hw.machine
hw.machine=amd64

I started using pkgsrc on OpenBSD in July, so I don't know whether
it worked previously; but the arch was definitely "am64" on previous
versions too.

Did you add "--abi " to ./bootstrap? Otherwise it doesn't make sense,
because ./bootstrap should pick up:

         machine_arch=`arch -s`

oc@OpenBSD:~$ arch -s
amd64

The above output was after running "./bootstrap" without setting any option.

"arch -s" is the problem. It outputs "amd64" and it's transformed by
"bootstrap" into "x86_64" by "amd64/*) abi=64  machine_arch=x86_64
;;", and you end up with "package `digest-20190127' was built for a
platform: pkg_add: OpenBSD/amd64 6.7 (pkg) vs. OpenBSD/x86_64 6.7
(this host)".


I cannot reproduce this issue on OpenBSD 6.6, I haven't got a 6.7 host to try it on.

oc@OpenBSD:~/cvs/pkgsrc$ uname -a
OpenBSD OpenBSD 6.6 GENERIC.MP#3 amd64
oc@OpenBSD:~/cvs/pkgsrc$ cd bootstrap
oc@OpenBSD:~/cvs/pkgsrc/bootstrap$ doas ./bootstrap

[...]

===========================================================================

Please remember to add /usr/pkg/bin to your PATH environment variable
and /usr/pkg/man to your MANPATH environment variable, if necessary.

An example mk.conf file with the settings you provided to "bootstrap"
has been created for you. It can be found in:

      /usr/pkg/etc/mk.conf

You can find extensive documentation of the NetBSD Packages Collection
in /home/oc/cvs/pkgsrc/doc/pkgsrc.txt.

Thank you for using pkgsrc!

===========================================================================

===> bootstrap started: Thu Aug 27 19:59:52 BST 2020
===> bootstrap ended:   Thu Aug 27 20:20:07 BST 2020


oc@OpenBSD:~/cvs/pkgsrc/bootstrap$ cat /usr/pkg/etc/mk.conf
# Example /usr/pkg/etc/mk.conf file produced by bootstrap-pkgsrc
# Thu Aug 27 19:59:53 BST 2020

.ifdef BSD_PKG_MK	# begin pkgsrc settings

ABI=			64
PKGSRC_COMPILER=	clang
CC=			clang
CXX=			clang++
CPP=			${CC} -E
CLANGBASE=		/usr

PKG_DBDIR=		/usr/pkg/pkgdb
LOCALBASE=		/usr/pkg
VARBASE=		/var
PKG_TOOLS_BIN=		/usr/pkg/sbin
PKGINFODIR=		info
PKGMANDIR=		man


.endif			# end pkgsrc settings



Full log here:
https://drive.google.com/file/d/1SC7fYafrzXE5Lgcm7X9yxg9nAERTK7j2/view


--
Ottavio Caruso



Home | Main Index | Thread Index | Old Index