pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/59430: Revive pkgsrc on modern AIX
The following reply was made to PR pkg/59430; it has been noted by GNATS.
From: Thomas Klausner <wiz%gatalith.at@localhost>
To: "Callahan, Brian Robert" <callab5%rpi.edu@localhost>
Cc: "bcallah%openbsd.org@localhost" <bcallah%openbsd.org@localhost>,
NetBSD bugtracking <gnats-bugs%NetBSD.org@localhost>
Subject: Re: pkg/59430: Revive pkgsrc on modern AIX
Date: Sat, 17 May 2025 19:08:03 +0200
Hi Brian!
Thanks for the information.
I don't have a solution for you, but here are some hints, perhaps you
can come up with something:
OS_VERSION is set in pkgsrc/mk/bsd.prefs.mk, and there's a special
case for AIX:
.elif ${NATIVE_OPSYS} == "AIX"
. if exists(/usr/bin/oslevel)
_NATIVE_OS_VERSION!= /usr/bin/oslevel
. else
_NATIVE_OS_VERSION!= echo `${UNAME} -v`.`${UNAME} -r`
. endif
NATIVE_OS_VERSION= ${_NATIVE_OS_VERSION:C/([0-9]*\.[0-9]*).*/\1/}
(OS_VERSION is later set using NATIVE_OS_VERSION).
This means, if /usr/bin/oslevel is installed, its output is used as a
version; if not, 'uname -v' and 'uname -r' are concatenated, which
would lead to the 7.2 you see.
(Is oslevel installed? What does it return?)
The other version number to compare against is in
pkgsrc/pkgtools/pkg_install/files/add/perform.c:
if (uname(&host_uname) < 0) {
...
}
normalise_platform(host_name: &host_uname);
effective_opsys = OPSYS_NAME;
effective_os_version = host_uname.release;
I.e. here, just host_uname.release is used, which is equivalent to
'uname -r'.
I didn't find any preprocessor symbol I could use in the C code to add
AIX-specific changes to use the combination of host_uname.version and
host_uname.release here. There[1] are some that check for the xlc
compiler, but you're using gcc, so they won't help. Do you know of
any?
Btw, I think it would be a good idea to send your blog post as an
email to the tech-pkg mailing list, I think you might get useful
feedback there.
Cheers,
Thomas
[1] https://www.ibm.com/docs/en/xl-c-aix/13.1.3?topic=macros-indicating-xl-compiler
Home |
Main Index |
Thread Index |
Old Index