Mike Hearn mike@navi.cx writes:
+dnl This is used for binary relocatability +if echo $libdir | grep '^${exec_prefix}' >/dev/null; then
- RPATH="-Wl,-rpath,'$${ORIGIN}/..'`echo $libdir | sed 's/${exec_prefix}//'`"
+fi
This is still making assumptions about the contents of bindir and libdir. What you need is a generic way to find a relative path from any directory to any other. Also this needs to be done at make time, not in configure.
This is still making assumptions about the contents of bindir and libdir. What you need is a generic way to find a relative path from any directory to any other. Also this needs to be done at make time, not in configure.
I realised last night the patch I sent in was incomplete anyway, I missed the changes to wineprefixcreate. Oops.
Still, I'm not sure why this has to be so generic. I think not people modify the standard install layout, and if they do, they probably don't care about binary relocatability. Why do we have to make the code so very complex to make it work for 100% of people when much simpler code could work for 95%? When do the costs outweigh the benefits?
There's another issue: I'm not sure what you're asking me to do :( Do you mean if somebody does, eg
./configure --bindir=a/b/c --libdir=x/y/z
that the rpath is set to
${ORIGIN}/../../../x/y/z ?
If so got any tips for how to implement this?
thanks -mike
Mike Hearn m.hearn@signal.QinetiQ.com writes:
Still, I'm not sure why this has to be so generic. I think not people modify the standard install layout, and if they do, they probably don't care about binary relocatability. Why do we have to make the code so very complex to make it work for 100% of people when much simpler code could work for 95%? When do the costs outweigh the benefits?
Of course, by the same reasoning, 95% of people are happy with the way things work now, so why add complexity to make it relocatable? And really, it's not that hard to do it right.
There's another issue: I'm not sure what you're asking me to do :( Do you mean if somebody does, eg
./configure --bindir=a/b/c --libdir=x/y/z
that the rpath is set to
${ORIGIN}/../../../x/y/z ?
Yes.
If so got any tips for how to implement this?
Start from bindir, add ".." until you get to the common part of the two paths, then append the rest of the libdir path.
Of course, by the same reasoning, 95% of people are happy with the way things work now, so why add complexity to make it relocatable? And really, it's not that hard to do it right.
D'oh! Good point. OK, I'll see if I can knock something up.