Description of problem: RPM dies with "Illegal Instruction", however invoked, when run on a i486. Version-Release number of selected component (if applicable): rpm-4.4.2-15.2.i386.rpm (and -libs, -python, -build) glibc is i386, not i686. How reproducible: Boot system, issue any variant of the rpm command. Yum also dies. Strace output from one invocation is attached. Steps to Reproduce: 1. rpm -qa 2. rpmquery rpm 3. rpm -Uvh .... etc, etc, etc Actual results: "Illegal Instruction" Expected results: Correct output from rpm queries or installation commands. Additional info: This is an actual i486/DX4. It is a _very_ barebones fc5 system, installed by pulling the drive and loading a minimal xen fc5 image on it USB connected to a different system. i486 boots correctly (with some udev angst), and functions properly in all respects except rpm.
Created attachment 137789 [details] strace output
Um, rpm-4.4.2-15.2 is not gonna work on i486 for many many reasons. For starters, rpm uses beecrypt with i686 asm optimizations, rdtsc instruction for performance benchmarks, inline asm for cpu detection, NPTL and pthreads for locking, etc, etc rpm can certainly be compiled to work on i486, just a fair amount of work for no detectable i486 users (yours is the 1st request in like 3 years for functional rpm on i486).
Somehow, I was afraid that was going to be the answer :) Out of curiosity, what would an i486 user's options be here? I'm loath to suggest it, but is rpm in, say, a prior version of fedora core capable of running on this architecture? Or would it be possible to rebuild currentt levels of rpm to run without having to rewrite large sections of the codebase? (e.g. maybe by disabling the problematic sections at compile time?)
All versions of rpm are capable of running on i486, it just depends on how rpm is built. The decision was made to optimize for the majority of i686 users at the expense of the i486 minority. Large sections of the rpm code base do not have to be rewritten. That being said, the task of removing non-i486 instructions is neither pleasant nor easy, and will depend mostly on how other packages, like beecrypt, are built. The specific areas within rpm that use non-i486 instructions are 1) lib/rpmrc.c may have some arch identification through asm that will not function correctly on i486 (I've not looked at an i486 for years). 2) rpmio/rpmsw.c uses rdtsc by default. Disable and use the already implemented gettimeofday instead. 3) make sure you have NPTL in glibc, or change the way that Berkeley DB within rpm is built. There's no other problem areas within rpm afaik. No matter what, rpm as built by Red Hat for quite some years now uses instructions not available on i486. FWIW, OWL linux claims to have an rpm package that will run on i486, there are perhaps other distros that choose to build rpm differently than Red Hat and Fedora does.
Fedora release notes state "Intel Pentium or better processor, and is optimized for Pentium 4 and later processors." as hardware requirements, As pointed out by Jeff in c#4 it should be possible to build rpm capable of running on i486, but WONTFIX in Fedora context.