I am trying to compile plutus script on 'Intel(R) Xeon(R) CPU E5-2680 v2' machine. I initialized nix flake from input-output-hk/iogx
haskell template (tried with ghc96 and ghc92), entered development environment with nix develop
and tried to compile simple code like
integerOne :: CompiledCode Integer
integerOne = $$(compile [|| (1 :: Integer) ||])
Compilation fails with
Error: cabal: Failed to build hello-1.0.0.2. The build process terminated with exit code -4
And when I try to load the code to ghci, it reports
Illegal instruction (core dumped)
On my laptop it compiles successfully.
Looking at the coredump I discovered that the instruction was mulx
from adx
cpu feature. /proc/cpuinfo
says that my laptop has that feature, but the server does not.
Except for compiling with PlutusTx.compile
anything other from ghc seems to work on the server well.
The question is, is there any way to run this on my server? Any flag or fix to plutus-tx
or ghc? Can anyone point me to the part of plutus-tx
package (or the proper ghc
?) that generates that instruction?