You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ma...@gfa-net.de on 2005/05/12 09:10:35 UTC
Problems with libsvnjavahl under cygwin
Hi there,
I am trying to build (and use) libsvnjavahl under cygwin and encountered
several problems. I was able to solve some of them but not all. Perhaps
anyone has an idea what I can do.
Here is what I do:
First I build APR from the sources 0.9.6 (as I did some patches to it).
Then I build subversion from the sources (revision 14694 from
branches/1.2.x) under cygwin which works fine.
After doing some patches to srcipts and sources (see below) I was able to
build cygsvnjavahl-1-0.dll but unfortunately it doesn't work. When I say
(in a Java program) 'SVNClient client = new SCNClien( );' the SVNClient
class loads the library and the Java program terminates without telling me
anything about an exception or something like this.
This happens if I tell the SVNClient class to also search for
cygsvnjavahl-1-0, if I rename the dll to svnjavahl.dll and if I set
subversion.native.library to /path/to/dll/cygsvnjavahl-1-0.dll (or
c:\path\to\dll\cygsvnjavahl-1-0.dll).
If I use the windows libsvnjavahl-1.dll instead, everything works fine
(without changing anything else).
Does anybody have an idea why it doesn't work?
Is there anybody who managed to build and use the library under cygwin?
FYI: As I don't have java under cygwin I have to use my win32 Java (jdk
1.4.2_03). May this be the cause of the problem?
Perhaps it has something to do with the already mentioned patches I did.
Here they are:
Problem: libsvnjavahl needs threads in APR but under cygwin APR is always
build without threads
Solution: I told APR not to forbid to use threads under cygwin and managed
to build it with threads enabled.
I know that there are certainly some facts that lead to the conclusion
"don't build APR with threads under cygwin". But may this be the cause for
my problem?
Problem: Compile problems regarding the JDK include file win32/jni_md.h
Solution: I changed the typedef of jlong in include/win32/jni_md.h:
-typedef __int64 jlong;
+typedef long long jlong;
Problem: libsvnjavahl needs libsvn_fs (shouldn't this be a problem for
everyone, even if you aren't using cygwin???)
Solution:
--- build.conf.orig 2005-05-09 08:17:55.000000000 +0200
+++ build.conf 2005-05-10 17:53:14.354796500 +0200
@@ -417,7 +417,7 @@
description = Subversion Java HighLevel binding
type = lib
path = subversion/bindings/java/javahl/native
-libs = libsvn_repos libsvn_client libsvn_wc libsvn_ra libsvn_delta
libsvn_subr
+libs = libsvn_fs libsvn_repos libsvn_client libsvn_wc libsvn_ra
libsvn_delta libsvn_subr
aprutil apriconv apr neon
sources = *.cpp *.c
add-deps = $(javahl_javah_DEPS) $(javahl_java_DEPS)
Problem/Solution: As I am using win32 Java I had to change the syntax of
the -classpath option in Makefile.in and build/generator/gen_make.py. I
enclosed it in " " and I have to use ';' instead of ':'
Problem: I mustn't use absolute paths names for the javac compile
Solution:
--- build/generator/gen_make.py.orig 2005-03-22 16:08:25.000000000
+0100
+++ build/generator/gen_make.py 2005-05-10 17:53:58.323265100 +0200
@@ -146,8 +146,7 @@
# link in the object file
objects.append(link_dep.filename)
for dep in self.graph.get_sources(gen_base.DT_OBJECT, link_dep,
gen_base.SourceFile):
- object_srcs.append(
- build_path_join('$(abs_srcdir)', dep.filename))
+ object_srcs.append(dep.filename)
elif isinstance(link_dep, gen_base.HeaderFile):
# link in the header file
# N.B. that filename_win contains the '_'-escaped class name
I would be very greatful if anybody could help me.
Mathias
Re: Problems with libsvnjavahl under cygwin
Posted by David James <ja...@gmail.com>.
On 5/12/05, Max Bowsher <ma...@ukf.net> wrote:
> Mathias.Weinert@gfa-net.de wrote:
> > FYI: As I don't have java under cygwin I have to use my win32 Java (jdk
> > 1.4.2_03). May this be the cause of the problem?
> *Very* likely.
What's the best distribution of Java to use with cygwin? Kaffe, perhaps?
If you decide to build with Kaffe, the following patches may help:
http://svn.haxx.se/dev/archive-2005-04/1690.shtml
Cheers,
David
--
http://www.cs.toronto.edu/~james
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Problems with libsvnjavahl under cygwin
Posted by Max Bowsher <ma...@ukf.net>.
Mathias.Weinert@gfa-net.de wrote:
> FYI: As I don't have java under cygwin I have to use my win32 Java (jdk
> 1.4.2_03). May this be the cause of the problem?
*Very* likely.
Max.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Problems with libsvnjavahl under cygwin
Posted by Patrick Mayweg <ma...@qint.de>.
Hi Mathias,
All the JVM crashes I know produce some kind of output. Did you run the
java.exe from a dos box? From my personal point of view, I would prefer
if you use the precompiled versions.
Regards,
Patrick
Mathias.Weinert@gfa-net.de wrote:
>
> Hi there,
>
> I am trying to build (and use) libsvnjavahl under cygwin and
> encountered several problems. I was able to solve some of them but not
> all. Perhaps anyone has an idea what I can do.
>
> Here is what I do:
> First I build APR from the sources 0.9.6 (as I did some patches to it).
> Then I build subversion from the sources (revision 14694 from
> branches/1.2.x) under cygwin which works fine.
> After doing some patches to srcipts and sources (see below) I was able
> to build cygsvnjavahl-1-0.dll but unfortunately it doesn't work. When
> I say (in a Java program) 'SVNClient client = new SCNClien( );' the
> SVNClient class loads the library and the Java program terminates
> without telling me anything about an exception or something like this.
> This happens if I tell the SVNClient class to also search for
> cygsvnjavahl-1-0, if I rename the dll to svnjavahl.dll and if I set
> subversion.native.library to /path/to/dll/cygsvnjavahl-1-0.dll (or
> c:\path\to\dll\cygsvnjavahl-1-0.dll).
> If I use the windows libsvnjavahl-1.dll instead, everything works fine
> (without changing anything else).
>
> Does anybody have an idea why it doesn't work?
> Is there anybody who managed to build and use the library under cygwin?
> FYI: As I don't have java under cygwin I have to use my win32 Java
> (jdk 1.4.2_03). May this be the cause of the problem?
This may definitely be the problem.
>
> Perhaps it has something to do with the already mentioned patches I
> did. Here they are:
>
> Problem: libsvnjavahl needs threads in APR but under cygwin APR is
> always build without threads
> Solution: I told APR not to forbid to use threads under cygwin and
> managed to build it with threads enabled.
> I know that there are certainly some facts that lead to the conclusion
> "don't build APR with threads under cygwin". But may this be the cause
> for my problem?
>
> Problem: Compile problems regarding the JDK include file win32/jni_md.h
> Solution: I changed the typedef of jlong in include/win32/jni_md.h:
> -typedef __int64 jlong;
> +typedef long long jlong;
>
> Problem: libsvnjavahl needs libsvn_fs (shouldn't this be a problem for
> everyone, even if you aren't using cygwin???)
> Solution:
> --- build.conf.orig 2005-05-09 08:17:55.000000000 +0200
> +++ build.conf 2005-05-10 17:53:14.354796500 +0200
> @@ -417,7 +417,7 @@
> description = Subversion Java HighLevel binding
> type = lib
> path = subversion/bindings/java/javahl/native
> -libs = libsvn_repos libsvn_client libsvn_wc libsvn_ra libsvn_delta
> libsvn_subr
> +libs = libsvn_fs libsvn_repos libsvn_client libsvn_wc libsvn_ra
> libsvn_delta libsvn_subr
> aprutil apriconv apr neon
> sources = *.cpp *.c
> add-deps = $(javahl_javah_DEPS) $(javahl_java_DEPS)
>
> Problem/Solution: As I am using win32 Java I had to change the syntax
> of the -classpath option in Makefile.in and
> build/generator/gen_make.py. I enclosed it in " " and I have to use
> ';' instead of ':'
>
> Problem: I mustn't use absolute paths names for the javac compile
> Solution:
> --- build/generator/gen_make.py.orig 2005-03-22
> 16:08:25.000000000 +0100
> +++ build/generator/gen_make.py 2005-05-10 17:53:58.323265100
> +0200
> @@ -146,8 +146,7 @@
> # link in the object file
> objects.append(link_dep.filename)
> for dep in self.graph.get_sources(gen_base.DT_OBJECT,
> link_dep, gen_base.SourceFile):
> - object_srcs.append(
> - build_path_join('$(abs_srcdir)', dep.filename))
> + object_srcs.append(dep.filename)
> elif isinstance(link_dep, gen_base.HeaderFile):
> # link in the header file
> # N.B. that filename_win contains the '_'-escaped class name
>
> I would be very greatful if anybody could help me.
>
> Mathias
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org