sabotage
sabotage copied to clipboard
gmp fails to detect 64bit ABI for some KVM cpu setup
reportedly, with a CPU emulated by qemu/kvm, gmp misdetects the host system as using 32bit abi when in fact it uses 64bit.
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 2
model name : QEMU Virtual CPU version 1.4.2
stepping : 3
microcode : 0x1000065
cpu MHz : 2499.969
cache size : 512 KB
fpu : yes
fpu_exception : yes
cpuid level : 4
wp : yes
flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx lm nopl pni cx16 popcnt hypervisor lahf_lm svm abm sse4a
bogomips : 4999.93
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:
apparently it can be fixed via cp configfsf.guess config.guess
[ "$A" = "x86_64" ] && abihack="ABI=64"
doesnt help since gmp insists that the cpu is incapable of 64bit.
TODO: try to reproduce, than test if the above workaround can be universally applied without breaking other scenarios.
can reproduce
the workaround cp configfsf.guess config.guess
works in my case
nice. do you want to open a PR ?
yeah, can do that. but maybe we should test it on a physical machine too first? I'll try to do that in a few days.
ping
i can build gmp with the workaround mentioned above on x86_64 with both physical hardware and qemu/kvm. don't know about other platforms tho. can anyone test it more?
i suppose we can just add another
[ "$A" = "x86_64" ] && cp configfsf.guess config.guess