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

Pkg.build has silent failure when exit() used within build.jl #20020

Closed
omus opened this issue Jan 13, 2017 · 4 comments
Closed

Pkg.build has silent failure when exit() used within build.jl #20020

omus opened this issue Jan 13, 2017 · 4 comments
Labels
docs This change adds or pertains to documentation packages Package management and loading

Comments

@omus
Copy link
Member

omus commented Jan 13, 2017

When installing "Coverage" in a 32-bit Linux environment something strange happens:

julia> Pkg.add("Coverage")
INFO: Cloning cache of BinDeps from https://github.com/JuliaLang/BinDeps.jl.git
INFO: Cloning cache of BufferedStreams from https://github.com/BioJulia/BufferedStreams.jl.git
INFO: Cloning cache of Codecs from https://github.com/dcjones/Codecs.jl.git
INFO: Cloning cache of Compat from https://github.com/JuliaLang/Compat.jl.git
INFO: Cloning cache of Coverage from https://github.com/JuliaCI/Coverage.jl.git
INFO: Cloning cache of Git from https://github.com/JuliaPackaging/Git.jl.git
INFO: Cloning cache of HttpCommon from https://github.com/JuliaWeb/HttpCommon.jl.git
INFO: Cloning cache of HttpParser from https://github.com/JuliaWeb/HttpParser.jl.git
INFO: Cloning cache of JSON from https://github.com/JuliaIO/JSON.jl.git
INFO: Cloning cache of Libz from https://github.com/BioJulia/Libz.jl.git
INFO: Cloning cache of MbedTLS from https://github.com/JuliaWeb/MbedTLS.jl.git
INFO: Cloning cache of Requests from https://github.com/JuliaWeb/Requests.jl.git
INFO: Cloning cache of SHA from https://github.com/staticfloat/SHA.jl.git
INFO: Cloning cache of URIParser from https://github.com/JuliaWeb/URIParser.jl.git
INFO: Installing BinDeps v0.4.5
INFO: Installing BufferedStreams v0.2.1
INFO: Installing Codecs v0.2.0
INFO: Installing Compat v0.11.0
INFO: Installing Coverage v0.3.2
INFO: Installing Git v0.1.0
INFO: Installing HttpCommon v0.2.6
INFO: Installing HttpParser v0.2.0
INFO: Installing JSON v0.8.0
INFO: Installing Libz v0.2.2
INFO: Installing MbedTLS v0.4.2
INFO: Installing Requests v0.3.12
INFO: Installing SHA v0.3.0
INFO: Installing URIParser v0.1.7
INFO: Building MbedTLS
Using system libraries...
INFO: Package database updated

julia> using Coverage
ERROR: LoadError: HttpParser not properly installed. Please run
Pkg.build("HttpParser")
 in error(::String, ::String, ::Vararg{Any,N}) at ./error.jl:22
 in include_from_node1(::String) at ./loading.jl:488
 in macro expansion; at ./none:2 [inlined]
 in anonymous at ./<missing>:?
 in eval(::Module, ::Any) at ./boot.jl:234
 in process_options(::Base.JLOptions) at ./client.jl:239
 in _start() at ./client.jl:318

The problem is that when building MbedTLS an exit() is encountered which terminates the Julia subprocess which performs the building. Since the subprocess exits normally this causes the installation to appear to completely successfully.

Now the exit() call can be removed from the MbedTLS build script but it should probably be addressed that any build.jl file could potentially call exit which can mess up the build process.

@yuyichao
Copy link
Contributor

It sounds like a package bug if it returns a 0 status when it encounters an error.

@yuyichao yuyichao added the docs This change adds or pertains to documentation label Jan 13, 2017
@tkelman
Copy link
Contributor

tkelman commented Jan 13, 2017

ref JuliaLang/MbedTLS.jl#93

@tkelman
Copy link
Contributor

tkelman commented Jan 16, 2017

Looks like this was an unforeseen consequence of the difference between #13499 vs #13506, where at the time I was concerned about Julia process startup time on Windows. Since that's fixed now and much less of a concern, does seem like it would be safer to do one process per package.

@omus
Copy link
Member Author

omus commented Jan 16, 2017

@tkelman building each package in it's own process is probably the right approach. If we do want to avoid the overhead of spawning new Julia processes we could take the alternative approach in #20070

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation packages Package management and loading
Projects
None yet
Development

No branches or pull requests

4 participants