8000 improve java detection/defaults in configure script by mfournier · Pull Request #1014 · collectd/collectd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

improve java detection/defaults in configure script #1014

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 5, 2015

Conversation

mfournier
Copy link

This should make building the java plugin work out of the box at least on current linux distros.

Hopefully this sort of workarounds won't be necessary anymore:

/cc @rubenk as this fishes up one old patch of yours.

Ruben Kerkhof and others added 2 commits April 28, 2015 07:38
This makes the java plugin build out of the box
on systems with a JDK installed.
/usr/lib/jvm is the default location for the JDK
on at least Fedora, Red Hat and Debian.
When `--with-java` points to a symlink, `find` should resolve it, making
the configure script work seamlessly with symlinks pointing to JDK
installations.

This fixes the confusing discrepancy between `--with-java=/path/to/java`
failing and `--with-java=/path/to/java/` working.
@mfournier mfournier added the build An issue with the build label Apr 28, 2015
@rubenk
Copy link
Contributor
rubenk commented Apr 28, 2015

Great, thanks @mfournier.

Did you test if the java plugin works after this change? I got a report that it's broken, not sure if it's related: https://bugzilla.redhat.com/1212151

@mfournier
Copy link
Author

@rubenk I didn't try running collectd with this plugin loaded, but it doesn't look like this LD_LIBRARY_PATH problem appears in the test/build environment I use. Here's the output of ldd on el7 when built with this patchset:

collectd-5.4.2.786.g5a87b2c/src/.libs/java.so:
    linux-vdso.so.1 =>  (0x00007fffa9dcc000)
    libjvm.so => /usr/lib/jvm/java/jre-abrt/lib/amd64/server/libjvm.so (0x00007f5e395b5000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f5e393a4000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f5e38fe3000)
    libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f5e38cdc000)
    libm.so.6 => /lib64/libm.so.6 (0x00007f5e389d9000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f5e387bd000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f5e3a5f5000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f5e385a7000)

And the list of java-related packages installed on this platform:

java-1.7.0-openjdk-1.7.0.79-2.5.5.1.el7_1.x86_64
java-1.7.0-openjdk-devel-1.7.0.79-2.5.5.1.el7_1.x86_64
java-1.7.0-openjdk-headless-1.7.0.79-2.5.5.1.el7_1.x86_64
javapackages-tools-3.4.1-6.el7_0.noarch

@rubenk
Copy link
Contributor
rubenk commented Apr 28, 2015

Thanks for checking, that looks good. It might just be an issue in either Fedora or openjdk 1.8 then.

mfournier pushed a commit that referenced this pull request May 5, 2015
improve java detection/defaults in configure script
@mfournier mfournier merged commit 144a9ea into collectd:collectd-5.3 May 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build An issue with the build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0