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

can't start julia from non-directory #12671

Closed
vtjnash opened this issue Aug 17, 2015 · 7 comments
Closed

can't start julia from non-directory #12671

vtjnash opened this issue Aug 17, 2015 · 7 comments
Labels
kind:upstream The issue is with an upstream dependency, e.g. LLVM

Comments

@vtjnash
Copy link
Sponsor Member

vtjnash commented Aug 17, 2015

$ mkdir nonexist
$ cd nonexist
$ rmdir ../nonexist
$ ~/julia/julia
julia: /home/jameson/julia/deps/llvm-3.3/lib/Support/Unix/Path.inc:256: static llvm::sys::Path llvm::sys::Path::GetCurrentDirectory(): Assertion `false && "Could not query current working directory."' failed.
Aborted
@vtjnash vtjnash changed the title can't start julia from none-directory can't start julia from non-directory Aug 18, 2015
@JeffBezanson
Copy link
Sponsor Member

What do you suggest? Should we check for this and give a better error?

@StefanKarpinski
Copy link
Sponsor Member

Can we avoid having LLVM throw this exception? Why does LLVM need the path? Perhaps this could be fixed upstream.

@vtjnash
Copy link
Sponsor Member Author

vtjnash commented Aug 20, 2015

there's no need to block startup. just error if you try to access it:

shell> rmdir ../nonexist

julia> pwd()
ERROR: getcwd: no such file or directory (ENOENT)
 in uv_error at ./stream.jl:946
 in pwd at ./file.jl:8

@JeffBezanson
Copy link
Sponsor Member

Agreed. Does this still happen when llvm assertions are disabled?

@ihnorton
Copy link
Member

Does this still happen when llvm assertions are disabled?

Just tested with an old nightly: no.

(for reference, on LLVM 3.3: hhttps://github.com/llvm-mirror/llvm/blob/bec3ce0cb50895d9b41a78938b079672e6999e15/lib/Support/Unix/Path.inc#L252-L258)

@ihnorton ihnorton added the kind:upstream The issue is with an upstream dependency, e.g. LLVM label Aug 21, 2015
@ihnorton
Copy link
Member

Looks like this may have been fixed in recent LLVM versions. GetCurrentDirectory was removed, and the (apparent) replacement current_path does not appear to assert?, as of at least LLVM 3.5.

@tkelman tkelman added the needs tests Unit tests are required for this change label Jan 10, 2016
tkelman added a commit that referenced this issue Jan 18, 2016
use mktempdir instead of tempname because of #9053

Cygwin lets you do this but win32 doesn't
tkelman added a commit that referenced this issue Jan 18, 2016
use mktempdir instead of tempname because of #9053

Cygwin lets you do this but win32 doesn't
@tkelman tkelman removed the needs tests Unit tests are required for this change label Jan 21, 2016
@timholy
Copy link
Sponsor Member

timholy commented Aug 13, 2016

This may have regressed, see #17998.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:upstream The issue is with an upstream dependency, e.g. LLVM
Projects
None yet
Development

No branches or pull requests

6 participants