# Problems creating App with PackageCompiler.jl

**URL:** <https://discourse.julialang.org/t/problems-creating-app-with-packagecompiler-jl/126181>\
**Category:** General Usage\
**Created:** [February 22, 2025, 12:05pm UTC](https://discourse.julialang.org/t/problems-creating-app-with-packagecompiler-jl/126181 "2025-02-22T12:05:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_73](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alex_73/32/206879_2.png) [@Alex\_73](https://discourse.julialang.org/u/Alex_73)\
**Post date:** [February 22, 2025, 12:05pm UTC](https://discourse.julialang.org/t/problems-creating-app-with-packagecompiler-jl/126181/1 "2025-02-22T12:05:28Z")

</div>

\*\* environment: linux with Version 1.11.3 (2025-01-21) of julia and the latest version of PackageCompiler.jl

I started studying the PackageCompiler.jl documentation and tried to reproduce the example [sample](https://julialang.github.io/PackageCompiler.jl/stable/apps.html). More precisely, I ran:

```julia
[alex@desk ~]$ cd .julia/packages/PackageCompiler/UbaS4/examples
[alex@desk examples]$ julia
julia> using Pkg
julia> Pkg.generate("MyApp")
julia> exit()
[alex@desk ~]$ julia -q --project
julia> using PackageCompiler
julia> create_app("MyApp", "MyAppCompiled")

```

However, I received:

```julia
PackageCompiler: bundled libraries:
  ├── Base:
  │ ├── libLLVM-16jl.so - 126.855 MiB
  │ ├── libLLVM.so.19.1 - 134.303 MiB
  │ ├── libatomic.so.1.2.0 - 168.273 KiB
  │ ├── libatomic_ops.so.1.2.0 - 13.812 KiB
  │ ├── libatomic_ops_gpl.so.1.2.1 - 13.891 KiB
  │ ├── libgcc_s.so.1 - 894.664 KiB
  │ ├── libgfortran.so.5.0.0 - 9.856 MiB
  │ ├── libgmp.so.10.5.0 - 662.625 KiB
  │ ├── libgmpxx.so.4.7.0 - 30.039 KiB
  │ ├── libgomp.so.1.0.0 - 1.499 MiB
  │ ├── libmpfr.so.6.2.1 - 757.562 KiB
  │ ├── libopenlibm.so.4.0 - 188.570 KiB
  │ ├── libpcre2-8.so.0.13.0 - 629.953 KiB
  │ ├── libquadmath.so.0.0.0 - 940.164 KiB
  │ ├── libstdc++.so.6.0.33 - 21.030 MiB
  │ ├── libunwind-coredump.so.0.0.0 - 25.750 KiB
  │ ├── libunwind-ptrace.so.0.0.0 - 22.062 KiB
  │ ├── libunwind-setjmp.so.0.0.0 - 12.938 KiB
  │ ├── libunwind-x86_64.so.8.1.0 - 69.734 KiB
  │ ├── libunwind.so.8.1.0 - 61.898 KiB
  │ ├── libz.so.1.3.1 - 98.016 KiB
  │ ├── libzbar.so.0.3.0 - 234.141 KiB
  │ ├── libzbargtk.so.0.0.2 - 25.945 KiB
  │ ├── libzbarqt.so.0.1.2 - 82.133 KiB
  │ ├── libzimg.so.2.0.0 - 822.219 KiB
  │ ├── libzip.so.5.5 - 126.938 KiB
  │ ├── libzix-0.so.0.6.2 - 54.016 KiB
  │ ├── libzmf-0.0.so.0.0.2 - 158.055 KiB
  │ ├── libzmq.so.5.2.5 - 914.016 KiB
  │ ├── libzstd.so.1.5.6 - 889.945 KiB
  │ ├── libzvbi-chains.so.0.0.0 - 61.953 KiB
  │ ├── libzvbi.so.0.13.2 - 519.430 KiB
  │ ├── libzzip-0.so.13.0.78 - 30.359 KiB
  │ ├── libzzipfseeko-0.so.13.0.78 - 17.883 KiB
  │ ├── libzzipmmapped-0.so.13.0.78 - 21.883 KiB
  │ ├── libzzipwrap-0.so.13.0.78 - 13.883 KiB
  │ ├── libjulia.so.1.11.3 - 103.180 KiB
  ├── Stdlibs:
  │ ├── OpenBLAS_jll
ERROR: IOError: symlink("libopenblas_64.so.0.3", "MyAppCompiled/lib/julia/libopenblas64_.so"): file already exists (EEXIST)
Stacktrace:
 [1] cp
   @ ./file.jl:378 [inlined]
 [2] bundle_julia_libraries(dest_dir::String, stdlibs::Vector{String})
   @ PackageCompiler ~/.julia/packages/PackageCompiler/UbaS4/src/PackageCompiler.jl:1395
 [3] create_app(package_dir::String, app_dir::String; executables::Nothing, precompile_execution_file::Vector{…}, precompile_statements_file::Vector{…}, incremental::Bool, filter_stdlibs::Bool, force::Bool, c_driver_program::String, cpu_target::String, include_lazy_artifacts::Bool, sysimage_build_args::Cmd, include_transitive_dependencies::Bool, include_preferences::Bool, script::Nothing)
   @ PackageCompiler ~/.julia/packages/PackageCompiler/UbaS4/src/PackageCompiler.jl:863
 [4] create_app(package_dir::String, app_dir::String)
   @ PackageCompiler ~/.julia/packages/PackageCompiler/UbaS4/src/PackageCompiler.jl:829
 [5] top-level scope
   @ REPL[2]:1

```

From what I understand, it seems to be a problem in the PackageCompiler package… Since I’m still new to julia, I would like to check if my assumption is correct? (Problem with the PackageCompiler package) If that’s the case, I’ll report it in the project’s Issues…

Or is it just a beginner’s mistake?

---

<div class="post-metadata">

**Author:** ![KajWiik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kajwiik/32/199_2.png) [@KajWiik](https://discourse.julialang.org/u/KajWiik)\
**Post date:** [February 22, 2025, 2:13pm UTC](https://discourse.julialang.org/t/problems-creating-app-with-packagecompiler-jl/126181/2 "2025-02-22T14:13:08Z")

</div>

I tried this example and it compiled just fine:  
[https://julialang.github.io/PackageCompiler.jl/stable/apps.html#Creating-an-app](https://julialang.github.io/PackageCompiler.jl/stable/apps.html#Creating-an-app)

---

<div class="post-metadata">

**Author:** ![Alex\_73](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alex_73/32/206879_2.png) [@Alex\_73](https://discourse.julialang.org/u/Alex_73)\
**Post date:** [February 22, 2025, 2:40pm UTC](https://discourse.julialang.org/t/problems-creating-app-with-packagecompiler-jl/126181/3 "2025-02-22T14:40:21Z")

</div>

Okay, I must be doing something wrong… Thanks for the feedback.

---

<div class="post-metadata">

**Author:** ![Alex\_73](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alex_73/32/206879_2.png) [@Alex\_73](https://discourse.julialang.org/u/Alex_73)\
**Post date:** [February 22, 2025, 4:01pm UTC](https://discourse.julialang.org/t/problems-creating-app-with-packagecompiler-jl/126181/4 "2025-02-22T16:01:57Z")

</div>

So… I used this sequence of steps:

```julia
julia
using Pkg
Pkg.generate("MyApp")
exit()
julia -q --project
using PackageCompiler
create_app("MyApp", "MyAppCompiled")

```

The error remains…

Did I forget something? If so, what was the sequence of steps you used?

Also, the version of what I’m using is: PackageCompiler v2.2.0. Does it match yours?

---

<div class="post-metadata">

**Author:** ![KajWiik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kajwiik/32/199_2.png) [@KajWiik](https://discourse.julialang.org/u/KajWiik)\
**Post date:** [February 22, 2025, 8:48pm UTC](https://discourse.julialang.org/t/problems-creating-app-with-packagecompiler-jl/126181/5 "2025-02-22T20:48:43Z")

</div>

Hm, I did not

```julia
using Pkg
Pkg.generate("MyApp")
exit()

```

because MyApp exists.

I just

```julia
cd /tmp
cp -r ~/.julia/packages/PackageCompiler/UbaS4/examples/MyApp .

julia -q --project

julia> using PackageCompiler
julia> create_app("MyApp", "MyAppCompiled")
julia> exit()

```

---

<div class="post-metadata">

**Author:** ![Alex\_73](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alex_73/32/206879_2.png) [@Alex\_73](https://discourse.julialang.org/u/Alex_73)\
**Post date:** [March 1, 2025, 10:27am UTC](https://discourse.julialang.org/t/problems-creating-app-with-packagecompiler-jl/126181/7 "2025-03-01T10:27:57Z")

</div>

I think I’ve figured out the problem… During this week, I tried to reproduce the problem on another OS. So, I followed the same steps I described here in the post using PoP!\_OS 22.04 LTS. In this case, the problem didn’t occur.

My main system is ArchLinux. Since it’s been installed for over two years, I decided to try to reproduce the problem on a “clean install”. As a result, this time Julia didn’t even start. The error reported was:

```julia
$ julia
ERROR: Unable to load dependent library /home/alex/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/bin/../lib/julia/libopenlibm.so
Message:/home/alex/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/bin/../lib/julia/libopenlibm.so: cannot enable executable stack as shared object requires: Invalid argument

```

With a quick google search, I found this blog post: [https://discourse.julialang.org/t/error-cannot-enable-executable-stack-when-starting-julia-solved/125655](https://discourse.julialang.org/t/error-cannot-enable-executable-stack-when-starting-julia-solved/125655)

It describes the problem in more detail… But in short, it may have something to do with a glib update (see [https://github.com/JuliaLang/julia/issues/57250](https://github.com/JuliaLang/julia/issues/57250)) for more details…)

The suggestion that worked on (clean Arch Linux install) was:

```julia
git clone https://aur.archlinux.org/execstack.git
sudo pacman -S elfutils (if you don't have it installed)
cd execstack/
makepkg
sudo pacman -U execstack-....pkg.tar.zst
execstack -c /home/user/.julia/juliaup/julia-1.11.3+0.x64.linux.gnu/bin/../lib/julia/libopenlibm.so

julia
] + add PackageCompiler
using Pkg
Pkg.generate("MyApp")
exit()

julia -q --project
using PackageCompiler
create_app("MyApp", "MyAppCompiled")

```

As soon as possible, I’ll test it on my main system (Arch ~2 years old) and update the post.

\*Conclusion: It seems to have nothing to do with PackageCompiler.jl, but I think it’s better not to change the post name because others may have similar problems…
