Re: OpenNMS compilation error on 1.3.2 branch when trying on Solaris 10 Sparc (T1000)
DJ Gregor <dj <at> opennms.org>
2006-11-11 20:02:09 GMT
Ooooh... A T1000. Nice.
That lovely error message means that Maven's C compilation plugin
couldn't find an include directory. The RRD include directory needs
to be specified with the build.rrd.include.dir property, but you're
setting build.rrdtool.include.dir.
Give this a whirl instead:
JAVA_HOME=/usr/java \
PATH=$PATH:/usr/sfw/bin:/opt/SUNWspro/bin \
./build.sh \
-Dbuild.rrd.include.dir=/usr/local/include \
-Dbuild.rrd.lib.dir=/usr/local/lib \
-Dopennms.home=/var/opennms/running/1.3.1-1 \
-Dinstall.database.name=opennms \
-Dinstall.database.user=opennms \
-Dinstall.database.password=<elided> \
-Dinstall.database.url=jdbc:postgresql://shiva-
arm-00-10.int.unixpimp.dk:5432/ \
-Dinstall.database.bindir=/var/opennms/running/1.3.1-1/pgsql-
export \
-Dbuild.postgresql.include.dir=/usr/local/include/postgresql/
server/ \
-Dinstall.rrdtool.bin=/usr/local/bin/rrdtool \
-Dbuild.jni.linker.arg="-L/usr/sfw/lib -R/usr/sfw/lib" \
-Dbuild.postgresql.compiler.arg=-m32 -Dbuild.jni.compiler.arg=-
m32 \
install assembly:directory-inline
Notes:
1) No CFLAGS needed.... the Maven build doesn't use it at all
2) Use opennms.home to set where OpenNMS will live at run time; I
think it still gets put in target/opennms-1.3.2-SNAPSHOT
3) I've removed the password for the database.
4) I'm not sure if you ned the Sun compiler in your path... I'm not
sure if we'll use anything from it... you might need /usr/ccs/bin in
your path, though
5) No need to put /usr/local/lib in the JNI linker arguments list: /
usr/local/lib was specified as the rrd lib directory, and it will be
added to the rrd linker command line (with -L and -R).
6) Added -R/usr/sfw/lib to the JNI linker arguments list so the
runtime path to the library directory is set (otherwise you'd have to
set LD_LIBRARY_PATH)
7) Removed postgresql.jar setting... this is no longer an externally
configurable option.
Give it a try and see if this will work.
Finally, thanks for the details!
- djg
On Nov 10, 2006, at 10:37 PM, Ian Johannesen wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I've encountered the following error:
> [snip]
> [INFO] Building OpenNMS RRDTool JNI Library - Solaris
> [INFO] task-segment: [install]
> [INFO]
> -
> ----------------------------------------------------------------------
> ------
> [INFO] [native:initialize]
> [INFO] [native:javah {execution: default}]
> [INFO] Parsing
> /var/opennms/source/opennms/opennms-rrd/opennms-rrd-rrdtool/opennms-
> rrdtool-api/target/opennms-rrdtool-api-1.3.2-SNAPSHOT.jar
> for native classes.
> [INFO] Found native class: org.opennms.netmgt.rrd.rrdtool.Interface
> [INFO] Parsing
> /var/opennms/.m2/repository/log4j/log4j/1.2.9/log4j-1.2.9.jar for
> native
> classes.
> [INFO] Found native class: org.apache.log4j.nt.NTEventLogAppender
> [INFO] /usr/jdk/instances/jdk1.5.0/jre/../bin/javah -d
> /var/opennms/source/opennms/opennms-rrd/opennms-rrd-rrdtool/opennms-
> rrdtool-jni/opennms-rrdtool-jni-solaris/target/native/javah
> - -classpath
> /var/opennms/source/opennms/opennms-rrd/opennms-rrd-rrdtool/opennms-
> rrdtool-api/target/opennms-rrdtool-api-1.3.2-SNAPSHOT.jar:/var/
> opennms/.m2/repository/log4j/log4j/1.2.9/log4j-1.2.9.jar
> org.opennms.netmgt.rrd.rrdtool.Interface
> org.apache.log4j.nt.NTEventLogAppender
> [INFO] [native:compile]
> [INFO]
> -
> ----------------------------------------------------------------------
> --
> [ERROR] FATAL ERROR
> [INFO]
> -
> ----------------------------------------------------------------------
> --
> [INFO] null
> [INFO]
> -
> ----------------------------------------------------------------------
> --
> [INFO] Trace
> java.lang.NullPointerException
> at
> org.codehaus.mojo.natives.compiler.AbstractCCompiler.getCommandLine
> (AbstractCCompiler.java:76)
> at
> org.codehaus.mojo.natives.compiler.AbstractCompiler.compile
> (AbstractCompiler.java:74)
> at
> org.codehaus.mojo.natives.plugin.NativeCompileMojo.execute
> (NativeCompileMojo.java:162)
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo
> (DefaultPluginManager.java:412)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
> (DefaultLifecycleExecutor.java:534)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLif
> ecycle(DefaultLifecycleExecutor.java:475)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
> (DefaultLifecycleExecutor.java:454)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHand
> leFailures(DefaultLifecycleExecutor.java:306)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegment
> s(DefaultLifecycleExecutor.java:273)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
> (DefaultLifecycleExecutor.java:140)
> at org.apache.maven.DefaultMaven.doExecute
> (DefaultMaven.java:322)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:
> 115)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> [snip]
>
> Java version:
> - -bash-3.00$ java -version
> java version "1.5.0_07"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
> Java HotSpot(TM) Server VM (build 1.5.0_07-b03, mixed mode)
>
> Solaris version:
> - -bash-3.00$ uname -a
> SunOS shiva-arm-00-12.ext.unixpimp.dk 5.10 Generic_118833-17 sun4v
> sparc
> SUNW,Sun-Fire-T1000
>
> Gcc version:
> - -bash-3.00$ /usr/sfw/bin/gcc -v
> Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs
> Configured with:
> /gates/sfw10/builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure
> - --prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as
> - --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++
> - --enable-shared
> Thread model: posix
> gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
>
> build.sh command:
> JAVA_HOME=/usr/java CFLAGS="-I/usr/local/include -L/usr/local/lib"
> PATH=$PATH:/usr/sfw/bin:/opt/SUNWspro/bin ./build.sh
> - -Dbuild.rrdtool.include.dir=/usr/local/include
> - -Dbuild.rrdtool.lib.dir=/usr/local/lib
> - -Dinstall.dir=/var/opennms/running/1.3.1-1
> - -Dinstall.database.name=opennms -Dinstall.database.user=opennms
> - -Dinstall.database.password=<elided>
> -
> -Dinstall.database.url=jdbc:postgresql://shiva-
> arm-00-10.int.unixpimp.dk:5432/
> - -Dinstall.database.bindir=/var/opennms/running/1.3.1-1/pgsql-export
> - -Dbuild.postgresql.include.dir=/usr/local/include/postgresql/server/
> - -Dpostgresql.jar=postgresql.jar
> - -Dinstall.rrdtool.bin=/usr/local/bin/rrdtool
> - -Dbuild.jni.linker.arg="-L/usr/sfw/lib -L/usr/local/lib"
> - -Dbuild.postgresql.compiler.arg=-m32 -Dbuild.jni.compiler.arg=-m32
> install assembly:directory-inline
>
> rrdtools version:
> - -bash-3.00$ /usr/local/bin/rrdtool -v
> RRDtool 1.2.15 Copyright 1997-2006 by Tobias Oetiker
> <tobi <at> oetiker.ch>
> Compiled Nov 8 2006 16:43:46
>
> PostGreSQL version:
> - -bash-3.00$ /usr/local/bin/psql --version
> psql (PostgreSQL) 8.1.4
> contains support for command-line editing
>
> Hope someone knows about this and a fix is close by or that this will
> aid in debugging hunting it if not.
>
> - --
> Digitally Yours,
>
> Ian Johannesen
> web: http://perlpimp.dk/
> msn: ij <at> perlpimp.dk
> cel: (+34) 663 739 237
> tel: (+34) 952 206 905
> tel: (+45) 36 99 05 96
> tel: (+1) 213 985 3138
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFVUWX0/HOnDavf4YRAncpAKCRX/woGQ36vtDvftHCNG1iO0EEGgCeJmEq
> RR3FDzQz61Q/lj15Zb7UyBA=
> =QZvO
> -----END PGP SIGNATURE-----
>
> ----------------------------------------------------------------------
> ---
> Using Tomcat but need to do more? Need to support web services,
> security?
> Get stuff done quickly with pre-integrated technology to make your
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?
> cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Please read the OpenNMS Mailing List FAQ:
> http://www.opennms.org/index.php/Mailing_List_FAQ
>
> opennms-install mailing list
>
> To *unsubscribe* or change your subscription options, see the
> bottom of this page:
> https://lists.sourceforge.net/lists/listinfo/opennms-install
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ
opennms-install mailing list
To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-install