[collectd] Configuring/compiling collectd with Java support on Mac OS X

Bob Cotton bcotton at rallydev.com
Wed Mar 31 00:30:01 CEST 2010


Here's how I fixed it (note the bold)

$ export JAVA_CPPFLAGS="-I/Library/Java/Home/include"
$ export JAVA_LDFLAGS="-L/Library/Java/Home/bundle/Libraries -Wl,-rpath
-Wl,/Library/Java/Home/bundle/Libraries *-framework JavaVM*"
$ export JAVAC="/Library/Java/Home/bin/javac"
$ ./configure ...

On Thu, Feb 18, 2010 at 5:04 AM, Amit Gupta <amit.gupta221 at gmail.com> wrote:

> Take a look at the config.log and try to figure out what is wrong. My guess
> is that JNI_CreateJavaVM function check has failed for some reason. Check
> for this line "checking for JNI_CreateJavaVM in -ljvm" and the result of it
> in your config.log.
>
> Regards
> Amit
>
> On Sat, Feb 6, 2010 at 10:30 AM, Geoffrey Arnold <
> geoffrey at geoffreyarnold.com> wrote:
>
>> Hi Florian, any ideas?
>>
>> On Feb 4, 2010, at 2:52 PM, Geoffrey Arnold wrote:
>>
>> > Message bounced because of attachment size.  Here's the bzip'd
>> config.log:
>> >
>> > <config.log.bz2>
>> > On Feb 4, 2010, at 2:38 PM, Geoffrey Arnold wrote:
>> >
>> >> Hi Octo,
>> >>
>> >> I started fresh and ran collectd-4.9.1/configure with the following
>> options:
>> >>
>> >>      $ export JAVA_CPPFLAGS="-I/Library/Java/Home/include"
>> >>      $ export JAVA_LDFLAGS="-L/Library/Java/Home/bundle/Libraries
>> -Wl,-rpath -Wl,/Library/Java/Home/bundle/Libraries"
>> >>      $ export JAVAC="/Library/Java/Home/bin/javac"
>> >>      $ ./configure --prefix=$HOME/Applications/collectd-4.9.1
>> --enable-java
>> >>
>> >> ... and received the same error:
>> >>
>> >>      libjvm  . . . . . . . no (libjvm not found)
>> >>      ...
>> >>      configure: error: "Some plugins are missing dependencies - see the
>> summary above for details"
>> >>
>> >> Attached is config.log.
>> >>
>> >> Thanks!
>> >> Geoff.
>> >>
>> >> <config.log>
>> >>
>> >> On Feb 4, 2010, at 3:58 AM, Florian Forster wrote:
>> >>
>> >>> Hi Geoff,
>> >>>
>> >>> On Wed, Feb 03, 2010 at 05:43:51PM -0500, Geoffrey Arnold wrote:
>> >>>> I tweaked the configure script to reflect the location of the
>> required
>> >>>> directories (the issue is that the `find` command used in the
>> >>>> configure script does not traverse symlinks by default)
>> >>>
>> >>> Unfortunatly, the option required to follow symbolic links is not
>> >>> specified by POSIX and failed on some systems, iIrc some BSDs.
>> >>>
>> >>> But you don't have to edit the configure script to specify the paths
>> >>> manually. Try this:
>> >>>
>> >>> JAVA_CPPFLAGS="-I/Library/Java/Home/include" \
>> >>> JAVA_LDFLAGS="-L/Library/Java/Home/bundle/Libraries -Wl,-rpath
>> -Wl,/Library/Java/Home/bundle/Libraries" \
>> >>> JAVAC="/Library/Java/Home/bin/javac" \
>> >>> ./configure $MORE_OPTIONS
>> >>>
>> >>> This way you can manually specify the CPP-, C- and LD-flags used when
>> >>> compiling the java plugin. It's not nice, but it should work for all
>> >>> installations of Java.
>> >>>
>> >>>> I believe that the issue is with finding libjvm.dylib.
>> >>>
>> >>> Can you provide the "config.log" created by the "configure" script? It
>> >>> should contain *why* the java plugin was disabled.
>> >>>
>> >>> Regards,
>> >>> -octo
>> >>> --
>> >>> Florian octo Forster
>> >>> Hacker in training
>> >>> GnuPG: 0x91523C3D
>> >>> http://verplant.org/
>> >>
>> >
>>
>>
>> _______________________________________________
>> collectd mailing list
>> collectd at verplant.org
>> http://mailman.verplant.org/listinfo/collectd
>>
>
>
> _______________________________________________
> collectd mailing list
> collectd at verplant.org
> http://mailman.verplant.org/listinfo/collectd
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.verplant.org/pipermail/collectd/attachments/20100330/2ca6ca48/attachment.htm 


More information about the collectd mailing list