Making Eclipse JavaHL working, recompiling Subversion from the sources
3 Comments Published May 13th, 2009 in Java Tags: .Today I reinstalled my laptop with Ubuntu 9.04 (64bit version) and it runs like a charm.
Now I am reinstalling all the things I need for work, and of course eclipse with subclipse plugin.
Facing the usual problem with JavaHL, this time I wanted to fix it; because on OSX/Linux if you run different versions of command line svn tool and in eclipse (SVNKit), you can get into errors due to version mismatch between of the supported meta files.
Having eclipse to work with JavaHL libraries matching your svn installation will prevents this problem. So a solution is to build Subversion and the JavaHL libraries, and if you need the command line, use the one you built that is compatible to the JavaHL libraries used by eclipse.
Here the steps I made.
First of all, install the dependencies. From an almost new ubuntu 9.04 installation I installed following stuff:
$ sudo apt-get install libapr1 libaprutil1 libtool autoconf automake autotools-dev g++ gettext libneon27-dev sun-java6-jdk libapr1-dev libaprutil1-dev
Then download and compile
$ wget http://subversion.tigris.org/downloads/subversion-1.6.2.tar.bz2 $ tar xvjf subversion-1.6.2.tar.bz2 $ cd subversion-1.6.2 $ make clean $ ./autogen.sh $ ./configure --with-ssl --enable-javahl --with-jdk=/usr/lib/jvm/java-6-sun/ $ make $ sudo make install $ make javahl $ sudo make install-javahl
Check svn command line, and libraries:
$ svn --version svn, version 1.6.2 (r37639) compiled May 13 2009, 18:09:57 Copyright (C) 2000-2009 CollabNet. Subversion is open source software, see http://subversion.tigris.org/ This product includes software developed by CollabNet (http://www.Collab.Net/). The following repository access (RA) modules are available: * ra_neon : Module for accessing a repository via WebDAV protocol using Neon. - handles 'http' scheme - handles 'https' scheme * ra_svn : Module for accessing a repository using the svn network protocol. - handles 'svn' scheme * ra_local : Module for accessing a repository on local disk. - handles 'file' scheme $ ls -l /usr/local/lib/ | grep javahl -rw-r--r-- 1 root root 6723260 2009-05-13 18:14 libsvnjavahl-1.a -rwxr-xr-x 1 root root 1629 2009-05-13 18:14 libsvnjavahl-1.la lrwxrwxrwx 1 root root 23 2009-05-13 18:14 libsvnjavahl-1.so -> libsvnjavahl-1.so.0.0.0 lrwxrwxrwx 1 root root 23 2009-05-13 18:14 libsvnjavahl-1.so.0 -> libsvnjavahl-1.so.0.0.0 -rwxr-xr-x 1 root root 2633841 2009-05-13 18:14 libsvnjavahl-1.so.0.0.0 drwxr-xr-x 3 root root 4096 2009-05-13 18:14 svn-javahl
At this point, when you run eclipse, you need to specify where the JavaHL libraries are located:
cd /path/to/eclipse export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH ./eclipse
Checkit (Windows>Preferences>Team>SVN):

Works!
Update
If you plan to uninstall subversion, it may be a good idea to use the --prefix=/usr/local/subversion-1.6.2 in order to easier locate files later. Of course you need to change paths for libraries when indicating them to eclipse, and update $PATH and $MAN_PATH to find for commands and manual pages.
So, my configure command today would be:
./configure --with-ssl --enable-javahl --with-jdk=/usr/lib/jvm/java-6-sun --prefix=/usr/local/subversion-1.6.6/
In this way I can just remove /usr/local/subversion-1.6.6 to clean up my system.
My corresponding eclipse script is:
#!/bin/bash cd ~/opt/eclipse export LD_LIBRARY_PATH=/usr/local/subversion-1.6.6/lib:$LD_LIBRARY_PATH ./eclipse
and my manpath at ~/.manpath is:
# type "man 5 manpath" to see manual page about the format for this file. # see /etc/manpath.config for additional examples. MANDATORY_MANPATH /usr/local/subversion-1.6.6/share/man MANPATH_MAP /usr/local/subversion-1.6.6/bin /usr/local/subversion-1.6.6/share/man
and my $PATH variable is including /usr/local/subversion-1.6.6/bin
3 Responses to “Making Eclipse JavaHL working, recompiling Subversion from the sources”
- 1 Pingback on Apr 1st, 2010 at 12:29
Leave a Reply
Search
Calendar
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Apr | Jun » | |||||
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Follow me
Archives
Categories
- Android (3)
- Apple (29)
- Books (7)
- Eclipse (14)
- Errors (5)
- Firefox (7)
- Git (3)
- Hardware (18)
- Horror Code (8)
- Internet (21)
- Java (104)
- JavaScript (9)
- Life, universe and everything (45)
- Lifehacks (26)
- Linux (52)
- Opinions (26)
- OSX (11)
- OWNER API (2)
- Python (1)
- Software (33)
- Speeches and Conferences (8)
- Unix (5)
- Web (23)
- Windows (19)
Tag Cloud
Android apple architecture Bash configuration CSS Development Düsseldorf Eclipse Git Google Hardware hdr How-To howto Java JAXB job Karmic Linux lion MacBook music Open Source Opinion OSX os x patterns Pitfalls Practices Resume Security Software Suspend TDD Testing tip tonemapped Tricks Ubuntu unix video Web Workaround XML
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.
Blog License
Blogs I like
Books on the desk
Friends' Blogs
- Antonio Terreno & Valter Bernardini
- Bruno Bossola
- Daniele Galluccio
- Domenico Ventura
- Ed Schepis
- Fabrizio Gianneschi
- Luca Grulla
- Luigi Zanderighi
- Marcello Teodori
- Mida Boghetich
- Muralidharan Chandrasekaran
- Piero Ricca
- Renzo Borgatti
- Simone Bordet
- Simone Bruno
- Uberto Barbini
- Valvolog
- Webtide blogs (Greg Wilkins & Jan Bartel)
Links


















Building using BerkeleyDb
Download BerkeleyDb from http://www.oracle.com/technology/software/products/berkeley-db/index.html
tar xvzf db-4.7.25.tar.gz
cd db-4.7.25/
cd build_unix/
../dist/configure
make
make install
sudo make install
Download subversion from http://subversion.tigris.org
tar xvjf subversion-1.6.3.tar.bz2
cd subversion-1.6.3/
./autogen.sh
./configure –with-ssl –enable-javahl –with-jdk=/usr/lib/jvm/java-6-sun –with-berkeley-db=db.h:/usr/local/BerkeleyDB.4.7/include:/usr/local/BerkeleyDB.4.7/lib:db-4.7 –prefix=/usr/local/subversion-1.6.3
make
sudo make install
make javahl
sudo make install-javahl
Thanks for this article !