Failure to run monero (Illegal instruction) on core2duo cpu (AES ?) #18
Comments
Tried to explicitely disable aes support by adding -DNO_AES=ON (in the ebuild after having copied it in my localrepo), no luck. (Still throwing illegal instruction) |
Some news, I forgot to mention that all my packages are built in a chroot (-march=core2) on a AMD system. (-march=bdver2) If I compile monero directly on my core2 laptop (instead of pulling the binary from my AMD system chroot), then it works perfectly ! (and no need to tweak the current ebuild) |
It seems like the Monero CMake configure scripts just assume that x86 has AES extensions unless you explicitly pass I'll try to have a play around with this soon. |
Indeed, passing "-DNO_AES=ON" should disable AES, according to the log, it says "Disabling AES blabla" but the resulting binary is still throwing "Illegal instruction", this only happen when it is built inside the chroot on my AMD system with aes enabled cpu. Looking at the chroot build log at the "Compiler flags" part though, -march=core2 -O2 -pipe -pthread -maes -march=native I suspect the redudancy of -march with -march=core2 and -march=native is causing issue when the package is built inside a chroot. An user on gentoo forum said : I wouldn't be surprised if it put in aes instructions as it's probably doing encryption of sorts." I think it is more likely an issue with monero cmake. Hopefully, this helps a little bit to eventually find a way to solve this. I would understand if this bug is closed since it is related to my particular setup -building inside a chroot for different arch- and not strictly related to the ebuild. |
Fixed ! :) (Build Optimization - The CMake build system will, by default, create optimized native builds for your particular system type when you build the software. Using this method, the binaries created provide a better experience and all together faster performance. However, if you wish to create portable binaries that can be shared between systems, specify -DARCH=default in your CMake arguments during the build process. Note that portable binaries will have a noticable difference in performance than native binaries. For this reason, it is always best to build for your particuar system if possible.)
No more redudancy of -march as you can see :
|
Hi,
I'm unable to run monero on my core2 system. It says : "Illegal instruction".
I think it is related to the fact, that by default monero is configured with AES support
See : https://github.com/monero-project/monero/blob/82149bfe441e56d5f9d72a13ffa25ce1df6d8391/CMakeLists.txt (line 741)
and there is no USE flag to disable it currently (there is no AES support on my core2 duo)
with gdb, the output is the following :
0x0000555555891a6a in _GLOBAL__sub_I_crypto.cpp ()
Maybe it is something else, I'm not sure, but on an other system (with AES support in the cpu), it works fine.
The text was updated successfully, but these errors were encountered: