# Sysimage incompatible between Intel and AMD x86\_64?

**URL:** <https://discourse.julialang.org/t/sysimage-incompatible-between-intel-and-amd-x86-64/42716>\
**Category:** General Usage\
**Tags:** package-compiler, sysimage, hardware\
**Created:** [July 8, 2020, 10:05am UTC](https://discourse.julialang.org/t/sysimage-incompatible-between-intel-and-amd-x86-64/42716 "2020-07-08T10:05:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alkoedl](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@alkoedl](https://discourse.julialang.org/u/alkoedl)\
**Post date:** [July 8, 2020, 10:05am UTC](https://discourse.julialang.org/t/sysimage-incompatible-between-intel-and-amd-x86-64/42716/1 "2020-07-08T10:05:35Z")

</div>

I’m using PackageCompiler to provide colleagues with a batteries included package (Julia + pre-compiled Julia code) that they just unzip and run. This process worked perfectly so far for Intel based computers. Trying to run the package on a computer with AMD processor throws the error  
`ERROR: Unable to find compatible target in system image.`  
Julia is started like this: `julia.exe -J "path\to\sysimage.dll"`.

Is this to be expected? `sysimage.dll` is compiled on an Intel i5-8265U. The error occurs on an AMD Ryzen 9 3900X based computer. Both are running Win10 64 bit.

PackageCompiler offers the option `cpu_target`, but I couldn’t find possible values. Is there a list somewhere? Would this be the right place to adjust the target architecture?

In the PackageCompiler code I found branches depending on 32bit, 64bit, arm, powerpc, but nothing Intel/AMD specific.

Would chances for success maybe be higher if I compiled on an Intel i7? (Unfortunately, I don’t have an AMD to test).

---

<div class="post-metadata">

**Author:** ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)\
**Post date:** [July 8, 2020, 11:57am UTC](https://discourse.julialang.org/t/sysimage-incompatible-between-intel-and-amd-x86-64/42716/2 "2020-07-08T11:57:19Z")

</div>

You need to pass a `cpu_target` argument:  
[https://julialang.github.io/PackageCompiler.jl/dev/refs/](https://julialang.github.io/PackageCompiler.jl/dev/refs/)  
Julia’s documentation provides more details on `JULIA_CPU_TARGET`, and gives the options used for creating the official binaries:  
[https://docs.julialang.org/en/v1/devdocs/sysimg/](https://docs.julialang.org/en/v1/devdocs/sysimg/)

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [July 8, 2020, 12:07pm UTC](https://discourse.julialang.org/t/sysimage-incompatible-between-intel-and-amd-x86-64/42716/3 "2020-07-08T12:07:38Z")

</div>

> [@Elrod](#):
>
> and gives the options used for creating the official binaries:

Which explicitly is

```julia
generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)

```

and also what is used if you use `create_app` in PackageCompiler. For sysimages, it is assumed you want to run it on your own machine so it defaults to `native` for the cpu target.

---

<div class="post-metadata">

**Author:** ![alkoedl](https://avatars.discourse-cdn.com/v4/letter/a/b4bc9f/32.png) [@alkoedl](https://discourse.julialang.org/u/alkoedl)\
**Post date:** [July 8, 2020, 4:44pm UTC](https://discourse.julialang.org/t/sysimage-incompatible-between-intel-and-amd-x86-64/42716/4 "2020-07-08T16:44:23Z")

</div>

Setting cpu\_target to

```julia
generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)

```

did the trick. Thanks also for the pointers to the docs @Elrod. I’m sure I read those pages already more than once but every new read discovers new things…
