Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build hangs #63

Open
solcat124 opened this issue Aug 5, 2019 · 2 comments
Open

Build hangs #63

solcat124 opened this issue Aug 5, 2019 · 2 comments

Comments

@solcat124
Copy link

I've successfully used ApplicationBuilder on MacOS and Linux Mint using a couple of different source files. (Success meaning the build process completes and I'm able to run the resulting app.) I'm now trying to use the build function on an AWS instance of Linux (Ubuntu 18), but it hangs. (I've let this run for an hour or two). The results below are for the example file commandline_hello.jl.

Any suggestions on how to get this to work?

           _

_ _ ()_ | Documentation: https://docs.julialang.org
() | () () |
_ _ | | __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ ` | |
| | |
| | | | (
| | | Version 1.1.1 (2019-05-16)
/ |_'|||_'_| | Official https://julialang.org/ release
|__/ |

julia> using ApplicationBuilder

julia> build_app_bundle("/home/ubuntu/Documents/Software/Julia/Commandline_Hello/commandline_hello.jl", appname="hello")
[ Info: Building at path /home/ubuntu/Documents/Software/Julia/Commandline_Hello/builddir/hello
[ Info: Copying resources:
[ Info: Copying libraries
Julia program file:
"/home/ubuntu/Documents/Software/Julia/Commandline_Hello/commandline_hello.jl"
C program file:
"/home/ubuntu/.julia/packages/PackageCompiler/CJQcs/examples/program.c"
Build directory:
"/home/ubuntu/Documents/Software/Julia/Commandline_Hello/builddir/hello/core"

@solcat124
Copy link
Author

I modified a local copy of ApplicationBuilder to get more output. It appears that the problem occurs within PackageCompiler, where it hangs on
append!(Base.atexit_hooks, atexit_hook_copy)

I don't understand why it hangs here, so I'm still unsure what to try next.

Here is the output:
julia> build_app_bundle("/home/ubuntu/Documents/Software/Julia/Commandline_Hello/commandline_hello.jl", appname="hello")

~~~~~~ Compiling a binary from '/home/ubuntu/Documents/Software/Julia/Commandline_Hello/commandline_hello.jl'... ~~~~~~~
  PackageCompiler.static_julia(...)
Julia program file:
  "/home/ubuntu/Documents/Software/Julia/Commandline_Hello/commandline_hello.jl"
C program file:
  "/home/ubuntu/Documents/Software/Julia/Commandline_Hello/program.c"
Build directory:
  "/home/ubuntu/Documents/Software/Julia/Commandline_Hello/builddir/hello/bin"
Build static library "commandline_hello.a":
  atexit_hook_copy = copy(Base.atexit_hooks) # make backup
# clean state so that any package we use can carelessly call atexit
empty!(Base.atexit_hooks)
Base.__init__()
Sys.__init__() #fix https://github.com/JuliaLang/julia/issues/30479
using REPL
Base.REPL_MODULE_REF[] = REPL
Mod = @eval module $(gensym("anon_module")) end
# Include into anonymous module to not polute namespace
Mod.include("/home/ubuntu/Documents/Software/Julia/Commandline_Hello/commandline_hello.jl")
Base._atexit() # run all exit hooks we registered during precompile
empty!(Base.atexit_hooks) # don't serialize the exit hooks we run + added
# atexit_hook_copy should be empty, but who knows what base will do in the future
append!(Base.atexit_hooks, atexit_hook_copy)


@NHDaly
Copy link
Owner

NHDaly commented Dec 31, 2019

I'm sorry i didn't respond for so long.

I'm not sure why it's hanging.. This isn't a great answer, but PackageCompiler is basically unmaintained at this point, but there is a revival going on in https://github.com/KristofferC/PackageCompilerX.jl. If you still have need of package compilation, you might try looking there?

Thanks! :)
~Nathan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants