“UbuntuHelp:SubversionAndJavahl”的版本间的差异
来自Ubuntu中文
小 (新页面: {{From|https://help.ubuntu.com/community/SubversionAndJavahl}} {{Languages|UbuntuHelp:SubversionAndJavahl}} === Subversion and Javahl === Javahl is the subversion <-> java library. This ...) |
小 |
||
第3行: | 第3行: | ||
=== Subversion and Javahl === | === Subversion and Javahl === | ||
Javahl is the subversion <-> java library. | 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. | 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 [http://mywiki.brosch.cc/cgi-bin/myWiki/view/Debian/HowToInstallSvnUp Howto install SvnUp], but javac doesn't find the sources. I have Java 1.5 installed. Anyone ? | I tried to follow the first part of this [http://mywiki.brosch.cc/cgi-bin/myWiki/view/Debian/HowToInstallSvnUp 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 | * Go in your build directory, I use ~/builds | ||
* download subversion sources : <code><nowiki> apt-get source subversion </nowiki></code> | * download subversion sources : <code><nowiki> apt-get source subversion </nowiki></code> | ||
第15行: | 第12行: | ||
* run : <code><nowiki> ./configure --prefix=/usr </nowiki></code> | * run : <code><nowiki> ./configure --prefix=/usr </nowiki></code> | ||
* run : <code><nowiki> make </nowiki></code> | * run : <code><nowiki> make </nowiki></code> | ||
− | |||
* go in subfolder : <code><nowiki> subversion/bindings/java/javahl </nowiki></code> | * go in subfolder : <code><nowiki> subversion/bindings/java/javahl </nowiki></code> | ||
* run again : <code><nowiki> ./autogen.sh </nowiki></code> | * run again : <code><nowiki> ./autogen.sh </nowiki></code> | ||
第48行: | 第44行: | ||
-X Print a synopsis of nonstandard options | -X Print a synopsis of nonstandard options | ||
-J<flag> Pass <flag> directly to the runtime system | -J<flag> Pass <flag> directly to the runtime system | ||
− | |||
make[1]: *** [class.stamp] Error 2 | 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[1]: Leaving directory `/home/zimba/builds/subversion-1.0.9/subversion-1.0.9/subversion/bindings/java/javahl/src' | ||
make: *** [all-recursive] Error 1 | make: *** [all-recursive] Error 1 | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
==== How I did it ==== | ==== 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: | 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. | * Go into your build directory. | ||
* <code><nowiki> apt-get build-dep subversion </nowiki></code> get the packages you need to build subversion | * <code><nowiki> apt-get build-dep subversion </nowiki></code> get the packages you need to build subversion | ||
第68行: | 第60行: | ||
* <code><nowiki> make </nowiki></code> Build it. | * <code><nowiki> make </nowiki></code> Build it. | ||
* <code><nowiki> make install </nowiki></code> Install it. | * <code><nowiki> make install </nowiki></code> 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.) | (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 | ||
第76行: | 第66行: | ||
ctNative</nowiki></pre> | ctNative</nowiki></pre> | ||
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. | 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/) | 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+ | Current version should work better with subversion 1.1+ | ||
Thanks a lot for your help, I hope we'll soon have something working well. | 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. | 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 EmilWilmanski Mon Dec 13 11:29:57 +0000 2004 | ||
From: Emil Wilmanski | From: Emil Wilmanski | ||
第90行: | 第77行: | ||
Subject: I done it... | Subject: I done it... | ||
Message-ID: <[email protected]> | Message-ID: <[email protected]> | ||
− | |||
Big thanx for your article... I need javahl to eclipse plugin... | Big thanx for your article... I need javahl to eclipse plugin... | ||
How I do this: | How I do this: | ||
第104行: | 第90行: | ||
subversion-1.1.1/subversion/bindings/java/javahl/native/.lib | subversion-1.1.1/subversion/bindings/java/javahl/native/.lib | ||
we have javahl libs :) | we have javahl libs :) | ||
− | |||
From DagSverreSeljebotn Tue Jan 11 08:36:12 +0000 2005 | From DagSverreSeljebotn Tue Jan 11 08:36:12 +0000 2005 | ||
From: Dag Sverre Seljebotn | From: Dag Sverre Seljebotn | ||
第110行: | 第95行: | ||
Subject: Native Java | Subject: Native Java | ||
Message-ID: <20050111083612+0000@https://www.ubuntulinux.org> | Message-ID: <20050111083612+0000@https://www.ubuntulinux.org> | ||
− | |||
I've had success with the Pure Java Subversion Client - http://tmate.org/svn/ | 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: | Some small glitches, to import a project through the svn view do: | ||
- Right-click, import it. | - 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 (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... | - 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 === | === working subversion with javahl === | ||
− | |||
From MaciejFreudenheim Sun Mar 13 02:03:35 +0000 2005 | From MaciejFreudenheim Sun Mar 13 02:03:35 +0000 2005 | ||
From: Maciej Freudenheim | From: Maciej Freudenheim | ||
第125行: | 第106行: | ||
Subject: Everything works (using native javahl)! | Subject: Everything works (using native javahl)! | ||
Message-ID: <20050313020335+0000@https://www.ubuntulinux.org> | Message-ID: <20050313020335+0000@https://www.ubuntulinux.org> | ||
− | |||
OK, everything works now perfectly, here is what I did: | OK, everything works now perfectly, here is what I did: | ||
− | |||
1. <code><nowiki> apt-get source subversion </nowiki></code> | 1. <code><nowiki> apt-get source subversion </nowiki></code> | ||
− | |||
2. <code><nowiki> cd subversion-1.1.1 </nowiki></code> | 2. <code><nowiki> cd subversion-1.1.1 </nowiki></code> | ||
− | |||
3. edit debian/rules (f.e.: <code><nowiki> gedit debian/rules </nowiki></code>) | 3. edit debian/rules (f.e.: <code><nowiki> gedit debian/rules </nowiki></code>) | ||
− | |||
AND change: | AND change: | ||
<pre><nowiki> | <pre><nowiki> | ||
第143行: | 第119行: | ||
</nowiki></pre> | </nowiki></pre> | ||
at the beginning of the file. | at the beginning of the file. | ||
− | |||
ALSO search string "with-jdk" which is somewhere below, and make sure it points to your JDK. | ALSO search string "with-jdk" which is somewhere below, and make sure it points to your JDK. | ||
In my situation, it is: | In my situation, it is: | ||
第149行: | 第124行: | ||
confflags += --enable-javahl --without-jikes --with-jdk=/usr/lib/sun-j2sdk1.5.0 | confflags += --enable-javahl --without-jikes --with-jdk=/usr/lib/sun-j2sdk1.5.0 | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
4. <code><nowiki> sudo dpkg-buildpackage </nowiki></code> | 4. <code><nowiki> sudo dpkg-buildpackage </nowiki></code> | ||
− | |||
If it stops complaining about missing dependencies just install them with sudo apt-get install and relaunch 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. | It takes long time to finish. | ||
− | |||
5. <code><nowiki> cd debian/libsvn-javahl/usr/ </nowiki></code> | 5. <code><nowiki> cd debian/libsvn-javahl/usr/ </nowiki></code> | ||
− | |||
6. <code><nowiki> sudo cp -a * /usr </nowiki></code> | 6. <code><nowiki> sudo cp -a * /usr </nowiki></code> | ||
I know, it's ugly way, but i haven't time to study how to build proper deb package | I know, it's ugly way, but i haven't time to study how to build proper deb package | ||
− | |||
7. <code><nowiki> sudo ldconfig </nowiki></code> | 7. <code><nowiki> sudo ldconfig </nowiki></code> | ||
− | |||
8. launch eclipse with: <code><nowiki> $PATH_TO_YOUR_ECLIPSE_DIRECTORY/eclipse -vmargs -Djava.library.path=/usr/lib </nowiki></code> | 8. launch eclipse with: <code><nowiki> $PATH_TO_YOUR_ECLIPSE_DIRECTORY/eclipse -vmargs -Djava.library.path=/usr/lib </nowiki></code> | ||
− | |||
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 | 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 | 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 :) | 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 JojoPaderes Mon May 9 03:51:33 +0100 2005 | ||
第177行: | 第141行: | ||
Subject: Problem compiling Subversion with Javahl | Subject: Problem compiling Subversion with Javahl | ||
Message-ID: <20050509035133+0100@https://www.ubuntulinux.org> | Message-ID: <20050509035133+0100@https://www.ubuntulinux.org> | ||
− | |||
Thanks Maciej for the nice article! | 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: | 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: | ||
− | |||
<pre><nowiki> | <pre><nowiki> | ||
checking whether we are using the GNU C++ compiler... no | checking whether we are using the GNU C++ compiler... no | ||
第190行: | 第151行: | ||
make: *** [debian/stamp-configure] Error 1 | make: *** [debian/stamp-configure] Error 1 | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
To solve the error <code><nowiki>C++ preprocessor "/lib/cpp" fails sanity check</nowiki></code> while compiling Subversion, you need to download GCC, CPP and G++ by installing the following packages | To solve the error <code><nowiki>C++ preprocessor "/lib/cpp" fails sanity check</nowiki></code> while compiling Subversion, you need to download GCC, CPP and G++ by installing the following packages | ||
<pre><nowiki> | <pre><nowiki> | ||
gcc cpp g++</nowiki></pre> (see InstallingSoftware). | gcc cpp g++</nowiki></pre> (see InstallingSoftware). | ||
− | |||
From KrzysztofLangner Fri May 13 22:15:43 +0100 2005 | From KrzysztofLangner Fri May 13 22:15:43 +0100 2005 | ||
From: Krzysztof Langner | From: Krzysztof Langner | ||
第200行: | 第159行: | ||
Subject: javahl and JavaSVN | Subject: javahl and JavaSVN | ||
Message-ID: <[email protected]> | 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). | 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: | 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. | and Subversion works fine for me. | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2007年11月30日 (五) 21:36的版本
![]() |
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
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.