Subject: Processor types and uname data on AIX (proposed change)
To: None <>
From: Peter Schmiedeskamp <>
List: tech-pkg
Date: 05/06/2004 11:00:54
Hello, I've been working with pkgsrc on AIX 5.1.  I've
noticed that when building binary packages, some
excessively specific machine information gets
associated with my binary packages.

For example I build on a machine called "foo" with the
following information from uname -a:
AIX foo 1 5 000C5C7A4C00

Now, I build on a machine called "bar" with the
following uname -a output:
AIX bar 1 5 000C8D4F4C00

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

Both machines are PowerPC based rs/6000 machines (foo
is a p610 and bar is a 44p).  We regularly build
binaries that run seemlessly on those and a number of
other models.

The long string "000c5c7a4c00" is described in the AIX
uname man page:
The machine ID number contains 12 characters in the
following digit format:
xxyyyyyymmss. The xx positions indicate the system and
is always 00. The yyyyyy
positions contain the unique ID number for the entire
system. The mm position
represents the model ID. The ss position is the
submodel number and is always
00. The model ID describes the ID of the CPU Planar,
not the model of the System
as a whole.

So, in reality when using this uname information, you
can only build binary packages for one specific
machine, even if you have identical hardware.

I suggest that the output of 'uname -prvs' is more
useful when the target is AIX > v.5.  The output is as

root@bar:/usr/pkgsrc/packages/All $ uname -prvs
AIX 1 5 powerpc

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?

Sorry for the long message.  Any AIX persons out there
want to comment?


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