# Illegal instruction in binary artifacts

**URL:** <https://discourse.julialang.org/t/illegal-instruction-in-binary-artifacts/37894>\
**Category:** New to Julia\
**Created:** [April 20, 2020, 11:54am UTC](https://discourse.julialang.org/t/illegal-instruction-in-binary-artifacts/37894 "2020-04-20T11:54:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pavel\_Kalouguine](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pavel_kalouguine/32/7730_2.png) [@Pavel\_Kalouguine](https://discourse.julialang.org/u/Pavel_Kalouguine)\
**Post date:** [April 20, 2020, 11:54am UTC](https://discourse.julialang.org/t/illegal-instruction-in-binary-artifacts/37894/1 "2020-04-20T11:54:04Z")

</div>

It seems that I stumbled upon this issue:  
[https://github.com/JuliaGraphics/Gtk.jl/issues/494](https://github.com/JuliaGraphics/Gtk.jl/issues/494)  
when testing Makie on my config (it is Debian 10 on AMD A6-3600, not ssse3, so I had to build Julia 1.4.1 from the source). Julia itself (Core+Base) works well, but several official packages fail on testing with a message like this one:

Invalid instruction at 0x7f2a3a47d7fa: 0x66, 0x0f, 0x38, 0x1d, 0xc0, 0x5d, 0xc3, 0x55, 0x48, 0x89, 0xe5, 0x48, 0x83, 0xec, 0x18

I assume that building local versions of packages would fix the problem, but could not figure out how to deactivate the default choice of using binary artifacts.

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [April 21, 2020, 8:40am UTC](https://discourse.julialang.org/t/illegal-instruction-in-binary-artifacts/37894/2 "2020-04-21T08:40:46Z")

</div>

> [@Pavel\_Kalouguine](#):
>
> but could not figure out how to deactivate the default choice of using binary artifacts.

[https://julialang.github.io/Pkg.jl/v1/artifacts/#Overriding-artifact-locations-1](https://julialang.github.io/Pkg.jl/v1/artifacts/#Overriding-artifact-locations-1)

---

<div class="post-metadata">

**Author:** ![Pavel\_Kalouguine](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pavel_kalouguine/32/7730_2.png) [@Pavel\_Kalouguine](https://discourse.julialang.org/u/Pavel_Kalouguine)\
**Post date:** [April 21, 2020, 12:11pm UTC](https://discourse.julialang.org/t/illegal-instruction-in-binary-artifacts/37894/3 "2020-04-21T12:11:19Z")

</div>

The question is - what do I put into Overrides.toml? For instance, there is a problem with libjpeg.so, located at  
`~/.julia/artifacts/53a94d62826cdd7a6391670c8576acbabc80e17f/lib/libjpeg.so`

There is a system library libjpeg.so at /usr/lib/x86\_64-linux-gnu/libjpeg.so - should I put a line

`53a94d62826cdd7a6391670c8576acbabc80e17f = "/usr/lib/x86_64-linux-gnu/"`

or

`53a94d62826cdd7a6391670c8576acbabc80e17f = "/usr/lib/x86_64-linux-gnu/libjpeg.so"`

or something else?

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [April 21, 2020, 12:18pm UTC](https://discourse.julialang.org/t/illegal-instruction-in-binary-artifacts/37894/4 "2020-04-21T12:18:05Z")

</div>

The path to the “prefix”, inside which there is the same tree as your `~/.julia/artifacts/53a94d62826cdd7a6391670c8576acbabc80e17f`. More precisely, these products should be there:

> <https://github.com/JuliaPackaging/Yggdrasil/blob/2f8e8fc59837a0c4a9e7a9f3eba0767b15307fe8/J/JpegTurbo/build_tarballs.jl#L33-L37>

the libraries under `lib/`, the executables under `bin/`

---

<div class="post-metadata">

**Author:** ![Pavel\_Kalouguine](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pavel_kalouguine/32/7730_2.png) [@Pavel\_Kalouguine](https://discourse.julialang.org/u/Pavel_Kalouguine)\
**Post date:** [April 21, 2020, 1:07pm UTC](https://discourse.julialang.org/t/illegal-instruction-in-binary-artifacts/37894/5 "2020-04-21T13:07:51Z")

</div>

As far as I understand, I have to build the artifact locally and then put its location in Overrides.toml. I tried to build libjpeg using the build recipes from Yggdrasil, but to no avail:

```julia
../julia-1.4.1/usr/bin/julia --color=yes generate_buildjl.jl J/JpegTurbo/build_tarballs.jl
[ Info: Build tarballs script: J/JpegTurbo/build_tarballs.jl
[ Info: Repo name: JuliaBinaryWrappers/JpegTurbo_jll.jl
   Updating registry at `~/.julia/registries/General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git`
ERROR: LoadError: MethodError: no method matching registered_paths(::Pkg.Types.EnvCache, ::Base.UUID)
Closest candidates are:
  registered_paths(::Pkg.Types.Context, ::Base.UUID) at /home/kalugin/julia-1.4.1/usr/share/julia/stdlib/v1.4/Pkg/src/Types.jl:1194
Stacktrace:
 [1] top-level scope at /home/kalugin/Yggdrasil/generate_buildjl.jl:170
 [2] include(::Module, ::String) at ./Base.jl:377
 [3] exec_options(::Base.JLOptions) at ./client.jl:288
 [4] _start() at ./client.jl:484
in expression starting at /home/kalugin/Yggdrasil/generate_buildjl.jl:163

```

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [April 21, 2020, 2:10pm UTC](https://discourse.julialang.org/t/illegal-instruction-in-binary-artifacts/37894/6 "2020-04-21T14:10:38Z")

</div>

No no, you want to do a normal native compilation locally, don’t use BinaryBuilder
