个人工具

“UbuntuHelp:SubversionAndJavahl”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
 
第63行: 第63行:
 
(Note that I installed it to a non-standard location.  If you want to use the library from that location, you need to add /usr/local/svnjavahl/lib to your LD_LIBRARY_PATH environment variable.)
 
(Note that I installed it to a non-standard location.  If you want to use the library from that location, you need to add /usr/local/svnjavahl/lib to your LD_LIBRARY_PATH environment variable.)
 
I can confirm that this version works by running a small test program.  I can NOT, however, get it to work in eclipse.  When I try, I get this error (once for each project that uses subversion):
 
I can confirm that this version works by running a small test program.  I can NOT, however, get it to work in eclipse.  When I try, I get this error (once for each project that uses subversion):
<pre><nowiki>Unhandled event loop exception
+
<pre><nowiki>
 +
Unhandled event loop exception
 
Reason:
 
Reason:
 
ctNative</nowiki></pre>
 
ctNative</nowiki></pre>

2010年5月20日 (四) 00:18的最新版本

Subversion and Javahl

Javahl is the subversion <-> java library. This installation method doesn't work, but here is my output. I hope somebody will be able to complete it and make it work. I tried to follow the first part of this Howto install SvnUp, but javac doesn't find the sources. I have Java 1.5 installed. Anyone ?

  • Go in your build directory, I use ~/builds
  • download subversion sources : apt-get source subversion
  • extract the sources : tar xzf subversion_1.0.9.orig.tar.gz
  • go in the folder and extract again : tar zxvf subversion_1.0.9.tar.gz
  • go in the folder and run : ./autogen.sh
  • run : ./configure --prefix=/usr
  • run : make
  • go in subfolder : subversion/bindings/java/javahl
  • run again : ./autogen.sh
  • run (not sure if it's right) : ./configure --prefix=/usr --with-jdk=/usr/lib/j2sdk1.5-sun
  • run : make

This is where it doesn't work, here is the output :

Making all in src
make[1]: Entering directory `/home/zimba/builds/subversion-1.0.9/subversion-1.0.9/subversion/bindings/java/javahl/src'
CLASSPATH=../cls:./../cls:$CLASSPATH /usr/lib/j2sdk1.5-sun/bin/javac -d ../cls
javac: no source files
Usage: javac <options> <source files>
where possible options include:
  -g                         Generate all debugging info
  -g:none                    Generate no debugging info
  -g:{lines,vars,source}     Generate only some debugging info
  -nowarn                    Generate no warnings
  -verbose                   Output messages about what the compiler is doing
  -deprecation               Output source locations where deprecated APIs are used
  -classpath <path>          Specify where to find user class files
  -cp <path>                 Specify where to find user class files
  -sourcepath <path>         Specify where to find input source files
  -bootclasspath <path>      Override location of bootstrap class files
  -extdirs <dirs>            Override location of installed extensions
  -endorseddirs <dirs>       Override location of endorsed standards path
  -d <directory>             Specify where to place generated class files
  -encoding <encoding>       Specify character encoding used by source files
  -source <release>          Provide source compatibility with specified release
  -target <release>          Generate class files for specific VM version
  -version                   Version information
  -help                      Print a synopsis of standard options
  -X                         Print a synopsis of nonstandard options
  -J<flag>                   Pass <flag> directly to the runtime system

make[1]: *** [class.stamp] Error 2
make[1]: Leaving directory `/home/zimba/builds/subversion-1.0.9/subversion-1.0.9/subversion/bindings/java/javahl/src'
make: *** [all-recursive] Error 1

How I did it

Okay, this is NOT Ubuntu Linux (I'm using debian unstable) so forgive me if this doesn't work for you. Here are the steps I used:

  • Go into your build directory.
  • apt-get build-dep subversion get the packages you need to build subversion
  • apt-get source subversion get the sources
  • cd subversion-1.0.9/ cd into the directory (apt-get should have created this for you)
  • dpkg-buildpackage build the package... this takes a LONG TIME, since they have so many tests to verify the build worked correctly
  • cd build-tree/subversion-1.0.9/subversion/bindings/java/javahl This is where the javahl bindings are
  • ./autogen.sh I used automake-1.8! apt-get that if you want your build to be as close to mine as possible!
  • ./configure --prefix=/usr/local/svnjavahl --with-jdk=/usr/lib/j2sdk1.5-sun You can obviously specify your own prefix and jdk. I specified that one because I don't like locally-installed libraries intermingling with the debian-installed libraries.
  • make Build it.
  • make install Install it.

(Note that I installed it to a non-standard location. If you want to use the library from that location, you need to add /usr/local/svnjavahl/lib to your LD_LIBRARY_PATH environment variable.) I can confirm that this version works by running a small test program. I can NOT, however, get it to work in eclipse. When I try, I get this error (once for each project that uses subversion):

Unhandled event loop exception
Reason:
ctNative

So, for now I'm just leaving the Subclipse plugin to use the command line. It's slow, but at least it actually does something.


If I understand well, the problem you've got is because Subclipse is built against some particular version of javahl and subversion (see http://subclipse.tigris.org/) Current version should work better with subversion 1.1+ Thanks a lot for your help, I hope we'll soon have something working well.


Hmm, I managed to build a subversion 1.1.1 w/ javahl library (using the packages out of debian 'experimental') but I still got the same problem. Sad. Thanks for the tip on that, though, but it seems like I'm having bigger problems. From EmilWilmanski Mon Dec 13 11:29:57 +0000 2004 From: Emil Wilmanski Date: Mon, 13 Dec 2004 11:29:57 +0000 Subject: I done it... Message-ID: <[email protected]> Big thanx for your article... I need javahl to eclipse plugin... How I do this: We nead new version of subversion (1.1.1 from experimental source) edit subversion-1.1.1/debian/rules line 39 add "--enable-javahl" (to add configure option to confflags, dont forget "\" at the end of prev. line) compile all using dpkg-buildpackage after it cd subversion-1.1.1/build-tree/subversion-1.1.1 make javahl I do this without problems... in subversion-1.1.1/subversion/bindings/java/javahl/native/.lib we have javahl libs :) From DagSverreSeljebotn Tue Jan 11 08:36:12 +0000 2005 From: Dag Sverre Seljebotn Date: Tue, 11 Jan 2005 08:36:12 +0000 Subject: Native Java Message-ID: <20050111083612+0000@https://www.ubuntulinux.org> I've had success with the Pure Java Subversion Client - http://tmate.org/svn/ Some small glitches, to import a project through the svn view do: - Right-click, import it. - It will (may?) fail. Go back to svn view, find the rep that was now opened for that project, and reenter login information. - It will now succed, but a manual refresh of the project might be necesarry for any files to appear. Then reopen the project to hide the .svn-folders...

working subversion with javahl

From MaciejFreudenheim Sun Mar 13 02:03:35 +0000 2005 From: Maciej Freudenheim Date: Sun, 13 Mar 2005 02:03:35 +0000 Subject: Everything works (using native javahl)! Message-ID: <20050313020335+0000@https://www.ubuntulinux.org> OK, everything works now perfectly, here is what I did: 1. apt-get source subversion 2. cd subversion-1.1.1 3. edit debian/rules (f.e.: gedit debian/rules )

AND change:

ENABLE_JAVAHL=no

to:

ENABLE_JAVAHL=yes

at the beginning of the file. ALSO search string "with-jdk" which is somewhere below, and make sure it points to your JDK. In my situation, it is:

confflags += --enable-javahl --without-jikes --with-jdk=/usr/lib/sun-j2sdk1.5.0

4. sudo dpkg-buildpackage

If it stops complaining about missing dependencies just install them with sudo apt-get install and relaunch dpkg-buildpackage :) It takes long time to finish. 5. cd debian/libsvn-javahl/usr/ 6. sudo cp -a * /usr

I know, it's ugly way, but i haven't time to study how to build proper deb package 7. sudo ldconfig 8. launch eclipse with: $PATH_TO_YOUR_ECLIPSE_DIRECTORY/eclipse -vmargs -Djava.library.path=/usr/lib

It's important to set that java.library.path property to /usr/lib, without it Eclipse wouldn't find libsvnjavahl*.so we just installed into /usr/lib 9. install subversion plugin in Eclipse normally, like described in the beginning of that Wiki page

10. restart eclipse: everything should work, you should be able to chose javahl in preferences->team->svn :)


From JojoPaderes Mon May 9 03:51:33 +0100 2005 From: Jojo Paderes Date: Mon, 09 May 2005 03:51:33 +0100 Subject: Problem compiling Subversion with Javahl Message-ID: <20050509035133+0100@https://www.ubuntulinux.org> Thanks Maciej for the nice article! I'm following the steps for compiling Subversion with Javahl support but got stuck at step #4 which is building the Debian package using dpkg-buildpackage command. I encountered an error while building the package using dpkg-buildpackage command:

checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
make: *** [debian/stamp-configure] Error 1
To solve the error C++ preprocessor "/lib/cpp" fails sanity check while compiling Subversion, you need to download GCC, CPP and G++ by installing the following packages
gcc cpp g++
(see InstallingSoftware).

From KrzysztofLangner Fri May 13 22:15:43 +0100 2005 From: Krzysztof Langner Date: Fri, 13 May 2005 22:15:43 +0100 Subject: javahl and JavaSVN Message-ID: <[email protected]> Instead of using javahl It is possible to install JavaSVN from http://tmate.org/svn/. (JavaSVN is a pure java Subversion (SVN) client library). On my computer I have installed:

  • Unbuntu 5.04
  • JDK 1.5.0_3
  • Eclipse 3.0.2
  • subversion package
  • subclipse plugin
  • JavaSVN plugin

and Subversion works fine for me.