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

RFC: Customizable priorities for source building #334

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ararslan
Copy link
Member

@ararslan ararslan commented Oct 7, 2017

This introduces two new environment variables: JULIA_BINDEPS_USE_SUDO and JULIA_BINDEPS_BUILD_SOURCE. The former can be used to avoid checking sudo -V and automatically enable or disable sudo. The latter allows the user to set their preference for how/when to build from source. See the additions to the README for a more thorough explanation.

JULIA_BINDEPS_BUILD_SOURCE provides a solution to #328, and JULIA_BINDEPS_USE_SUDO is essentially #325.

@ararslan
Copy link
Member Author

Bump @yuyichao, @tkelman, @staticfloat. Would be nice if someone could review this.

ENV["JULIA_BINDEPS_USE_SUDO"] == "true"
else
try
success(`sudo -V`)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you build a new system image with this line as is? i can not. like so:

$ cat ~/userimg.jl 
using BinDeps

julia> include(joinpath(JULIA_HOME, Base.DATAROOTDIR, "julia", "build_sysimg.jl"))
julia> build_sysimg("/Users/arthurb/sys.ji", "native", "/Users/arthurb/userimg.jl")

$ julia -J /Users/arthurb/sys.ji.dylib

signal (11): Segmentation fault: 11
while loading no file, in expression starting on line 0
Segmentation fault: 11

works though if i simply replace this line with true

@Pbellive
Copy link

As a user who ran into #328 today, I'd like to second the request that the functionality implemented in this PR be added to BinDeps. As far as I can tell, when sudo and a package manager are available on a system but the user does not have permission to run

<package manager> install <dependency>

Pkg.build(<package>) throws an error and exits even if it might be possible to build <dependency> from source. The only workaround to install <dependency> seems to be to comment out the

provides(<package manager>,...

lines in relevant build.jl script and re-run Pkg.build to trigger building the dependency from source. This isn't a big deal for experienced users but causes difficulty for novice users trying to install Julia packages with binary dependencies and makes the package dirty.

I can't speak to whether or not this PR is the best way to address this issue but I wanted to add a little context about the usefulness of the functionality it provides. Thanks to all the BinDeps devs for their work on BinDeps and to @ararslan for the work on this PR!

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

Successfully merging this pull request may close these issues.

3 participants