cannot build libjava/gnu/gcj/xlib/natClip.cc

Per Bothner per@bothner.com
Sun Dec 31 17:27:00 GMT 2000


Bryce McKinlay <bryce@albatross.co.nz> writes:

> There's a general policy of not using STL/libstdc++ stuff in libjava, but libgcjx is an exception.

Hm.  I didn't know (remember) that.  I assume the reason is size of Java
application - i.e. avoiding willing in libstdc++ for a vanilla Java program.

> Perhaps we could look at changing it. Then again I'm not really sure what a good alternative is, obviously we cant keep native pointers in Java collections.

Not directly, however there is a mechanism for native pointers in
Java objects:  The gnu.gcj.RawData class.  The purpose of RawData
is that if you declare a Java field or other variable as being "RawData"
then it is a native pointer that should be ignored by Java memory
management.  I don't know if this convention actually is supported,
but that was the intent, and I think it's a useful and simple idea.

For example, if you have a RawData field, it can point to malloc'd
data.  In that case you would probably want a finalizer to be written
as a native method that calls free.

> I've heard reports of this problem but havn't been able to reproduce it. What is your exact configure line and build procedure?

/home/bothner/GNU/egcs/configure  --enable-threads=posix --prefix=/home/bothner/GNU/linux --enable-shared --enable-languages=c++,java --disable-new-gxx-abi
make bootstrap
make

(I also tried configure in a sub-directory of the source directory, as
suggested by the Gcj build instructions, but that failed too.)
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/


More information about the Java mailing list