pkgsrc-Users archive

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

Re: pkgsrc on OpenBSD



On Thu, Aug 27, 2020 at 11:52 PM Jonathan Perkin <jperkin%joyent.com@localhost> wrote:
> * On 2020-08-27 at 22:47 BST, Tom H wrote:
>
>> We could have an "case-esac" statement within the "amd64/*) " case
>> that sets "abi" and "machine_arch".
>
> The point of the bootstrap code is to normalise the MACHINE_ARCH
> setting across all of our supported OPSYS, so the correct fix is
> instead to figure out where the "amd64" is coming from (I'm assuming
> it's getting baked into the devel/bmake build somewhere) and change
> that to use MACHINE_ARCH.

Doesn't the error message mean "you're installing an x86_64 package on
an amd64 machine" as a result of pkg_add doing a runtime check for the
machine architecture?

Whether this is the case or not, I suspect that it won't have to be
just bmake, but any invocation of "arch"/"arch -k"/"arch -k" for
OpenBSD in the compilation of pkg_install too will have to be
special-cased for amd64.

For bmake, maybe changing these'll do it.

# grep -A3 OpenBSD devel/bmake/files/*.sh
devel/bmake/files/machine.sh:OpenBSD)
devel/bmake/files/machine.sh- MACHINE=$OS$OSMAJOR.$machine
devel/bmake/files/machine.sh- arch=`Which arch /usr/bin:/usr/ucb:$PATH`
devel/bmake/files/machine.sh- MACHINE_ARCH=`$arch -s`;
--
devel/bmake/files/os.sh: OpenBSD)
devel/bmake/files/os.sh- arch=`Which arch /usr/bin:/usr/ucb:$PATH`
devel/bmake/files/os.sh- MACHINE_ARCH=`$arch -s`
devel/bmake/files/os.sh- ;;

If I only search "config.guess", UNAME_MACHINE_ARCH'll be set to
"amd64" for pkg_install as well as a few non-bootstrap packages:

# find . -name config.guess | xargs grep OpenBSD
./archivers/libarchive/files/build/autoconf/config.guess:    *:OpenBSD:*:*)
./archivers/libarchive/files/build/autoconf/config.guess:
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
./archivers/pax/files/config.guess:    *:OpenBSD:*:*)
./archivers/pax/files/config.guess: UNAME_MACHINE_ARCH=`arch | sed
's/OpenBSD.//'`
./mk/gnu-config/config.guess:    *:OpenBSD:*:*)
./mk/gnu-config/config.guess: UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
./net/fetch/files/config.guess:    *:OpenBSD:*:*)
./net/fetch/files/config.guess: UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
./net/tnftp/files/buildaux/config.guess:    *:OpenBSD:*:*)
./net/tnftp/files/buildaux/config.guess: UNAME_MACHINE_ARCH=`arch |
sed 's/OpenBSD.//'`
./pkgtools/compat_headers/files/config.guess:    *:OpenBSD:*:*)
./pkgtools/compat_headers/files/config.guess: UNAME_MACHINE_ARCH=`arch
| sed 's/OpenBSD.//'`
./pkgtools/digest/files/config.guess:    *:OpenBSD:*:*)
./pkgtools/digest/files/config.guess: UNAME_MACHINE_ARCH=`arch | sed
's/OpenBSD.//'`
./pkgtools/libnbcompat/files/config.guess:    *:OpenBSD:*:*)
./pkgtools/libnbcompat/files/config.guess: UNAME_MACHINE_ARCH=`arch |
sed 's/OpenBSD.//'`
./pkgtools/mtree/files/config.guess:    *:OpenBSD:*:*)
./pkgtools/mtree/files/config.guess: UNAME_MACHINE_ARCH=`arch | sed
's/OpenBSD.//'`
./pkgtools/pkg_install/files/config.guess:    *:OpenBSD:*:*)
./pkgtools/pkg_install/files/config.guess: UNAME_MACHINE_ARCH=`arch |
sed 's/OpenBSD.//'`
./pkgtools/rcorder/files/config.guess:    *:OpenBSD:*:*)
./pkgtools/rcorder/files/config.guess: UNAME_MACHINE_ARCH=`arch | sed
's/OpenBSD.//'`
./textproc/nbsed/files/config.guess:    *:OpenBSD:*:*)
./textproc/nbsed/files/config.guess: UNAME_MACHINE_ARCH=`arch | sed
's/OpenBSD.//'`


Home | Main Index | Thread Index | Old Index