You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mark Phippard <ma...@gmail.com> on 2007/07/22 13:53:01 UTC

Building Subversion libraries with $ORIGIN option

A Subclipse colleague sent me this link:

http://www.itee.uq.edu.au/~daniel/using_origin/

A problem we have been trying to solve forever with Subclipse is a way
that we could distribute JavaHL to Linux and Mac users as part of
Subclipse.  Eclipse gives us a way to physically ship the bits, and it
even does some magic so that when we load the library from Java it is
found.  However, that is where the magic ends.  When the library is
loaded, it loads all of its dependencies using the normal library
loading rules of the OS.

If we ship JavaHL and the Subversion libraries with Subclipse, they
are all going to be located in some random folder in the filesystem.
We do not have any way to install these into some system location like
/usr/lib (nor would we likely want to).

The above link appears to describe a way to build a library so that at
runtime it will try to load its dependencies from the same location
where it is located.  In theory, this sounds like what we want with
Subclipse.  We can successfully find and ask the JavaHL library to
load.  If we could build everything so that it then looked in that
same location to load everything else, it could work.

So here are my questions for you build gurus:

1. Have you ever heard of this $ORIGIN token before or ever seen it used?
2. Is this worth trying?  And if so, how would I go about doing it?
Are there some global settings I can make like CPPFLAGS? before
running a build that will cause this to be passed through to our
builds?

Any other thoughts?

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Building Subversion libraries with $ORIGIN option

Posted by Dan Christian <dc...@google.com>.
On 7/22/07, Mark Phippard <ma...@gmail.com> wrote:

> 1. Have you ever heard of this $ORIGIN token before or ever seen it used?


$ORIGIN is defined to be the directory the binary is in.  You then have to
have a constant relative path from that binary to the libraries for it to
work.  If anything changes that relative path (say copying a binary
somewhere), then it mysteriously breaks.

Libtool doesn't support $ORIGIN because there is no way to guarantee that
the relative path will stay constant.  See this post (search down to
$ORIGIN):
http://72.14.253.104/search?q=cache:madI_vYhwWoJ:gcc.gnu.org/ml/gcc-patches/2001-02/msg00896.html+libtool+%24origin&hl=en&ct=clnk&cd=3&gl=us


2. Is this worth trying?  And if so, how would I go about doing it?
> Are there some global settings I can make like CPPFLAGS? before
> running a build that will cause this to be passed through to our
> builds?
>

This could only be supportable if libtool does it.  Libtool is doing a ton
of things to make libraries work on as many platforms as possible.  Going
behind it's back won't work well or be easy to support.


What you really need is to be able to do the final libtool install step as
part of the install process.  That would let you customize the install path
in a supportable way.

-Dan C

Re: Building Subversion libraries with $ORIGIN option

Posted by Mark Phippard <ma...@gmail.com>.
On 7/22/07, Blair Zajac <bl...@orcaware.com> wrote:
>
> On Jul 22, 2007, at 6:53 AM, Mark Phippard wrote:
>
> > A Subclipse colleague sent me this link:
> >
> > http://www.itee.uq.edu.au/~daniel/using_origin/
> >
> > A problem we have been trying to solve forever with Subclipse is a way
> > that we could distribute JavaHL to Linux and Mac users as part of
> > Subclipse.  Eclipse gives us a way to physically ship the bits, and it
> > even does some magic so that when we load the library from Java it is
> > found.  However, that is where the magic ends.  When the library is
> > loaded, it loads all of its dependencies using the normal library
> > loading rules of the OS.
> >
> > If we ship JavaHL and the Subversion libraries with Subclipse, they
> > are all going to be located in some random folder in the filesystem.
> > We do not have any way to install these into some system location like
> > /usr/lib (nor would we likely want to).
> >
> > The above link appears to describe a way to build a library so that at
> > runtime it will try to load its dependencies from the same location
> > where it is located.  In theory, this sounds like what we want with
> > Subclipse.  We can successfully find and ask the JavaHL library to
> > load.  If we could build everything so that it then looked in that
> > same location to load everything else, it could work.
> >
> > So here are my questions for you build gurus:
> >
> > 1. Have you ever heard of this $ORIGIN token before or ever seen it
> > used?
>
> No, I've never heard of it.
>
> Is this Linux specific?  Does it support Solaris, or other non-Linux
> Unix OSes?  Do you care to support them?

The information I saw said it was Linux and Solaris.

My guess would be that 99.5% of Eclipse users are running Windows, OSX
or Linux, so those are the platforms we care most about.  We already
have a solution on Windows.


-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Building Subversion libraries with $ORIGIN option

Posted by Blair Zajac <bl...@orcaware.com>.
On Jul 22, 2007, at 6:53 AM, Mark Phippard wrote:

> A Subclipse colleague sent me this link:
>
> http://www.itee.uq.edu.au/~daniel/using_origin/
>
> A problem we have been trying to solve forever with Subclipse is a way
> that we could distribute JavaHL to Linux and Mac users as part of
> Subclipse.  Eclipse gives us a way to physically ship the bits, and it
> even does some magic so that when we load the library from Java it is
> found.  However, that is where the magic ends.  When the library is
> loaded, it loads all of its dependencies using the normal library
> loading rules of the OS.
>
> If we ship JavaHL and the Subversion libraries with Subclipse, they
> are all going to be located in some random folder in the filesystem.
> We do not have any way to install these into some system location like
> /usr/lib (nor would we likely want to).
>
> The above link appears to describe a way to build a library so that at
> runtime it will try to load its dependencies from the same location
> where it is located.  In theory, this sounds like what we want with
> Subclipse.  We can successfully find and ask the JavaHL library to
> load.  If we could build everything so that it then looked in that
> same location to load everything else, it could work.
>
> So here are my questions for you build gurus:
>
> 1. Have you ever heard of this $ORIGIN token before or ever seen it  
> used?

No, I've never heard of it.

Is this Linux specific?  Does it support Solaris, or other non-Linux  
Unix OSes?  Do you care to support them?

Blair


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org