pkgsrc-Users archive

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

Re: pkgsrc on OpenBSD



Tom H <tomh0665%gmail.com@localhost> writes:

> 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?

I think it means that pkgsrc is confusing the values of arch and/or
machine arch.

> 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:

If pkgsrc checks the system arch in many places, it may be best to
normalize the openbsd value to the pgksrc value.  This definitely needs
thought and understanding.

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index