# PackageCompiler executable Error

**URL:** <https://discourse.julialang.org/t/packagecompiler-executable-error/81466>\
**Category:** General Usage\
**Created:** [May 22, 2022, 4:20pm UTC](https://discourse.julialang.org/t/packagecompiler-executable-error/81466 "2022-05-22T16:20:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![OvidiusCicero](https://avatars.discourse-cdn.com/v4/letter/o/73ab20/32.png) [@OvidiusCicero](https://discourse.julialang.org/u/OvidiusCicero)\
**Post date:** [May 22, 2022, 4:20pm UTC](https://discourse.julialang.org/t/packagecompiler-executable-error/81466/1 "2022-05-22T16:20:03Z")

</div>

Hi

I built an exectuable with

```julia
PackageCompiler.create_app("JuliaPlotting", "/home/christian/trasch/julia-plotting")

```

but when I run it with `/home/christian/trasch/julia-plotting/bin/JuliaPlotting` it spits out the following error:

```julia
  Downloaded artifact: MKL
  Downloaded artifact: MKL
fatal: error thrown and no exception handler available.
InitError(mod=:MKL_jll, error=ErrorException("Unable to automatically install 'MKL' from '/home/christian/.julia/packages/MKL_jll/xglHW/Artifacts.toml'"))
error at ./error.jl:33
#ensure_artifact_installed#23 at /home/christian/packages/julias/julia-1.7/share/julia/stdlib/v1.7/Pkg/src/Artifacts.jl:441
ensure_artifact_installed##kw at /home/christian/packages/julias/julia-1.7/share/julia/stdlib/v1.7/Pkg/src/Artifacts.jl:413
unknown function (ip: 0x7f530f7247ed)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2247 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2429
#ensure_artifact_installed#22 at /home/christian/packages/julias/julia-1.7/share/julia/stdlib/v1.7/Pkg/src/Artifacts.jl:404
unknown function (ip: 0x7f530f7179da)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2247 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2429
ensure_artifact_installed##kw at /home/christian/packages/julias/julia-1.7/share/julia/stdlib/v1.7/Pkg/src/Artifacts.jl:399
unknown function (ip: 0x7f530f7176c8)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2247 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2429
_artifact_str at /home/christian/packages/julias/julia-1.7/share/julia/stdlib/v1.7/Artifacts/src/Artifacts.jl:547
unknown function (ip: 0x7f530f70d447)
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2247 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2429
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1788 [inlined]
jl_f__call_latest at /buildworker/worker/package_linux64/build/src/builtins.c:757
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2247 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2429
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1788 [inlined]
do_apply at /buildworker/worker/package_linux64/build/src/builtins.c:713
#invokelatest#2 at ./essentials.jl:716
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2247 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2429
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1788 [inlined]
do_apply at /buildworker/worker/package_linux64/build/src/builtins.c:713
invokelatest at ./essentials.jl:714
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2247 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2429
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1788 [inlined]
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:126
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:215
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:166 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:587
jl_fptr_interpret_call at /buildworker/worker/package_linux64/build/src/interpreter.c:675
macro expansion at /home/christian/packages/julias/julia-1.7/share/julia/stdlib/v1.7/Artifacts/src/Artifacts.jl:680 [inlined]
find_artifact_dir at /home/christian/.julia/packages/JLLWrappers/QpMQW/src/wrapper_generators.jl:17
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2247 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2429
__init__ at /home/christian/.julia/packages/MKL_jll/xglHW/src/wrappers/x86_64-linux-gnu.jl:9
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2247 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2429
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1788 [inlined]
jl_module_run_initializer at /buildworker/worker/package_linux64/build/src/toplevel.c:73
_finish_julia_init at /buildworker/worker/package_linux64/build/src/init.c:796
julia_init at /buildworker/worker/package_linux64/build/src/init.c:730
jl_init_with_image at /buildworker/worker/package_linux64/build/src/jlapi.c:74
jl_init at /buildworker/worker/package_linux64/build/src/jlapi.c:90
main at /home/christian/trasch/julia-plotting/bin/JuliaPlotting (unknown line)
unknown function (ip: 0x7f5314801d8f)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
_start at /home/christian/trasch/julia-plotting/bin/JuliaPlotting (unknown line)

```

I am on Ubuntu 22.04. Am I doing something obviously wrong?

---

<div class="post-metadata">

**Author:** ![fft](https://avatars.discourse-cdn.com/v4/letter/f/e8c25b/32.png) [@fft](https://discourse.julialang.org/u/fft)\
**Post date:** [May 22, 2022, 9:29pm UTC](https://discourse.julialang.org/t/packagecompiler-executable-error/81466/2 "2022-05-22T21:29:13Z")

</div>

I had this problem with MKL as well. The solution found was to use `include_lazy_artifacts=true` in the create\_app function call.

In your case:

```julia
PackageCompiler.create_app("JuliaPlotting", "/home/christian/trasch/julia-plotting", include_lazy_artifacts=true)

```

This worked for me and should make sure everything gets included, though it can mean the end result is quite large.

---

<div class="post-metadata">

**Author:** ![OvidiusCicero](https://avatars.discourse-cdn.com/v4/letter/o/73ab20/32.png) [@OvidiusCicero](https://discourse.julialang.org/u/OvidiusCicero)\
**Post date:** [May 23, 2022, 2:32pm UTC](https://discourse.julialang.org/t/packagecompiler-executable-error/81466/3 "2022-05-23T14:32:59Z")

</div>

works! Thank you

---

<div class="post-metadata">

**Author:** ![YNijsure](https://avatars.discourse-cdn.com/v4/letter/y/e0b2c6/32.png) [@YNijsure](https://discourse.julialang.org/u/YNijsure)\
**Post date:** [June 2, 2022, 11:37pm UTC](https://discourse.julialang.org/t/packagecompiler-executable-error/81466/4 "2022-06-02T23:37:09Z")

</div>

I am using Julia 1.7.3 and PackageCompiler 2.0, I am having exactly the same issue. My OS is CentOS Linux release 7.9.2009. Unfortunately, the above solution does not work for me.  
I believe this issue could be related to [Error installing artifact dependency](https://discourse.julialang.org/t/error-installing-artifact-dependency/57961), I have tried both the above solutions, but it doesnt work for me. Please help. Thanks

---

<div class="post-metadata">

**Author:** ![a6a3uh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/a6a3uh/32/33773_2.png) [@a6a3uh](https://discourse.julialang.org/u/a6a3uh)\
**Post date:** [June 8, 2022, 11:40am UTC](https://discourse.julialang.org/t/packagecompiler-executable-error/81466/5 "2022-06-08T11:40:47Z")

</div>

Having the same on Ubuntu 20.04. None from above helps. If you have found some solution pls let us know.

---

<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 4, 2022, 6:56am UTC](https://discourse.julialang.org/t/packagecompiler-executable-error/81466/6 "2022-07-04T06:56:13Z")

</div>

When [New version: PackageCompiler v2.0.7 by JuliaRegistrator · Pull Request #63599 · JuliaRegistries/General · GitHub](https://github.com/JuliaRegistries/General/pull/63599) is merged this should hopefully be fixed by updating to the latest PackageCompiler version.

---

<div class="post-metadata">

**Author:** ![itan1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/itan1/32/44584_2.png) [@itan1](https://discourse.julialang.org/u/itan1)\
**Post date:** [July 7, 2023, 1:20pm UTC](https://discourse.julialang.org/t/packagecompiler-executable-error/81466/7 "2023-07-07T13:20:22Z")

</div>

I am running into the same error when compiling a C++ - Julia helloworld like app with Package Compiler. When I build the application locally I can run it just fine. When I build it in a pipeline I can run it in the pipeline environment but not on my local machine. For mac I could successfully compile a relocatable app, but for both Linux and Windows I get the exact same error:

```julia
C:\Users\itan\Downloads\artifacts\artifacts\build_app\Debug\bin>app.exe
WARNING: @ccallable was already defined for this method name
Hello C++ App!
fatal: error thrown and no exception handler available.
ErrorException("`ccall` requires the compiler")
enable_finalizers at gcutils.jl:124
unlock at lock.jl:177
unlock at stream.jl:284
print at strings/io.jl:49
println at strings/io.jl:75

```

I’ve set `include_lazy_artifacts=true` but the error remains the same
