#10208: Remove "warning: Replacing library search directory..." if caused by
symbolic links
------------------------------+---------------------------------------------
Reporter: jhpalmieri | Owner: GeorgSWeber
Type: defect | Status: positive_review
Priority: minor | Milestone: sage-4.6.1
Component: build | Keywords: LDSHARED symlink linker path
Author: John Palmieri | Upstream: N/A
Reviewer: Leif Leonhardy | Merged:
Work_issues: |
------------------------------+---------------------------------------------
Comment(by leif):
Replying to [comment:7 jhpalmieri]:
> Replying to [comment:4 leif]:
> > Ok, then (at least your) MacOS X lacks the `readlink` and `realpath`
commands, or you've set `SAGE_ROOT` manually.
>
> I think that SAGE_ROOT is set in the script sage-env, by running "pwd"
in an appropriate directory.
But only if `SAGE_ROOT` is not already set, which isn't the case if you
run some `./sage ...` command, so it's a bit inconsistent.
Oh, but I see: `$SAGE_ROOT/sage` does not use `readlink -e` (which
dereferences any symlink contained in its argument); without that, it
returns an error if the ''last component'' is not a link. So if you have
just links "in the middle", `sage` uses the basename of itself.
> Perhaps with the GNU version of this, it resolves all links. On Darwin,
and it seems perhaps also on Solaris, you need to run "pwd -P" to do this.
On sage.math, 'pwd -P' also resolves links. So we might also consider
something like this change to sage-env...
I wonder what new strange side-effects that would have... ;-)
> (On the other hand, I don't understand why on sage.math, running 'pwd'
from the command line in /scratch/palmieri/sage gives me
"/scratch/palmieri/sage", while running it from sage-env gives me
"/mnt/usb1/scratch/palmieri/sage-4.6".)
That depends on how you `cd` to a directory, or how a script is called.
Which directory do you have in your path?
`$0` should be set according to that inside a script, i.e. its basename
should be the one where it was (first) found in your `$PATH` (i.e. even
relative if you happen to have "`.`" in your path and the script is in the
current directory).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10208#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.