$ rpm -q coreutils coreutils-9.1-12.fc38.x86_64 $ uname -i unknown debugging the code in GDB the problem seems to be a configuration problem at build time. The problem is this little block of code: if (toprint & PRINT_HARDWARE_PLATFORM) { char const *element = unknown; #if HAVE_SYSINFO && defined SI_PLATFORM { static char hardware_platform[257]; if (0 <= sysinfo (SI_PLATFORM, hardware_platform, sizeof hardware_platform)) element = hardware_platform; } #endif #ifdef UNAME_HARDWARE_PLATFORM if (element == unknown) { static char hardware_platform[257]; size_t s = sizeof hardware_platform; static int mib[] = { CTL_HW, UNAME_HARDWARE_PLATFORM }; if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0) element = hardware_platform; } #endif if (! (toprint == UINT_MAX && element == unknown)) => print_element (element); } What is happening is both: #if HAVE_SYSINFO && defined SI_PLATFORM and #ifdef UNAME_HARDWARE_PLATFORM are false and so neither sysinfo nor sysctl are being called. Reproducible: Always Actual Results: unknown Expected Results: x86_64 (or whatever the arch is) also seems to affect: coreutils-9.3-1.fc39
This worked properly on Fedora 37
Please use `uname -m` for this. The -i and -p options of uname have been documented as non-portable since 2015: http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=v8.24-7-g6d67649 *** This bug has been marked as a duplicate of bug 2126206 ***