Skip to content

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

@omus

Description

@omus

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsThis change adds or pertains to documentationpackagesPackage management and loading

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions