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

julia uses an absolute path #11270

Closed
andrewcooke opened this issue May 14, 2015 · 6 comments · Fixed by #11272
Closed

julia uses an absolute path #11270

andrewcooke opened this issue May 14, 2015 · 6 comments · Fixed by #11272

Comments

@andrewcooke
Copy link
Contributor

when you build julia from git, it seems that the julia command in the top level is linked to an absolute path that is equivalent to ./usr/bin/julia.

please don't do that (use an absolute path), because if someone is dumb enough to move the directory, and then build a new julia version, in a directory with the same name, all kinds of confusion can break out. yes, i am that dumb person, but i cannot see why a relative path wouldn't have sufficed.

thanks!

@staticfloat
Copy link
Member

@andrewcooke would #11272 fix it for you?

@vtjnash
Copy link
Member

vtjnash commented May 14, 2015

build directories are non-relocatable and can do all sorts of a bad things if you try. for example, any autoconf or cmake driven dependency will use the absolute path to the original location and may discard anything that it finds there.

@vtjnash vtjnash closed this as completed May 14, 2015
@staticfloat
Copy link
Member

For the record, while I agree with Jameson, I also agree that it's a very simple thing to fix, and there's no good reason in my mind why we shouldn't make it a relative path.

@andrewcooke
Copy link
Contributor Author

it does, but tbh i'd rather it breaks in an obvious way rather than have some weird problem as described by vtjnash.

although i am a little surprised - i use autoconf quite a bit and thought it used relative paths.

anyway, seems like a bad idea. sorry/thanks. andrew

@staticfloat
Copy link
Member

For others reading this, things that won't work are moving the directory tree, and then expecting a git pull && make to work; ./configure scripts generate makefiles that have full paths hardcoded into them which makes this kind of relocation very difficult in general.

Things that should work are moving the usr directory generated by building Julia. We work pretty hard to make that relocatable, and even provide an official method of moving it into whatever directory you want, with a very flexible directory structure. See these lines for an example of the parameters you can set. You'd install julia into your own directory structure via something like:

$ make prefix=/my/own/prefix libdir=/oh/but/libraries/go/here install

99% of the time, prefix is the only thing you care about. I'd say the next most often tweaked thing is datarootdir, but I don't have hard data for that.

@andrewcooke
Copy link
Contributor Author

fwiw, it seems to be the handwritten Makefile in deps that is the source of the absolute paths.

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 a pull request may close this issue.

3 participants