Subject: Re: Processor types and uname data on AIX (proposed change)
To: None <>
From: Peter Schmiedeskamp <>
List: tech-pkg
Date: 05/07/2004 09:53:40
--- grant beattie <> wrote:
> On Thu, May 06, 2004 at 11:00:54AM -0700, Peter
> Schmiedeskamp wrote:
> > The long string is what gets associated with the
> > package.  This is what happens when I take a
> package
> > built on foo and attempt to install it on bar:
> > root@bar:/home/root $ pkg_add
> libiconv-1.9.1nb2.tgz 
> > pkg_add: Package
> `/home/root/./libiconv-1.9.1nb2.tgz'
> > OS mismatch:
> > pkg_add: AIX/000c5c7a4c00 1 (pkg) vs.
> AIX/000c8d4f4c00
> > 1 (this host)
> > pkg_add: aborting.
> > pkg_add: 1 package addition failed
> is your pkg_add locally hacked? I would have
> expected to see the
> AIX version number in this error, too.

No, I'm afraid I'm not yet clever enough to hack my
own local pkg_add.  Interestingly, in AIX parlance, I
think that it _is_ reporting the OS version. 
Apparently, on AIX 5.1 the release _is_ 1.  So, in
"AIX/000c5c7a4c00 1", pkgsrc logically assumes that
the "release number" would reflect the version of the
OS.  Not, so. (AIX is a lion's den for quirkiness.)

Here is an excerpt from the AIX 5.1 uname man page (I
have no idea how difficult these are to come by if you
don't happen to have such a box).


-a Displays all information specified with the -m, -n,
-r, -s, and -v flags.
Cannot be used with the -x or -SName flag. If the -x
flag is specified with the
-a flag, the -x flag overrides it.

-i Displays the machine idenfication (system serial
number). This is used only
on Itanium-based platforms.

-l Displays the LAN network number.

-m On POWER-based platforms, displays the machine ID
number of the hardware
running the system. On 64-bit, Itanium-based
platforms, returns the ia64 string.

-M Displays the system model name. If the model name
attribute does not exist, a
null string is displayed.

-n Displays the name of the node. This may be a name
the system is known by to a
UUCP communications network.

-p Displays the architecture of the system processor.

-r Displays the release number of the operating

-s Displays the system name. This flag is on by

-S Name Sets the name of the node. This can be the
UUCP communications network
name for the system.

-T Name Sets the system name. This can be the UUCP
communications network name
for the system.

-u Displays the system ID number. If this attribute is
not defined, the output
is the same as the output displayed by uname -m.

-v Displays the operating system version.

-x Displays the information specified with the -a flag
as well as the LAN
network number, as specified by the -l flag.

So, "5" (uname -v) refers to the OS version.  And "1"
(uname -r) refers to the OS release number.

> > I suggest that the output of 'uname -prvs' is more
> > useful when the target is AIX > v.5.  The output
> is as
> > follows:
> > 
> > root@bar:/usr/pkgsrc/packages/All $ uname -prvs
> > AIX 1 5 powerpc
> interesting output order given the argument order...
> I presume it's
> -p that produces "powerpc" and not -s :-)

Ah, no the order doesn't appear to matter to the
output. But the flags should atleast be fun and easy
to remember :-)

> > Unfortunately, there is a catch.  Under AIX 4.3,
> the
> > -p flag is not recognized:
> > root@snafu:/home/root $ uname -prvs
> > uname: Not a recognized flag: p
> > Usage: uname [-snlrvmaxuMS:T:]
> > 
> > Ugh!  Under AIX 4.3, there appears to be no good
> way
> > of determining the processor type.  Maybe during
> > bootstrap, we could try to set the uname flags to
> > -prvs, and failing that, fall back to building
> binary
> > packages on a per-machine basis?
> check what bootstrap/bmake/ reports on
> AIX. that should be a
> good starting point.

root@foo:/home/root $

Ah, I see the problem.  Would you like me to create a
patch of for this and e-mail it back?  I
can only test against 4.3 and 5.1 so any other AIX
users may want to test against 5.2...

> whatever you can find can be easily added into the
> bootstrap process.
> thanks for looking into this.
> grant.

Thank you, as alway, for your brainwidth.


Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs