<p>try this <a href="https://github.com/schwarzer-swan/ppbl1013/blob/main/flake.nix" rel="nofollow noreferrer">flake.nix</a>, it uses the iogx as well with plutus-tx &gt;= 1.21.  The corresponding code builds on my lenovo p1 laptop with Xeon CPU. Although, I am not sure if it is the exact CPU as your specs.</p>

CC BY-SA 4.0
2024-03-25T16:44:17.637Z
Thank you for the reply.  I tried your flake.  I cloned the repo and tried to enter development environment.  When nix built it, it dumped core while compiling `plutus-script-utils` so I believe the repo also has the same problem.
amakarov
CC BY-SA 4.0
2024-03-25T09:48:57.107Z
2024-03-25T09:48:57.107Z
schwarzer schwan
<p>The problem lies in the <code>blst</code> C library that is a dependency of <code>cardano-crypto-class</code> Haskell library.  <code>blst</code> should be built with <code>-D__BLST_PORTABLE__</code> flags as in <a href="https://github.com/input-output-hk/iohk-nix/blob/839040612c0d13687059b5cfaaa3f58c354989c6/overlays/crypto/libblst.nix" rel="nofollow noreferrer">iohk-nix</a>.</p>

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

CC BY-SA 4.0
2024-03-18T20:31:08.940Z
I created the ticket: https://github.com/IntersectMBO/plutus/issues/5842
amakarov
<plutustx><ghc>
Plutus-tx on XEON v2
# Plutus-tx on XEON v2

(Asked by: username_0 on 2024-03-15)

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?

**Tags:** plutustx, ghc

> **Comments:**
> **username_0**: I created the ticket: https://github.com/IntersectMBO/plutus/issues/5842  

---

## 2 answers

### Answer by username_0 on 2024-04-08. Score: 0 | Accepted answer

The problem lies in the `blst` C library that is a dependency of `cardano-crypto-class` Haskell library. `blst` should be built with `-D__BLST_PORTABLE__` flags as in [iohk-nix](https://github.com/input-output-hk/iohk-nix/blob/839040612c0d13687059b5cfaaa3f58c354989c6/overlays/crypto/libblst.nix).


---

### Answer by username_1 on 2024-03-25. Score: 0

try this [flake.nix](https://github.com/username_1-swan/ppbl1013/blob/main/flake.nix), it uses the iogx as well with plutus-tx >= 1.21. The corresponding code builds on my lenovo p1 laptop with Xeon CPU. Although, I am not sure if it is the exact CPU as your specs.

> **Comments:**
> **username_0**: Thank you for the reply.  I tried your flake.  I cloned the repo and tried to enter development environment.  When nix built it, it dumped core while compiling `plutus-script-utils` so I believe the repo also has the same problem.  

---

