FAQ-Source
Subscribe

From OpenNMS

Jump to: navigation, search

Contents

Building from Source

Q: How do I download the source?

A: Checkout_the_Source_Code

Q: How do I compile it?

A: Building_OpenNMS

Q: Why do I get "Build Fails: postgres.h: No such file or directory"

A: OpenNMS needs to have the postgres header files.

On RPM-based distributions, this is usually supplied by the postgresql-devel RPM. Install that before attempting to build.

Q: Why do I get "Failed to initialize JNI RRD interface - undefined symbol: rrd_test_error"

A: Based information from an email to opennms-discuss on Wed 07/04/2004 by Jonathan Sartin:

Most likely librrd.so was not available when you initially built OpenNMS. You can test this by running ldd against libjrrd.so. It should show a dependancy on librrd.so.0.

If not then perhaps you forgot to build rrdtool with the --enable-shared flag (ie. you can't locate librrd.so on your system) or the dynamic linker couldn't find the rrdtool shared library (ldconfig -v | grep librrd). Either way, after you've fixed these problems, you'll need to recompile libjrrd.so:

  • Blow away the compiled libjrrd.so in the work/jrrd directory of the opennms source tree.
  • ./build.sh compile.native.jrrd.unix
  • run ldd on the new libjrrd.so in work/jrrd/ to check that it has a dependecy on librrd.so.0.
  • Copy the new libjrrd.so from work/jrrd into opennms_home/lib

Restart opennms and the problem should go away.

Q: Why do I get ld: fatal: relocations remain against allocatable but non-writable sections?

A: If you're getting this message (likely on Solaris), preceded by a bazillion lines of the form [cc] <unknown> 0x1ec /usr/local/lib/librrd.a(rrd_foo.o), then you need to rebuild rrdtool and libjrrd as described in Jonathan Sartin's answer above.

===Q: Why do I get Exception in thread "main" java.lang.Exception: Unknown CREATE encountered: CREATE FUNCTION plpgsql _call_handler when I try to run bin/install -disU A: Check your locale settings and make sure LC_CTYPE=en_US.UTF-8 (Or whatever english locale your system uses).