sabotage icon indicating copy to clipboard operation
sabotage copied to clipboard

gmp fails to detect 64bit ABI for some KVM cpu setup

Open rofl0r opened this issue 11 years ago • 6 comments

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.

rofl0r avatar Aug 11 '13 03:08 rofl0r

can reproduce the workaround cp configfsf.guess config.guess works in my case

ghost avatar Jun 24 '16 21:06 ghost

nice. do you want to open a PR ?

rofl0r avatar Jun 25 '16 16:06 rofl0r

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.

ghost avatar Jun 28 '16 22:06 ghost

ping

rofl0r avatar Aug 17 '16 14:08 rofl0r

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?

ghost avatar Aug 17 '16 17:08 ghost

i suppose we can just add another

[ "$A" = "x86_64" ] && cp configfsf.guess config.guess 

rofl0r avatar Aug 17 '16 17:08 rofl0r