Hi,

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:
http://hub.opensolaris.org/bin/view/Project+opengrok/WebHome

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:
        http://pkgsrc-wip.sourceforge.net/
        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:
        http://hub.opensolaris.org/bin/view/Project+opengrok/files
        Extract it somewhere safe, like in /usr/local

5. Edit the file named bin/OpenGrok

        Add this at the top:

        OPENGROK_TOMCAT_BASE=/usr/pkg/share/tomcat

        And change some other variables:

        OPENGROK_INSTANCE_BASE="/var/opengrok"  
        SRC_ROOT="/usr/src"
        DATA_ROOT="/var/tmp/opengrok_data"
        EXUBERANT_CTAGS="/usr/pkg/bin/exctags"
        JAVA_HOME="/usr/pkg/java/jdk-1.6.0"
        GIT="/usr/pkg/bin/git"

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

Reply via email to