Skip to content
This repository has been archived by the owner on Mar 4, 2019. It is now read-only.

various updates #40

Merged
merged 4 commits into from
Dec 4, 2017
Merged

various updates #40

merged 4 commits into from
Dec 4, 2017

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Oct 30, 2017

No description provided.

(instead of the working directory)
and accelerate threading (on v0.7+)
@lucatrv
Copy link
Contributor

lucatrv commented Oct 30, 2017

@vtjnash: line if !quiet && !sync should be corrected into if verbose && !sync

@lucatrv
Copy link
Contributor

lucatrv commented Nov 7, 2017

I am wondering whether pre-compiling all modules within builddir by running the julia compilation command twice is the best solution (also considering that the *.ji files are not required for distributing and running the executable). Would it not be better if julia checked that all required modules are pre-compiled (similarly to when they are loaded interactively) and otherwise pre-compile them within the ~/.julia/lib/vX.X/ directory?

@vtjnash
Copy link
Member Author

vtjnash commented Nov 8, 2017

Would it not be better if julia checked that all required modules are pre-compiled

yes, that's what running julia twice in this way does (at least the issue of JULIA_HOME is figured out)

@lucatrv
Copy link
Contributor

lucatrv commented Nov 8, 2017

My point is that julia should verify and when needed pre-compile all modules itself, without the need to run it twice. Moreover the *.ji files should be saved within the ~/.julia/lib/vX.X/ directory instead of in builddir (as if the script was executed). If you agree, maybe should we open an issue in the Julia repository instead of adding a work-around in static-julia?

@vtjnash
Copy link
Member Author

vtjnash commented Dec 4, 2017

My point is that julia should verify and when needed pre-compile all modules itself, without the need to run it twice

Yeah, this is precisely what it does.

Moreover the *.ji files should be saved within the ~/.julia/lib/vX.X/ directory

Certainly feasible. For my workflow, I don't necessarily have the same copy of Julia running as I used for building static-julia, so I find it easier just to dump them here, but ymmv.

@vtjnash vtjnash merged commit da6c8a6 into master Dec 4, 2017
@vtjnash vtjnash deleted the jn/updates branch December 4, 2017 02:48
@lucatrv
Copy link
Contributor

lucatrv commented Dec 19, 2017

@vtjnash, I still do not understand why julia should be run twice, first to build the .ji cache of the used packages and then to actually build the object file, with the following commands (lines 162 and 163):

run(command) # first populate the .ji cache (when JULIA_HOME is defined)
run(`$command --output-o $o_file`) # then output the combined file

I think that julia should always check, when compiling a file, if it also needs to compile the used packages, so that only the second command is needed. Do you agree or what am I missing?
Thanks

@lucatrv
Copy link
Contributor

lucatrv commented Jan 28, 2018

@vtjnash I am now working on Julia v0.7 support for static-julia, and I have a doubt regarding the following line:

VERSION >= v\"0.7+\" && Base.init_load_path($(repr(JULIA_HOME)))

I think it should be modified as follows:

VERSION >= v\"0.7-\" && Base.init_load_path($(Sys.BINDIR))

can you please confirm?
Thanks

@vtjnash
Copy link
Member Author

vtjnash commented Jan 29, 2018

👍

I think there’s an init_depot_path call now too?

@lucatrv
Copy link
Contributor

lucatrv commented Jan 29, 2018

I could not find any documentation for init_depot_path, should juliac execute both Base.init_depot_path($(Sys.BINDIR)) and Base.init_load_path($(Sys.BINDIR))?

@vtjnash
Copy link
Member Author

vtjnash commented Jan 29, 2018

@StefanKarpinski

@lucatrv
Copy link
Contributor

lucatrv commented Feb 4, 2018

@vtjnash @StefanKarpinski with PR #58 juliac.jl now runs both Base.init_depot_path() and Base.init_load_path() (lines 234 and 235), but looking at initdefs.jl I wonder if either one is actually needed, because I guess that Julia automatically initializes both package depots and load_path when it is run. Please let me know if I can remove those commands. Thanks

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

Successfully merging this pull request may close these issues.

2 participants