# PackageCompiler for having a simple .exe?

**URL:** <https://discourse.julialang.org/t/packagecompiler-for-having-a-simple-exe/35071>\
**Category:** General Usage\
**Created:** [February 24, 2020, 1:00pm UTC](https://discourse.julialang.org/t/packagecompiler-for-having-a-simple-exe/35071 "2020-02-24T13:00:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darione](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/darione/32/12160_2.png) [@Darione](https://discourse.julialang.org/u/Darione)\
**Post date:** [February 24, 2020, 1:00pm UTC](https://discourse.julialang.org/t/packagecompiler-for-having-a-simple-exe/35071/1 "2020-02-24T13:00:26Z")

</div>

Hello, i am looking for a PackageCompiler instruction for humans, because it seems to me that there are a lot of links in internet but it is difficult to find the most simple case : own simple script that print something translated to executable. But i am not able to find it … also looking inside this forum …

I have added PackageCompiler to Julia, ok.  
I am on windows 10.  
If i have my simple script called

`hello.jl`

with inside a simple print

`println("Hello first build!")`

After have done this:

```julia
import Pkg
Pkg.add('PackageCompiler')

```

What should i do to get this

`hello.exe`

?  
Many thanks…

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [February 24, 2020, 1:03pm UTC](https://discourse.julialang.org/t/packagecompiler-for-having-a-simple-exe/35071/2 "2020-02-24T13:03:59Z")

</div>

[https://julialang.github.io/PackageCompiler.jl/dev/apps/](https://julialang.github.io/PackageCompiler.jl/dev/apps/)

---

<div class="post-metadata">

**Author:** ![Darione](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/darione/32/12160_2.png) [@Darione](https://discourse.julialang.org/u/Darione)\
**Post date:** [February 24, 2020, 1:27pm UTC](https://discourse.julialang.org/t/packagecompiler-for-having-a-simple-exe/35071/3 "2020-02-24T13:27:46Z")

</div>

I was trying to add and build the package compiler … i run this one command to build package compiler, but i get an error …

```julia
julia> Pkg.build("PackageCompiler")
  Building LibCURL ────────→ `C:\Users\dario\.julia\packages\LibCURL\lWJxD\deps\build.log`
  Building WinRPM ─────────→ `C:\Users\dario\.julia\packages\WinRPM\Y9QdZ\deps\build.log`
  Building PackageCompiler → `C:\Users\dario\.julia\packages\PackageCompiler\CJQcs\deps\build.log`
┌ Error: Error building `PackageCompiler`:
│ [ Info: Installing GCC
│ [ Info: Multiple package candidates found for mingw64-unistd-pthread-devel, picking newest.
│ ┌ Info: Packages to install:
│ └ join(names(todo), ", ") = "libgcc_s_seh1, binutils, winpthreads-devel, cpp, runtime, libmpc3, libwinpthread1, libgmp10, libmpfr4, zlib1, headers, gcc"
│ ┌ Info: Downloading:
│ └ name = "libgcc_s_seh1"
│ ┌ Info: Extracting:
│ └ name = "libgcc_s_seh1"
│ ERROR: LoadError: IOError: could not spawn `'C:\Users\dario\AppData\Local\Julia-1.3.1\bin\7z.exe' x -y 'C:\Users\dario\.julia\packages\WinRPM\Y9QdZ\cache\2\noarch%2Fmingw64-libgcc_s_seh1-8.2.0-2.8.noarch.rpm' '-oC:\Users\dario\.julia\packages\WinRPM\Y9QdZ\cache\2'`: no such file or directory (ENOENT)
│ Stacktrace:
│ [1] _spawn_primitive(::String, ::Cmd, ::Array{Any,1}) at .\process.jl:99
│ [2] setup_stdios(::Base.var"#554#555"{Cmd}, ::Array{Any,1}) at .\process.jl:112
│ [3] _spawn at .\process.jl:111 [inlined]
│ [4] #open#563(::Bool, ::Bool, ::typeof(open), ::Cmd, ::Base.DevNull) at .\process.jl:370
│ [5] open at .\process.jl:361 [inlined]
│ [6] open(::Cmd, ::String, ::Base.DevNull) at .\process.jl:341
│ [7] open at .\process.jl:338 [inlined]
│ [8] do_install(::WinRPM.Package) at C:\Users\dario\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:482
│ [9] do_install at C:\Users\dario\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:456 [inlined]
│ [10] #install#19(::Bool, ::typeof(WinRPM.install), ::WinRPM.Package) at C:\Users\dario\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:403
│ [11] #install at .\tuple.jl:0 [inlined]
│ [12] #install#17 at C:\Users\dario\.julia\packages\WinRPM\Y9QdZ\src\WinRPM.jl:372 [inlined]
│ [13] #install at .\none:0 [inlined] (repeats 2 times)
│ [14] build() at C:\Users\dario\.julia\packages\PackageCompiler\CJQcs\deps\build.jl:43
│ [15] top-level scope at C:\Users\dario\.julia\packages\PackageCompiler\CJQcs\deps\build.jl:63
│ [16] include at .\boot.jl:328 [inlined]
│ [17] include_relative(::Module, ::String) at .\loading.jl:1105
│ [18] include(::Module, ::String) at .\Base.jl:31
│ [19] include(::String) at .\client.jl:424
│ [20] top-level scope at none:5
│ in expression starting at C:\Users\dario\.julia\packages\PackageCompiler\CJQcs\deps\build.jl:63
└ @ Pkg.Operations D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\backwards_compatible_isolation.jl:649
false

```

what can be? i have disinstalled julia and reinstalled again because of this error, but repeating building packagecompiler, nothing is changed … i get the error …

---

<div class="post-metadata">

**Author:** ![Iulian.Cioarca](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/iulian.cioarca/32/30166_2.png) [@Iulian.Cioarca](https://discourse.julialang.org/u/Iulian.Cioarca)\
**Post date:** [February 24, 2020, 2:16pm UTC](https://discourse.julialang.org/t/packagecompiler-for-having-a-simple-exe/35071/4 "2020-02-24T14:16:20Z")

</div>

Please see:

> [@Error building \`PackageCompiler\`](https://discourse.julialang.org/t/error-building-packagecompiler/35019):
>
> I recently upgraded my setup and reinstalled Julia. Package compiler will not build because it’s looking for 7z.exe in the Julia bin folder instead of libexec (on Windows). (v1.3) pkg\> add PackageCompiler Resolving package versions... Installed WinRPM ────────── v0.4.2 Installed HTTPClient ────── v0.2.1 Installed Libz ──────────── v1.0.1 Installed LibCURL ───────── v0.5.2 Installed PackageCompiler ─ v0.6.4 Installed LibExpat ──────── v0.6.1 Installed BufferedStreams ─ v1.0.0 Updating …

I had the same issue. You need to get the master branch.

---

<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:** [February 24, 2020, 2:39pm UTC](https://discourse.julialang.org/t/packagecompiler-for-having-a-simple-exe/35071/5 "2020-02-24T14:39:22Z")

</div>

> [@Iulian.Cioarca](#):
>
> I had the same issue. You need to get the master branch.

I think the new version should be registered now.
