You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Hudson <gh...@MIT.EDU> on 2004/09/12 20:09:19 UTC

Re: [PATCH] Can't test JavaHL bindings before installation (Issue #2040)

On Sun, 2004-09-12 at 15:50, David James wrote:
> This patch is slightly different from the original patch submitted
> earlier today to the issue tracker by Holger Thon. I have upgraded his
> patch to also work in a VPATH setup. (E.g. build directory != src
> directory) The new patch is attached.

+       $(JAVA) -Djava.library.path=subversion/bindings/java/javahl/native/.libs:$(libdir) -classpath

From conversations I've had on IRC (about the same problem as it applies
to the swig bindings), I don't think this approach will work on all
platforms and/or with all versions of libtool.  One is not really
supposed to know about libtool's .libs subdir, and attempting to link
against libraries located there without going through libtool is not
guaranteed to work.

On the other hand, since there's no way to do this right within the
libtool context, perhaps doing it the wrong way and letting it work
where it works and fail where it fails is the best answer.  Anyone else
have opinions on the matter?


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

Re: [PATCH] javahl fixes (Issue #2040) (Issue #2032)

Posted by David James <st...@gmail.com>.
On Mon, 13 Sep 2004 20:29:31 +0200, Holger Thon <ht...@arcor.de> wrote:
> Hi,
> 
> i found out that the patch to Issue #2040 worked due to a typo
> (java.library-path), so the default library search path was actually used.
> Though untested, it should now work on Darwin, too.
> 
> Developer visible changes on bindings:
> javahl: make check-javahl should be possible without install (Fixes #2040)
> javahl: classes dir will be created before build (make javahl) (Fixes #2032)
> swig-java: path fix for make check-swig-java
> 
> make check-swig-java still fails on linux due to libraries beginning
> with underscore; don't know how to fix this (but running the command
> mln -s '_*' 'lib_#1' in $(SWIG_JAVA_DIR)/.libs before the make shows
> it works then)
+1. Great work!! 

Anyone willing to test this patch on a platform other than Linux?

Cheers,

David

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

[PATCH] javahl fixes (Issue #2040) (Issue #2032)

Posted by Holger Thon <ht...@arcor.de>.
Hi,

i found out that the patch to Issue #2040 worked due to a typo
(java.library-path), so the default library search path was actually used.
Though untested, it should now work on Darwin, too.

Developer visible changes on bindings:
javahl: make check-javahl should be possible without install (Fixes #2040)
javahl: classes dir will be created before build (make javahl) (Fixes #2032)
swig-java: path fix for make check-swig-java

make check-swig-java still fails on linux due to libraries beginning
with underscore; don't know how to fix this (but running the command
mln -s '_*' 'lib_#1' in $(SWIG_JAVA_DIR)/.libs before the make shows
it works then)

Ciao
Holger

Re: [PATCH] Can't test JavaHL bindings before installation (Issue #2040)

Posted by Ben Reser <be...@reser.org>.
On Sun, Sep 12, 2004 at 05:38:40PM -0400, David James wrote:
> Good try! But LD_LIBRARY_PATH isn't cross-platform.

$ apr-config --shlib-path-var
LD_LIBRARY_PATH

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

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

Re: [PATCH] Can't test JavaHL bindings before installation (Issue #2040)

Posted by Holger Thon <ht...@arcor.de>.
Hi,

On Sun, Sep 12, 2004 at 05:38:40PM -0400, David James wrote:
> > The lines for the *nix conditional would read like in the patch below,
> > and should work independently of Unix OS/libtool version, but on windows
> > or mac os i don't know.
> Good try! But LD_LIBRARY_PATH isn't cross-platform.

Sure. For the plain Makefile.in, the closest cross-platform fix i got is
the attached patch. There may be a problem still on Windows and similar
platforms, but all others should work.

Note that the LT_SHLIBPATH_PREFIX variable contains the path delimiter,
so it may be empty so path begins with the .libs subdir.


Ciao
Holger



Re: [PATCH] Can't test JavaHL bindings before installation (Issue #2040)

Posted by David James <st...@gmail.com>.
> The lines for the *nix conditional would read like in the patch below,
> and should work independently of Unix OS/libtool version, but on windows
> or mac os i don't know.
Good try! But LD_LIBRARY_PATH isn't cross-platform.

Cheers,

David

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

Re: [PATCH] Can't test JavaHL bindings before installation (Issue #2040)

Posted by Holger Thon <ht...@arcor.de>.
Hi,

On Sun, Sep 12, 2004 at 04:09:19PM -0400, Greg Hudson wrote:
> >From conversations I've had on IRC (about the same problem as it applies
> to the swig bindings), I don't think this approach will work on all
> platforms and/or with all versions of libtool.  One is not really
> supposed to know about libtool's .libs subdir, and attempting to link
> against libraries located there without going through libtool is not
> guaranteed to work.

I suppose platform independent is rather tricky here, because you'd need
the Makefile.am, use platform dependent rules within automake conditionals
and set an AM_CONDITIONAL for each platform depending on the $host variable
in configure.in.

The lines for the *nix conditional would read like in the patch below,
and should work independently of Unix OS/libtool version, but on windows
or mac os i don't know.
Trickiest is to make the shell evaluate the library path set by libtool.

If you can specify the name of the libtool javahl.la library in Makefile.am,
set SVN_JAVAHL_LTLIB to the same.

HTH,
Holger

Re: [PATCH] Can't test JavaHL bindings before installation (Issue #2040)

Posted by Ben Reser <be...@reser.org>.
On Sun, Sep 12, 2004 at 04:09:19PM -0400, Greg Hudson wrote:
> From conversations I've had on IRC (about the same problem as it applies
> to the swig bindings), I don't think this approach will work on all
> platforms and/or with all versions of libtool.  One is not really
> supposed to know about libtool's .libs subdir, and attempting to link
> against libraries located there without going through libtool is not
> guaranteed to work.
> 
> On the other hand, since there's no way to do this right within the
> libtool context, perhaps doing it the wrong way and letting it work
> where it works and fail where it fails is the best answer.  Anyone else
> have opinions on the matter?

It's fine with me.  We're already using the same technique in the Perl
bindings and not a single report of it failing has come in yet.

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

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

Re: [PATCH] Can't test JavaHL bindings before installation (Issue #2040)

Posted by David James <st...@gmail.com>.
> > 1. Don't we bundle libtool?
> Not everyone works from the distributed tarball, and even those who do
> sometimes re-run autogen for various reasons.  So we do have to concern
> ourselves with other libtool versions to some extent.
Ah, ok. What versions of libtool cause problems, then? 

> > 2. What platforms cause problems?
> I'll go out on a limb and guess OSX, because libtool is kind of brittle
> there.  Perhaps someone else knows for sure.
Hm, OK. Any volunteer Mac users willing to try out the patch and report?

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

Re: [PATCH] Can't test JavaHL bindings before installation (Issue #2040)

Posted by Greg Hudson <gh...@MIT.EDU>.
On Sun, 2004-09-12 at 16:16, David James wrote:
> 1. It looks to me like we already bundle libtool with subversion, so
> we won't have to worry about users having a different version of
> libtool.

Not everyone works from the distributed tarball, and even those who do
sometimes re-run autogen for various reasons.  So we do have to concern
ourselves with other libtool versions to some extent.

> 2. On what platform will this approach (using the ".libs" subdir)
> cause problems?

I'll go out on a limb and guess OSX, because libtool is kind of brittle
there.  Perhaps someone else knows for sure.


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

Re: [PATCH] Can't test JavaHL bindings before installation (Issue #2040)

Posted by David James <st...@gmail.com>.
> From conversations I've had on IRC (about the same problem as it applies
> to the swig bindings), I don't think this approach will work on all
> platforms and/or with all versions of libtool.  One is not really
> supposed to know about libtool's .libs subdir, and attempting to link
> against libraries located there without going through libtool is not
> guaranteed to work.
1. It looks to me like we already bundle libtool with subversion, so
we won't have to worry about users having a different version of
libtool.
2. On what platform will this approach (using the ".libs" subdir)
cause problems?

Cheers,

David

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