Ticket #5516 (closed defect: fixed)
gmp-mpir-0.9: build failure inside kvm 64 bit virtual machine
|Reported by:||tornaria||Owned by:||mabshoff|
When running a 64 bit virtual cpu in kvm (72+dfsg-4, debian/lenny), the virtual cpuid reports the cpu as:
vendor_id : GenuineIntel cpu family : 6 model : 2 model name : QEMU Virtual CPU version 0.9.1 stepping : 3
AFAICT, from intel's cpuid documentation in http://download.intel.com/design/processor/applnots/24161832.pdf, such a family/model combination doesn't actually exist (pentiumpro is model 1, pentium II is model 3 and 5, celeron is model 6, etc).
On the other hand the config.guess script in mpir considers anything models 2 to 6 as being pentium2. Misdetection is already bad because core 2 optimizations should be much better than pentium II ones.
The build then fails because for a pentium II, the configure logic forces ABI=32, and this is wrong (configure complains about sizeof(long) not being 4, indeed it is 8).
Of course, this seems to be a bug in kvm; but maybe it should be workarounded? I don't think it is relevant, but just in case the host cpu reports family=6, model=23 (it's a core 2 quad Q9550).
After the fact I discovered that one can use the following command line switch when running kvm:
to set family/model to a core2, and also set ssse3 cpu flag (disabled by default). Unfortunately, this comand line switch doesn't support models higher than 15, nor the sse4_1 flag.