[collectd] Help while crosscompiling, with java plugin
Daniel Hilst Selli
danielhilst at gmail.com
Wed Oct 30 18:16:06 CET 2013
On 10/29/2013 05:55 PM, Daniel Hilst Selli wrote:
> Hi, I'm having problems while trying to cross compile collectd with java
> plugin to ARM.
>
> The first one is the jdk. Since java plugin is linked to libjvm.so, I
> need an ARM libjvm.so, this is found on ejre from oracle, no problem so
> far.. The problem is that I need JAR, JAVAC etc.. and this ones come
> only from JDK, which I can't find for ARM,
>
> I do this dirty trick, do pass compilation, but I don't know if is safe..
> 1. Get the JDK for x86_64
> 2. Get the JRE for ARM
> 3. Remove all contents on JDK/jre/*
> 4. Copy contents from JRE to JDK/jre/
>
> This pass the configure stage..
>
> The second problem is this error message:
> cc1: warnings being treated as errors
> cc1: error: include location "/usr/include/gdk-pixbuf-2.0" is unsafe for
> cross-compilation
> cc1: error: include location "/usr/include/libpng16" is unsafe for
> cross-compilation
> cc1: error: include location "/usr/include/glib-2.0" is unsafe for
> cross-compilation
>
> I ran this configure line with this environments
> export TOOL_CHAIN=/opt/arm-2009q1
> export CROSS_COMPILE=arm-none-linux-gnueabi-
> export CC=${TOOL_CHAIN}/bin/${CROSS_COMPILE}gcc
> export CXX=${TOOL_CHAIN}/bin/${CROSS_COMPILE}g++
> export JAVA_HOME="/home/geckos/java6"
> export CFLAGS="--sysroot=${TOOL_CHAIN}/arm-none-linux-gnueabi/"
>
>
> ./configure --host=x86_64-unknown-linux-gnu --target=$CROSS_COMPILE
> --with-fp-layout=nothing --enable-java --enable-debug --disable-python
>
> Any idea?
>
> Thanks in advance, and best regards!
Yay it works,
I have to explode the arm JRE inside x86 JDK/jre/, and set JAVA_HOME
So I have this two directories
JAVA_HOME/jre/lib/amd64
JAVA_HOME/jre/lib/arm
Here is the line I used.
CC=/opt/arm-2009q1/bin/arm-none-linux-gnueabi-gcc
JAVA_HOME=/home/geckos/java6 ./configure --host=arm-none-linux-gnueabi
--with-fp-layout=nothing --enable-java --enable-debug --disable-python
--disable-notify_desktop --disable-perl
I'm using Sourcery CodeBench Lite Edition toolchain, if anyone cares..
Cheers!
More information about the collectd
mailing list