This is the mail archive of the mailing list for the Java project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cannot build libjava/gnu/gcj/xlib/

Per Bothner wrote:

> > 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.

RawData works, however actual cases where it is useful dont seem to be all that common. If its our code thats doing the allocating, it is easier to use
_Jv_AllocBytes and disguise the native data in an Object field. If we keep a pointer to something allocated with malloc, the GC will just ignore it anyway (but
it is nicer to use a RawData just to make it obvious that the field shouldn't be touched from Java code).

> > 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

Hmm. The only difference here is that I don't do a "make bootstrap".

In the top level, a "libstdcxx_flags" variable is set by cat'ing the contents of libstdc++.INC. This should then get passed down to libjava's
configure as part of the definition of CXX (I guess this is picked up from the config.cache?):

checking for c++... (cached) /home/bryce/cvs/gcc/build/gcc/g++ -B/home/bryce/cvs/gcc/build/gcc/ -nostdinc++ -nostdinc++
-I/home/bryce/cvs/gcc/libstdc++-v3/include -I/home/bryce/cvs/gcc/libstdc++-v3/include/std -I/home/bryce/cvs/gcc/libstdc++-v3/include/c_std
-I/home/bryce/cvs/gcc/build/i686-pc-linux-gnu/libstdc++-v3/include -I/home/bryce/cvs/gcc/libstdc++-v3/libsupc++
-I/home/bryce/cvs/gcc/build/i686-pc-linux-gnu/libstdc++-v3/libio -I/home/bryce/cvs/gcc/libstdc++-v3/libio -I/home/bryce/cvs/gcc/libstdc++-v3/libmath
-L/home/bryce/cvs/gcc/build/i686-pc-linux-gnu/libstdc++-v3/src -L/home/bryce/cvs/gcc/build/i686-pc-linux-gnu/libstdc++-v3/src/.libs
-B/home/bryce/gcc/i686-pc-linux-gnu/bin/ -B/home/bryce/gcc/i686-pc-linux-gnu/lib/ -isystem /home/bryce/gcc/i686-pc-linux-gnu/include
checking whether we are using GNU C++... (cached) yes

Can you figure out why this doesnt work for you?


  [ bryce ]

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]