I have a Gentoo ebuild for primecoind in my overlay:
https://github.com/salfter/portage/I built it first on my VPS, which has 8 Xeon E5-2670 cores available to it, but immediately upon starting, it bombs out with an "Illegal instruction" error. I then built it for my home workstation, which runs a Core 2 Quad Q6600. As I write this, it's syncing the blockchain.
The VPS is an x86 Gentoo build, as it used to be memory-constrained (with 1 GB, maybe it still is somewhat). The home workstation is an AMD64 Gentoo build.
Does primecoind not run on 32-bit systems, or is there something my ebuild is doing wrong?
(Hmm...just tried my bitcoind ebuild on the VPS, and it's also crashing right away with an "Illegal instruction" error. Must be something it's telling the compiler to do.)
I tried bringing up primecoind under gdb, but gdb crashes with the same error. I think this might explain what's happening:
http://www.gossamer-threads.com/lists/gentoo/user/270976?do=post_view_threadedSet your CFLAGS on your prod server to that of your dev server, if your dev server is known to work. You're using -march=native on your prod server, which depends on gcc correctly detecting CPU features from the host. There was a thread on this list just a few days ago about how that can fail in virtualized environments. (You can enable/disable exposed features piecemeal, which could well confuse the heck out of gcc's detection heuristics...)
I had -march=native set in /etc/make.conf. Setting it to -march=i686 still caused an illegal-instruction error. So did removing -march=* altogether.
More googling turned up this:
http://bugs.funtoo.org/browse/FL-494Chroot into a stage3 build for x86_64 with glibc-2.15-r3 does not work on a xen based linode VPS with a Xeon E5-2630L due to
linode disabling AVX in xen.
Chroot fails with the following error message: "Illegal instruction".Linode probably is not going to enable avx, as "debian/ubuntu have gone the libc patch route ...
https://launchpadlibrarian.net/101306417/eglibc_lucid_fix979003.debdiff" (quoting someon from the linode channel)
My Linode VPS was migrated to new hardware not long ago, and it looks like that may be causing problems that only started to manifest themselves when I tried bringing up primecoind on it. I spooled up a 32-bit Ubuntu 12.04 LTS instance on the VMware box at work and successfully built primecoind on it, so it looks like an issue with my VPS. I'm now rebuilding the whole system with -mtune=generic to try to clean up this problem.