DragonFly BSD
DragonFly users List (threaded) for 2011-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Running OpenGrok on DragonFly

From: Francois Tigeot <ftigeot@xxxxxxxxxxxx>
Date: Sat, 23 Jul 2011 11:32:20 +0200


My motivation for making the JDK 1.6 work on DragonFly was to run OpenGrok.

OpenGrok is a really nice source code browser. Want to see the definition
of a function or where it is used ? Just type its name in a search box
and click on the results.

It is initially the work of a Sun employee, and was heavily used with the
OpenSolaris project. Home page:

Unfortunately, OpenGrok is written in Java, and is not as easy to run as
more traditional programs.
I have compiled a few instructions based on what I did to get it to browse
the DragonFly source tree:

0. Use DragonFly-2.10

	I have had some reports Java crashes on DragonFly 2.11 at the moment. 2.11
	is under heavy development and this is not so surprising, but I better say
	it loud and clear before someone loses too much time trying

1. build lang/kaffe with gcc-4.1 and install it

	cd /usr/pkgsrc/lang/kaffe
	CCVER=gcc41 bmake install

	lang/kaffe is miscompiled by gcc-4.4 and cannot bootstrap the needed JDKs

2. install wip/jdk16

	pkgsrc-wip is an additional set of packages which are not in pkgsrc.
	Get a tarball here and extract it in your pkgsrc tree:
	You'll then get a new wip/ subdirectory

3. Install Tomcat from www/apache-tomcat6

4. Download the OpenGrok binary tarball

	I used the 0.10 version available here:
	Extract it somewhere safe, like in /usr/local

5. Edit the file named bin/OpenGrok

	Add this at the top:


	And change some other variables:


6. Deploy the web application in Tomcat

	./bin/OpenGrok deploy

7. Create the index

	./bin/OpenGrok index

	This will take a long time and eat much memory.
	A x86_64 system with 2GB memory kept swapping during the operation
	and the web interface was nearly unusable

	At this stage, OpenGrok is operational; it just won't find results for the
	parts of the code which are not yet indexed.

8. Point your web browser to http://the.opengrok.machine.address:8080/source

	That's all folks!

Francois Tigeot

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]