gcj static crosscompiling raises issues with boehm-gc
Wed Oct 6 16:07:00 GMT 2010
On 10/06/2010 04:44 PM, Andreas Frisch wrote:
>> This looks completely broken: it seems to be trying to statically link
>> gainst libgcj. Try it without -non_shared.
> Hi Andrew, thanks for your prompt help!
> linking statically against libgcj is what i actually intend to do to save a
> lot of space on the embedded device with very limited capacity.
That is really hard to get working. It can be done, but you
should at least get dynamic linking working first.
> other than that, if i omit the -non_shared parameter, then it doesn't seem to
> find the aacskeys.so which is a run-time include of in one of the java files
> where it does a System.loadLibrary("aacskeys");
It'll be fibn as long as it's in the load path. You might be better
using a full path to the library.
> the resulting error message is the infamous
> linux/4.4.4/../../../../mipsel-oe-linux/bin/ld: warning: cannot find entry
> symbol __start; defaulting to 0000000000406960
Are you forgetting to compile with -jni ?
With gcj there are two options for writing native methods:
CNI and JNI. By default gcj assumes you are using CNI.
If you are compiling a class with native methods, and
these methods are implemented using JNI, then you must use
"-fjni". This option causes gcj to generate stubs which
will invoke the underlying JNI methods.
More information about the Java