Re: qt-peer thread issue

2008-11-08 Thread Tom Tromey
> "Donald" == Donald Gim <[EMAIL PROTECTED]> writes:

Donald> I'm working on porting "Jamvm+Classpath+Qt/Embedded.

Donald> Do I need any configuration on the Qt(4.4.3) or
Donald> Classpath(0.97.2) to avoid this message?

My impression is that the Qt peers are not completely robust.
AFAIK they have not been worked on in quite some time.
So, I would say that chances are good that you've run into a bug.

Tom



Re: trouble w/ synchronized close method in PushbackInputStream

2008-11-08 Thread Tom Tromey
> "Robert" == Robert Dodier <[EMAIL PROTECTED]> writes:

Robert> PushbackInputStream.close is synchronized. Apparently there is a
Robert> deadlock: if I cut out the "synchronized" keyword, the program runs
Robert> to completion. I am guessing that there is a thread sleeping in read()
Robert> or something like that; I didn't investigate further.

Could you file this in bugzilla?
That way at least it won't get lost.

Or, send a patch :-)

Tom



Re: Fwd: Missing ReleaseArrayElements

2008-10-17 Thread Tom Tromey
> "Robert" == Robert Lougher <[EMAIL PROTECTED]> writes:

Robert> Sorry to nag about this, but it would be good to get this applied.
Robert> Without it, the Swing Demo leaks like a sieve on JamVM :)

Funny -- by coincidence I was just prepping this when I got this
message :-)

I checked it in.

It is simpler if you send a ChangeLog entry as well.

Tom



[commit-cp] classpath ChangeLog native/jni/gtk-peer/gnu_jav...

2008-10-17 Thread Tom Tromey
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Tom Tromey  08/10/17 18:52:30

Modified files:
.  : ChangeLog 
native/jni/gtk-peer: gnu_java_awt_peer_gtk_CairoGraphics2D.c 

Log message:
2008-10-17  Robert Lougher  <[EMAIL PROTECTED]>

* native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c

(Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoDrawGlyphVector):
Release 'fonts'.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.9731&r2=1.9732
http://cvs.savannah.gnu.org/viewcvs/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c?cvsroot=classpath&r1=1.26&r2=1.27




[commit-cp] classpath ChangeLog tools/gnu/classpath/tools/j...

2008-10-16 Thread Tom Tromey
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Tom Tromey  08/10/16 17:20:24

Modified files:
.  : ChangeLog 
tools/gnu/classpath/tools/jar: Creator.java Indexer.java 
   WorkSet.java 

Log message:
* tools/gnu/classpath/tools/jar/WorkSet.java (initSet): Use
foreach.  Change argument type.
(WorkSet): Change argument type.
* tools/gnu/classpath/tools/jar/Indexer.java (indexJarFile): Use
foreach.
* tools/gnu/classpath/tools/jar/Creator.java
(writeCommandLineEntries): Use foreach.
(getAllEntries): Likewise.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.9730&r2=1.9731
http://cvs.savannah.gnu.org/viewcvs/classpath/tools/gnu/classpath/tools/jar/Creator.java?cvsroot=classpath&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/classpath/tools/gnu/classpath/tools/jar/Indexer.java?cvsroot=classpath&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/classpath/tools/gnu/classpath/tools/jar/WorkSet.java?cvsroot=classpath&r1=1.2&r2=1.3




Re: FW: Help a noob?

2008-08-13 Thread Tom Tromey
> "Twisti" == Christian Thalinger <[EMAIL PROTECTED]> writes:

Twisti> You don't need to write that one, the shipped one works.  I compile GNU
Twisti> Classpath and CACAO on IRIX for a long time:

Do you have a configure change that didn't make it upstream to Classpath?
Just curious :)

Tom



Re: FW: Help a noob?

2008-08-12 Thread Tom Tromey
> "Geoffrey" == Greene, Geoffrey N <[EMAIL PROTECTED]> writes:

>> But that's weird.  This is supposed to be a REPLACEMENT for java...why
>> would it need javac?  How can I get around the need for javac?  And
>> why is it needed anyway?

Basically, all the 1.5 compilers in existence are written in java.
So, you need a java runtime to run them.

A simple way to do a bootstrap on a new machine is to build the .class
files on a working machine, then copy them over.  An even simpler way
is to see if somebody already has them built and will make them
available for download :-)

Once you have the Classpath .class files, you can get a VM running.
Then you have enough to rebuild everything from scratch on the new
machine.

>> Also, I notice the "WARNING...in the code below: checking jni_md.h
>> support... configure: WARNING: no"

jni_md.h is built in a funny way.  Basically we look for a pre-made
one in $srcdir/include that matches the current CPU/OS combination.

So, to do a new port you would have to write this file.  This is not
hard, ordinarily.

Tom



Re: Savannah has Mercurial!

2008-06-06 Thread Tom Tromey
> "Andrew" == Andrew John Hughes <[EMAIL PROTECTED]> writes:

Andrew> For me the speed of diffs/status checks in CVS is appalling
Andrew> and has a significant impact on my work habits.

For diff I can't help you, but for status I recommend the cvs utils.
I've used these upwards of ten years, I can't really picture using cvs
without them.


FWIW, I'm ambivalent about changing Classpath's VC system.  We haven't
had many branches historically (do we have any now?), bypassing one of
cvs's big problems.  The diff thing is annoying, though I guess I'm
used to it.

One consideration is whether there is Eclipse support for the new
system.  Assuming, that is, that any active Classpath developers are
using Eclipse.

Tom



Re: Integer.parseInt("+42") gives -42

2008-05-12 Thread Tom Tromey
> "David" == David Daney <[EMAIL PROTECTED]> writes:

David> I am not an expert in this realm, but this may be small enough
David> so that an assignment is not necessary.

Yes, I agree, particularly because there is really only one fix for
this -- delete the '+' code.  Actually, the proposed patch doesn't
seem to go far enough in that direction... AFAICT a leading '+' is not
allowed at all; there's no reason to check for it specially.

Tom



Re: How to build Classpath without Classpath

2008-05-09 Thread Tom Tromey
> "Gustavo" == Gustavo Guillermo Perez <[EMAIL PROTECTED]> writes:

Gustavo> Hey I can do that, but what about rhe lib folder of gnu classpath
Gustavo> libraries are not binary compatible from glibc to uClibc

Yeah, the idea is to compile the class files only, then build the rest
on the new platform.

This may require build hackery.  And, it may require a bit of extra
hackery in the initial build, depending on what classes the desired VM
overrides, etc.

Anyway, whatever is required, it sounds simpler to me than the long
processes outlined upthread.  And, on the plus side, if the needed
Classpath build tweaks are done cleanly, we can check them in for
future users.

Tom



Re: How to build Classpath without Classpath

2008-05-09 Thread Tom Tromey
> "Gustavo" == Gustavo Guillermo Perez <[EMAIL PROTECTED]> writes:

>> ecj-binary -> gcj-4.3 ->  classpath 0.9x (x >= 5) -> cacao
>> 0.98+hg20071001 (or newer) ->  ecj(-bootstrap)

Gustavo> Yes very well, I having nightmares cause I can't have a
Gustavo> binary build of gcc 4.3 or 4.4 without errors on uClibc, I
Gustavo> guess cross compiling is a solution but gcc 4.2.X and gcc
Gustavo> 4.1.X works natively. Having java on embedded systems is more
Gustavo> painful than last year.

It seems to me that it should be possible to compile Classpath on
*any* machine with a working java environment, then copy the classes
around.

I haven't looked at the cacao or jamvm build systems in a while, but
supporting something like this would make it simpler to do ports.
For instance, we could just have a glibj.zip download somewhere --
bootstrap problem solved.

Tom



note on readdir_r

2008-02-20 Thread Tom Tromey
While looking into http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24170,
I noticed that Classpath is also using readdir_r.

There is no reason to use this.  Ulrich wrote a blog entry a while
back explaining why:

http://udrepper.livejournal.com/18555.html

I'm not planning to fix this in Classpath, sorry.  It should just be a
matter of deleting the readdir_r case and configure checks, though.

Tom



Re: Classpath Tools

2008-02-17 Thread Tom Tromey
> "Andrew" == Andrew John Hughes <[EMAIL PROTECTED]> writes:

Andrew> Does anyone know why our tools use -Xbootclasspath to load as in:
Andrew> exec @VM_BINARY@ -Xbootclasspath/p:"${tools_cp}"
Andrew> gnu.classpath.tools.javah.Main "$@"

Andrew> The option is not supported by either gcj or JikesRVM (although the
Andrew> latter also uses it to build).  Can we swap it for just plain
Andrew> -classpath?

It could just be historical.  It is hard to remember; I spent a little
time looking at cvs annotate and the mailing list archives, but I
didn't find anything.

BTW, gjavah.in is marked -kb, which is wrong.

Tom



[commit-cp] classpath ChangeLog java/util/LinkedHashSet.java

2007-08-15 Thread Tom Tromey
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Tom Tromey  07/08/15 16:29:10

Modified files:
.  : ChangeLog 
java/util  : LinkedHashSet.java 

Log message:
* java/util/LinkedHashSet.java (LinkedHashSet): Fix typo.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.9361&r2=1.9362
http://cvs.savannah.gnu.org/viewcvs/classpath/java/util/LinkedHashSet.java?cvsroot=classpath&r1=1.6&r2=1.7




[commit-cp] classpath/java/lang Class.java

2007-08-15 Thread Tom Tromey
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Tom Tromey  07/08/15 16:27:00

Modified files:
java/lang  : Class.java 

Log message:
* java/lang/Class.java (internalGetFields): Use LinkedHashSet.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/java/lang/Class.java?cvsroot=classpath&r1=1.52&r2=1.53




[commit-cp] classpath ChangeLog

2007-08-15 Thread Tom Tromey
CVSROOT:/cvsroot/classpath
Module name:classpath
Changes by: Tom Tromey  07/08/15 16:25:41

Modified files:
.  : ChangeLog 

Log message:
* java/lang/Class.java (internalGetFields): Use LinkedHashSet.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.9360&r2=1.9361




Re: J2SE compliant RE for Arm Linux

2007-06-28 Thread Tom Tromey
> "Søren" == Søren Boll Overgaard <[EMAIL PROTECTED]> writes:

Kinda old thread, but wanted to clear this up...

Søren> So far, none of the the platforms I've been looking at (except
Søren> PERC, which is prohibitively priced) support J2SE 5.0. Thus, my
Søren> question is, can you provide me with a pointer to a J2SE 5.0
Søren> JRE (GNU classpath based or otherwise) which will run on an ARM
Søren> Linux platform?

GCC svn supports 1.5 and, probably, runs on ARM.

Tom



Re: URLLoader / RemoteURLLoader

2007-06-01 Thread Tom Tromey
> "Martin" == Martin Schlienger <[EMAIL PROTECTED]> writes:

Martin> Well I am actually patching URLClassLoader. RemoteURLLoader
Martin> seemed to provide some connection to http protocol. When is it
Martin> exactly used?

The various Loader classes are used to handle particular URL types.
RemoteURLLoader is used for things other than file: and jar:.

Martin> Caused by: java.lang.NoClassDefFoundError: 
gnu/java/net/protocol/http/Headers

That class is part of Classpath.  Did you remove it as part of your
size reduction?  All the files in that package are needed for http: to
work.

Martin> Is this sci-fi to work inside URLClasseLoader to load classes
Martin> from http URL ?

Nope, it should be pretty easy.  Really you shouldn't have to modify
URLClassLoader at all.

Tom



Re: URLLoader / RemoteURLLoader

2007-05-29 Thread Tom Tromey
> "Martin" == Martin Schlienger <[EMAIL PROTECTED]> writes:

Martin> -I noticed that URLLoader and RemoteURLLoader are also
Martin> intended to load remote directories. May someone give me any
Martin> hint to use these one?

These are only for use as internal helpers of URLClassLoader.

Martin> The very best would be that we launch our software with jamvm
Martin> -classpath http: //url-to-my-classpath-classes/mypackage.jar

You may want to look at JNLP.

Martin> Another question: what is the gnu/java/net/loader/Load_ prefix
Martin> for? there is no class that begins with Load_ .

This is in cases a VM wants to add support for some URL type it
provides.  libgcj uses this to handle gcjlib: URLs.

Tom



Re: gcjwebplugin usefullness? 64 bit plugin?

2007-05-06 Thread Tom Tromey
> "Dâniel" == Dâniel Fraga <[EMAIL PROTECTED]> writes:

Dâniel> I tried very hard to use gcjwebplugin, but it will fail
Dâniel> loading the applet I'm interested (from my bank site).

Please file a bug report with the details, if you have them.
Try running appletviewer from the command line, perhaps you'll get a
nicer stack trace that way.

Dâniel> Ok. The applet from classpath homepage works perfecly, but if I
Dâniel> change to another site, Firefox crashes (segfault).

Details here would also be good.

Dâniel> The main problem today on 64 bit is the lack of plugin... So
Dâniel> someone could help? Or explain why we still doesn't have a 64 bit
Dâniel> plugin?

The JDK is not completely open yet -- the libraries have not been
released.  We expect this will happen soon (before the end of June,
last I heard).  And the web plugin may not appear in the next code
drop, either; we don't know yet.

Tom



Re: Classpath 0.95 build issue

2007-05-06 Thread Tom Tromey
> "Audrius" == Audrius Meskauskas <[EMAIL PROTECTED]> writes:

Audrius> This is becoming the permanent topic already. Maybe we could add 
Audrius> something to README or hackers guide?

Sounds good to me.  Dâniel, would you mind making a patch for this?
Perhaps a change to the FAQ is the best bet.

Tom



Re: Compilation Time | More questions ClassLoader

2007-05-04 Thread Tom Tromey
> "Martin" == Martin Schlienger <[EMAIL PROTECTED]> writes:

Martin> Current behavior acts like this, macro-algorithm:
[..]
Martin> Class loadClass(String className){
Martin> if (bootstrap) {
Martin> c= VMClassLoader.loadClass(className);

Martin> Basically all we have done is add a step at
Martin> bootstrap. Normally all classes to perform a
Martin> RemoteClassLoader.loadClass() can be loaded with the first
Martin> step VMClassLoader.loadClass(). In the end we want to have
Martin> only these classes in the local core API and the rest of the
Martin> API distant.

Yup.  I'd suggest that instead of thinking of the solution in terms of
writing a class loader, think about it in terms of writing some code
that simply returns a byte[] that is the class contents.

Then call this downloading code from VMClassLoader.loadClass.

How you implement the downloading is up to you, but it turns out to be
pretty simple to re-use URLClassLoader for this... just treat the
.class file at the URL as a resource, not a class, and don't use the
loadClass family of calls on your delegate URLClassLoader at all.

Martin> We have done some basic tests and this seemed to work. However, when
Martin> trying with a more complete program, it appears that it throws
Martin> IllegalAccessException making me think that some security is added
Martin> when using the defineClass() on core API.

For this sort of a thing more details are needed.  At least a full
stack trace.  But if you follow the above this may be moot.

Tom



Re: Compilation Time | More questions ClassLoader

2007-05-01 Thread Tom Tromey
> "Martin" == Martin Schlienger <[EMAIL PROTECTED]> writes:

Martin> - Is there any place where I can find something like a UML sequence
Martin> diagram of classloading mechanisms.

Nope, sorry.

Martin> It seems there is a lot of back and forth between
Martin> URLClassLoader, ClassLoader, VMClassLoader and all is a little
Martin> bit confusing.

Most of this is delegation.  ClassLoaders are arranged in a dynamic
hierarchy and each delegates loading to its parent before trying to
load itself.  This chain is rooted in VMClassLoader, which is not a
standard class but rather the way we've chosen to represent the
bootstrap loader inn Classpath .

Martin> - Any suggestion to make a class loaded by another loader to have the
Martin> same rights as the ones loaded with the bootstrap (
Martin> VMClassLoader.loadClass() ). Since we are loading some of the classes
Martin> from glibj.zip with another loader that can access a remote file, but
Martin> ATM we have some IllegalAccessException with some of these. Since we
Martin> use the default ClassLoader's defineClass(), we may have to hack this
Martin> one (no success ATM).

The VM* classes in Classpath are a bit funny.  They define an API but
they don't use inheritance for implementations -- instead a given VM
can replace one of the classes entirely and it is simply expected to
conform to the defined API.

So, you can change VMClassLoader to do whatever you like.  For
instance, in libgcj we delegate some operations to a URLClassLoader
that we construct after VM startup.

I'm not really sure what you mean about IllegalAccessException and the
default defineClass.  As I recall, ultimately all classes are defined
via a method on VMClassLoader.

Tom



Re: Compilation Time | More questions -Charsets

2007-04-25 Thread Tom Tromey
> "Martin" == Martin Schlienger <[EMAIL PROTECTED]> writes:

Martin> Actually since we saw that support for different charsets were
Martin> constantly added to GNU/Classpath, this may have been linked with
Martin> GNU/Classpath and not jamvm.
Martin> Indeed, gnu.java.nio.charset.Provider loads multiple default charsets.
Martin> We modify this one as well. It seems that UTF8 , 8859_1 and US_ASCII
Martin> are enough to boot. What makes a charset considered mandatory in
Martin> GNU/Classpath?

Oh, sorry, I thought you meant charsets being searched for at startup
or something like that.  But instead you seem to be talking about
registration of the NIO charsets... is that right?

There is no rule here as far as I know.  We just register all the
charsets we have.  Adding a charset is done either because it is
specified by the standard, or because someone needed it.

I suppose registration could be done more lazily somehow.  I haven't
looked into it.

Tom



Re: couldn't able to install classpath: java.lang.OutOfMemoryError

2007-04-24 Thread Tom Tromey
> ">" == r srinivasaraju <[EMAIL PROTECTED]> writes:

>> but when it comes to executing "gmake", its giving some error.

>> Internal compiler error
>> java.lang.OutOfMemoryError: Java heap space

There's not much we can do about this.
Maybe you don't have enough memory.
Maybe you need to increase the heap available to whatever JVM is
running ecj.  We don't know, sorry.

Tom



Re: Compilation Time | More questions -Charsets

2007-04-24 Thread Tom Tromey
> "Martin" == Martin Schlienger <[EMAIL PROTECTED]> writes:

Martin> Now we are investigating the charsets classes since for sure we don't
Martin> need them all on our minimal system. JamVM tries to load a bunch of
Martin> them when initializing and we would stick to one (8859 or UTF8 for
Martin> example). You may give us a hint again about how to make jamvm/gnu
Martin> classpath work with only one charset.

I don't know about jamvm in particular.  In most places, though,
something like 'file.encoding' chooses the encoding to use.  The
locale may also affect this.  So as a first attempt I would make sure
that these things are set properly.

Tom



Re: Compilation Time

2007-04-23 Thread Tom Tromey
> "Martin" == Martin Schlienger <[EMAIL PROTECTED]> writes:

Martin> Each time we change the ClassLoader.java class, compilation
Martin> lasts quite a long and I am not really convinced that
Martin> everything need to be recompiled. I am quite a beginner with
Martin> Makefile but it seems that no real check is done and
Martin> everything is compiled by default.

Martin> Maybe you can give me some tricks on that or tell me what method you
Martin> use when hacking Classpath.

IMNSHO, the best way to do incremental development on Classpath is to
use Eclipse.  It will only recompile the minimum necessary when you
make a change.  There a HOWTO for setting this up on the wiki -- it
isn't as trivial as we would like, but it is doable, and once you have
it set up you rarely have to tweak it.

Tom



Re: [cp-patches] Patch: FYI: hard-code SAX fallback

2007-04-05 Thread Tom Tromey
> "Jeroen" == Jeroen Frijters <[EMAIL PROTECTED]> writes:

>> I think for proper operation we have to remove the various XML service
>> files from META-INF; see the earlier thread.  But in order for this to
>> work we also have to fix SAX to properly fall back to the Classpath SAX
>> parser.

Jeroen> Any update on this? I'm convinced that we must remove the
Jeroen> META-INF/services files (at least for XML, but my guess is
Jeroen> that we should remove all of them).

I've been super busy with F7 work, but I will try to get to this soon-ish.
I'll at least remove all the XML-related ones.  The others probably
need a code audit first.

Tom



Re: Runtime.exec() race condition...

2007-03-28 Thread Tom Tromey
> "David" == David Daney <[EMAIL PROTECTED]> writes:

David> I just committed a patch to libgcj that fixes a race condition that
David> could allow file descriptors to leak to sub-processes:
David> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31228

David> I don't have the time to port the fix to the default classpath VM
David> implementation, but would encourage any interested classpath hackers
David> to do so.

Would you mind reporting this in bugzilla?
I looked and Classpath does suffer from this bug.

Tom



FYI: un dos-ify ChangeLog

2007-03-26 Thread Tom Tromey
Today I found out that ^M characters were added to the end of all the
lines of ChangeLog.  I undid this and added a local variable section
for the benefit of those using Emacs.

Tom



Re: Regressions from gcj 4.2 to 4.3 involving XML

2007-03-09 Thread Tom Tromey
>>>>> "Mario" == Mario Torre <[EMAIL PROTECTED]> writes:

Mario> Il giorno ven, 09/03/2007 alle 12.06 -0700, Tom Tromey ha scritto:
>> I think we ought to delete these service files from Classpath.

Mario> Yeah, but please, not every service file, unless really needed.

Mario> I have the java.util.prefs.PreferencesFactory there. The setting is set
Mario> at configure time (usually the GConf backend), but in case of errors the
Mario> fallback backend is always the FileBasedPreference one (that is, not
Mario> what we want usually, but a safe fallback indeed).

I was specifically only thinking about removing the various
XML-related service files.

That said, I think we should probably not use this approach to
configure Classpath itself, at least not for areas where the user
might need to be able to override the default.  In those situations,
maybe compiling in a default system property would be better.

Historically we might have used Configuration.java for this sort of
thing.  But this brings up another subject: I think we should get rid
of this class.  In libgcj we already had to make a fake one so we
could have system-independent .class files.  That seems like a nice
enough thing that Classpath should do it too.

Tom



Re: Regressions from gcj 4.2 to 4.3 involving XML

2007-03-09 Thread Tom Tromey
> "Andrew" == Andrew Haley <[EMAIL PROTECTED]> writes:

Andrew> I've been mystified why Xerces suddenly stopped working with this
Andrew> release of gcj.  I think I've found the root cause that triggered
Andrew> this.

Thanks for tracking this down.

Andrew> Now, the handling of "core" URLs is fixed, so we do find
Andrew> "/META-INF/services/javax.xml.parsers.DocumentBuilderFactory" in
Andrew> libgcj, which is incompatible with Xerces.

I think we ought to delete these service files from Classpath.

It seems to me that, due to class loader delegation, we will always
pick up any service file that is built in to glibj.zip.  But, this
isn't what we want.  And, since we have fallbacks hard-coded into the
factory classes, we don't actually need these service files anyway.

Comments?

Tom



Re: plugin for mozilla/firefox

2007-03-05 Thread Tom Tromey
> "Dima" == Dima Sorkin <[EMAIL PROTECTED]> writes:

Dima> On a system with classpath installed, is there is a web browser plugin ?

It depends on the VM.  gij in particular doesn't use the system
Classpath, it has its own copy.  So, it would depend on how gij was
configured and built.

Tom



Re: Non-POSIX port

2007-03-03 Thread Tom Tromey
> "Chris" == Chris Cole <[EMAIL PROTECTED]> writes:

Chris> I have the first cut of a port to an exotic platform (non-POSIX).

Cool.

Chris> I'd like to investigate the possibility of getting my changes
Chris> adopted into the project.  What's the best way to start that
Chris> process?

First thing is to get started on copyright assignment paperwork.
Mark should probably do this but if he can't I will send you the form.

Next is to start looking at how to merge it in.  It may be a little
difficult since Classpath doesn't yet have native code for a non-POSIX
port (afaik).  I'm sure we can figure out something sensible though.

Maybe you could describe your port a bit more.  What files did you
add, where did you put them, do you use configure, etc.

A non-POSIX port may also need some .java changes.  ISTR a place or
two where we have POSIX-y assumptions, like File or .so name mapping
or something.

Tom



builder cvs note

2007-02-13 Thread Tom Tromey
I noticed that the nightly scripts on builder.classpath.org still
weren't using the CVS repository.  I checked in all the little diffs
that had accumulated in ~cpdev/Nightly/scripts, and then changed that
directory to be a (pserver) checkout from the CVS repository.

I've also set up the builder to run Mauve on gij (the whole reason I
ended up looking at this in the first place :).  This means test
cycles may take a little longer now.

Please make sure to check in all script changes, and please try not to
have any local divergences in cpdev's script directory.  This makes it
simpler to make changes.

Thanks,
Tom



Re: [Jamvm-general] Compiling Jamvm 1.4.5 - errors

2007-02-12 Thread Tom Tromey
> "Twisti" == Christian Thalinger <[EMAIL PROTECTED]> writes:

>> http://www.nabble.com/-cp-patches--RFC%3A-fix-annotation-inheritance-tf2471335.html#a6890685

Twisti> It would be nice to have this finally commited.  IIRC, this was one
Twisti> reason I stopped implementing annotations.

Sorry for the delay on this.  I forgot all about it.
I will check in the patch shortly.

Note that the Class part of the patch already went in at some point.

Tom



Re: GJDoc

2007-01-29 Thread Tom Tromey
> "Andrew" == Andrew John Hughes <[EMAIL PROTECTED]> writes:

>> Another plan, call it (d), is to wait until Sun GPLs their javadoc.

Andrew> Is this on the cards?

I'm pretty sure it will happen on the schedule (though it was somewhat
more vague than a "schedule" :-) that Sun published.  My recollection
is, sometime this spring.

Tom



Re: GJDoc

2007-01-28 Thread Tom Tromey
> "Andrew" == Andrew John Hughes <[EMAIL PROTECTED]> writes:

Andrew> Do we have a plan for this?

Nope.

Andrew> c) move to an alternative solution.

Andrew> Comments?

For Fedora 7 I believe Tom Fitzsimmons is looking at sinjdoc.

http://www.cag.lcs.mit.edu/~cananian/Projects/GJ/

Unfortunately gjdoc sort of dropped off the bottom of our priority
list when looking at 1.5 :-(


Another plan, call it (d), is to wait until Sun GPLs their javadoc.

Tom



Re: Using Classpath on the Sun VM

2007-01-26 Thread Tom Tromey
> "Blake" == Blake Meike <[EMAIL PROTECTED]> writes:

Blake> The follow-on, of course, is "is there a cookbook/suggested-toolset
Blake> for porting apps?"  Is there someone with experience doing this, who
Blake> could share hints.  (... do I have the wrong list?)

There's some info on the wiki about common application problems,
mostly involving use of 'sun.*' APIs.

Usually I bring up a new application in the most obvious way: try it
and then debug what doesn't work :-)

Blake> Why is rt.jar/glibj.zip a single library?

I'm not sure if there's a particular reason.  Probably a combination
of history, ease of setting up the build, ease of not having to figure
out a sensible way to divide it, plus compatibility with (perhaps some
old version of :) the JDK.

Blake> Would it not make integration easier if it were divided into
Blake> the Classpath jar/zip, and a Kaffe glue jar/zip?  Jes askin'...

Perhaps one of the Kaffe maintainers can reply.

Tom



Re: Using Classpath on the Sun VM

2007-01-25 Thread Tom Tromey
> "Blake" == Blake Meike <[EMAIL PROTECTED]> writes:

Blake> I have a largish application that runs well under the Sun JRE.  I'm
Blake> interested in porting it to Kaffe/Classpath.  My first attempts have
Blake> failed in some surprising ways, and I'm anticipating an extended
Blake> struggle ;)

:)

Blake> I would like to know if anyone has tried using the Classpath class
Blake> libraries on the Sun JVM.

Not that I know of.

Blake> Error occurred during initialization of VM
Blake> java/lang/NoClassDefFoundError: java/lang/ref/FinalReference

Offhand I would guess that this is a Sun-specific internal class that
the VM wants.  Since Classpath doesn't provide it you either have to
modify the VM, or figure out what this class does and add it to
Classpath.

I'd imagine this is just the first of many such cases...

Tom



Re: [PATCH] MD4/MD5 fixes

2007-01-07 Thread Tom Tromey
> "Andrew" == Andrew Haley <[EMAIL PROTECTED]> writes:

>> Perhaps we should replace these uses with Integer.rotateLeft, for
>> clarity.

Andrew> In MD5?  No! Please!

Andrew> At least, not until this stuff gets inlined everywhere...

Yeah.  I thought about this more after I wrote the note.

I think we should treat this idiom like "f != f" as a NaN test --
something that Classpath developers have to know or learn.

At least for gcj inlining Integer methods is a pain for various
reasons.  Ideally we would fix this as well, though (at least for C++
ABI code).

Tom



Re: [PATCH] MD4/MD5 fixes

2007-01-06 Thread Tom Tromey
> "David" == David Daney <[EMAIL PROTECTED]> writes:

>> -aa = aa << 3 | aa >>> -3;
>> +aa = aa << 3 | aa >>> (32 - 3);
>> 
David> Java masks all shift counts to the number of bits being operated on.
David> Your patches are a nop.

David> I have not tried them, so I don't know if they quiet the warnings
David> emitted by ecj.  But if they do, it *might* be worthwhile applying
David> them on those grounds.

Historically we've heard about jikes warning for this code.  But, the
code is perfectly valid, and IMO:

(foo << N) | (foo >>> -N)

... makes a nice "bit rotation" idiom.

Perhaps we should replace these uses with Integer.rotateLeft, for
clarity.

Tom



Re: Can javax/swing/text/html/default.css be moved to resources/javax/swing/text/html/default.css?

2007-01-04 Thread Tom Tromey
> "Jeroen" == Jeroen Frijters <[EMAIL PROTECTED]> writes:

Jeroen> Subject says it all. Can someone who understands the Classpath build
Jeroen> infrastructure please have a look at this?

It can be done with only a minor change to lib/Makefile.am.
I can't get to it very soon though.

I wonder whether we ought to move the various png files as well.

Tom



Re: Mauve vs 1.5

2006-12-25 Thread Tom Tromey
> "Mark" == Mark Wielaard <[EMAIL PROTECTED]> writes:

[ CharArrayWriter and Appendable ]
Mark> Now this is of course easily fixed by using -1.5 so the compiler knows
Mark> about covariant return types and makes all these tests that define
Mark> classes that extend some Writer class compile again.

Yes, let's do that...

Mark> But now we have another problem. Shown by anything that has implements a
Mark> retrofitted Comparable interface like Integer:

Mark> 1. ERROR in gnu/testlet/java/lang/Integer/compareTo.java  line 98:
Mark> harness.check(zero.compareTo(o) == 0);
Mark>^
Mark>   The method compareTo(Integer) in the type Integer is not applicable for 
the arguments (Object)

In this code, 'o' is just 'zero' cast to an Object.

You could just change it to use compareTo(zero), but that doesn't test
the same thing...

You could change it to:

harness.check(((Comparable) zero).compareTo(o) == 0);

This will check using the raw Comparable and preserve the meaning of
the test, more or less.

Tom



Re: [cp-patches] FYI: Add Enum.finalize()

2006-12-21 Thread Tom Tromey
> "Twisti" == Christian Thalinger <[EMAIL PROTECTED]> writes:

Twisti> 87% precent of the heap allocations with a finalizer have an empty
Twisti> finalizer.  The class responsible for this is java/util/zip/Inflater.

I think we can simply delete Inflater.finalize.

Tom



Re: Minimizing glibj.zip size

2006-12-18 Thread Tom Tromey
> "Trevor" == Trevor Harmon <[EMAIL PROTECTED]> writes:

Trevor> It would be nicer if there were a configuration program in classpath,
Trevor> like what the Linux kernel and BusyBox have, that lets you fine-tune
Trevor> the components to include in the build.

Yeah... it has been discussed many times on the list.  There are some
difficult constraints for a solution which could be checked in, and I
think this has probably prevented anybody from implementing it.

For gcj there is micro-libgcj: http://ulibgcj.sourceforge.net/
... but this is more of an ad hoc reduction, not a general tool.

Tom



Re: Minimizing glibj.zip size

2006-12-15 Thread Tom Tromey
> "Paul" == Paul Jenner <[EMAIL PROTECTED]> writes:

Paul> What about lib/standard.omit?

Paul> It would have to manually edited and the dependencies sorted out by the
Paul> person building but I thought it should work.

Yeah, you can add things to standard.omit; sorry I didn't mention
this.

However this file only controls what files are passed to javac on the
command line -- typical java compilers will also read (and generate
code for) whatever other classes might be needed.  So, this method may
pull in more code than you would like.

Tom



Re: Minimizing glibj.zip size

2006-12-15 Thread Tom Tromey
> "Trevor" == Trevor Harmon <[EMAIL PROTECTED]> writes:

Trevor> Is there some way of configuring classpath so that it
Trevor> doesn't build and install these non-essential packages?

No, there's not a standard built-in way.

Trevor> Currently I'm working around the problem by manually deleting
Trevor> files using "zip - d ..." and was hoping for a better way.

That sounds reasonable enough.  There's also tools for trimming class
files & jars for embedded deployment, though I don't know whether any
are free software.

Tom



Re: GNU Classpath 0.93 "Dreamland" released

2006-12-15 Thread Tom Tromey
> "Dâniel" == Dâniel Fraga <[EMAIL PROTECTED]> writes:

Dâniel> directory does not exist: 
../vm/reference:..:../external/w3c_dom:../external/sax:../external/relaxngDatatype:../external/jsr166:.::

Dâniel> Strange, because all the above directories exists.

Yes, that is odd.  You aren't on Windows, are you?  That could explain
why ecj would treat the above as a single directory and not a list of
directories.

Tom



Re: GNU Classpath 0.93 "Dreamland" released

2006-12-14 Thread Tom Tromey
> "Dâniel" == Dâniel Fraga <[EMAIL PROTECTED]> writes:

Dâniel> Thanks. But can i use gcjx? I use Linux from scratch, so I have
Dâniel> to install separately. Which is better? ecj or gcjx? Thank you.

Use ecj.  The gcjx project has been cancelled.

Tom



RFC: cvs rm'ing some ancient files

2006-12-13 Thread Tom Tromey
While doing a recent classpath->libgcj merge, I found a number of
things in Classpath CVS which are very old and, AFAICT, unused.  I'm
going to remove them.  Please speak up if you need any of this.  I'll
defer the deletions a couple days to give you a chance to respond...

* test
* testsuite
  Both unused and obsoleted by mauve anyhow

* compat
  Unused, ancient

* native/testsuite
  Old guile stuff?

* native/vmi
  Old native code glue stuff

Tom



Re: Generics Merge Done, NOW please go nuts!

2006-12-12 Thread Tom Tromey
> "Andrew" == Andrew John Hughes <[EMAIL PROTECTED]> writes:

Andrew> HEAD is now generics ready.  Please test and let me know
Andrew> about anything that broke ASAP.  We're open for business again,
Andrew> so, as Mark says, 'please go nuts!'

Thanks for doing these merges, and for all your work keeping the
generics branch up-to-date these past two years.  I believe when I
started I had the naive idea that we wouldn't need to update the
branch... and now I'm especially happy you stepped in to handle this
:-)


For Classpath hackers in general: on the generics branch we stuck to a
"shallow" genericization, limited more or less to what Japi would see.
I think it would be appropriate now to start on deeper work, i.e.,
moving the use of generics into the bodies of methods and not just on
method signatures.

Tom



Re: Please go nuts! -- Time For Generics

2006-12-08 Thread Tom Tromey
Andrew> So here's my first bash at a plan for the generics merge.  Suggestions,
Andrew> wild screams of despair, etc. much welcomed.

Andrew> I'd like to have Sunday (or at least most of the day) as a no commit
Andrew> day.  It's usually fairly quiet anyway.  During that time, I'll:

Your plan sounds good to me.

Andrew> a) tag the trunk and create a branch for maintaining 1.4-level stuff

Is someone planning to continue work on that?
If not a tag is sufficient; we can always branch later.

Tom



Re: ASM and gnu.bytecode

2006-12-01 Thread Tom Tromey
Mark> We must make sure to properly document the way someone can grab
Mark> the upstream sources in case we want to pull in bug fixes later.

Tom> I'll handle this as part of the import.

I've got the import working here.  I'm going to wait for 0.93 to
branch before committing it.  Meanwhile, if someone wants it, I can
mail the patch and the new sources.

The patch also fixes a buglet I noticed -- we put the tool resources
into glibj.zip, but not tools.zip.  I think it makes sense to put them
in the latter as well; it makes tools.zip more self-contained.

Tom



Re: Migration to generics opens up exciting optimization opportunities from annotations

2006-11-30 Thread Tom Tromey
> "Ian" == Ian Rogers <[EMAIL PROTECTED]> writes:

Ian> I'm interested in adding these optimization to the Jikes RVM, but
Ian> clearly the annotations need adding to Classpath. I was wondering what
Ian> kind of response this would get?

I think it would be fine.  My only concerns are the usual boring
maintenance ones -- clear documentation for the annotations, how
classpath hackers can avoid breaking things (without "too much"
overhead), etc.

Tom



Re: ASM and gnu.bytecode

2006-11-29 Thread Tom Tromey
> "Mark" == Mark Wielaard <[EMAIL PROTECTED]> writes:

Mark> Thanks. I cannot find that as a source download. But it seems they have
Mark> at least tagged their CVS with ASM_2_2_3 so we could pull the code from
Mark> there.

Updating to the latest release would also be an option for us.
Moving our code from using 2.2.3 to using 3.0 or whatever probably
would not be overly hard.

Mark> We must make sure to properly document the way someone can grab
Mark> the upstream sources in case we want to pull in bug fixes later.

I'll handle this as part of the import.

Tom



Re: ASM and gnu.bytecode

2006-11-28 Thread Tom Tromey
Mark asked me to send some more info about this:

Tom> Ideally we could just import the ASM sources.  I thought this idea was
Tom> rejected, but I can't find a link.  I'd like to revisit this, since
Tom> this is the simplest way to solve the problem.

The code is available from asm.objectweb.org.

The license is here:

http://asm.objectweb.org/license.html

I would import whatever version currently works.  Later we could
import newer versions, as desired, and update our code to match.

I'd import the code into classpath/tools/external (a new directory
created for this purpose) and update the build scripts to match.

I wouldn't rename the classes or anything like that.  I would just
import them using their upstream names.  This is ok, I think, because
the resulting classes would only end up in tools.zip -- not in
glibj.zip.  Users setting CLASSPATH could still have problems, but
this doesn't seem like a major issue.

Tom



Re: ASM and gnu.bytecode

2006-11-28 Thread Tom Tromey
> "Andrew" == Andrew Haley <[EMAIL PROTECTED]> writes:

Andrew> Having gcj depend not only on ASM but also on a *specific version* of
Andrew> ASM is intolerable.  If gnu.bytecode will do the job, we should use
Andrew> it.

I suppose it would be best to import some bytecode library source into
Classpath's tools subdirectory.  Then we'd be insulated from upstream
changes.  Yay static linking!

Ideally we could just import the ASM sources.  I thought this idea was
rejected, but I can't find a link.  I'd like to revisit this, since
this is the simplest way to solve the problem.

It would also be easy to just put the right asm.jar on an ftp site
somewhere, and have a script to download it.  I already checked in a
similar script (to gcc svn) to make it easy for GCC developers to get
ecj.

Failing that we can import GNU Bytecode and switch to that.  FWIW the
only reason this is my last choice is the amount of work involved.

Tom



Re: building 0.93 on Mac OS X 10.3.9

2006-11-28 Thread Tom Tromey
> "jb" == Jean-Baptiste Nivoit <[EMAIL PROTECTED]> writes:

jb> i thought i'd share my experiences building classpath 0.93 on a mac.

Thanks!

jb> [...]
jb> hope this helps & this is the proper list to report this.

I'd suggest either filing a bug report in the Classpath bugzilla, or
submitting a patch :-)

Tom



Re: SystemProperties secure?

2006-11-27 Thread Tom Tromey
> "Roman" == Roman Kennke <[EMAIL PROTECTED]> writes:

Roman> We are using the SystemProperties class throughout the Classpath code to
Roman> access system properties and avoid the security checks in
Roman> java.lang.System. However, I come to think that this is no good the way
Roman> it is. This class is public and nothing prevents use of this class from
Roman> application code.

As I recall things in gnu.classpath should not be available to
application code.  The system class loader, or something, has to
enforce this.

I'm having some trouble with the details but I know Jeroen knows the
details here...

Tom



Re: issue with DatagramSocket

2006-10-20 Thread Tom Tromey
> "Yohann" == Yohann Martineau <[EMAIL PROTECTED]> writes:

Yohann> I have a problem with a DatagramPacket which receives incorrect
Yohann> bytes. I made a capture with ethereal to see what is actually sent
Yohann> over the network and I see a difference between what is captured with
Yohann> ethereal and what is displayed with the following code:

Could you send a self-contained test case?  And indicate what
platform, VM, and version of Classpath you are using?
That might help.

Tom



Re: Signals, sockets and threads

2006-10-20 Thread Tom Tromey
> "Guilhem" == Guilhem Lavaux <[EMAIL PROTECTED]> writes:

Guilhem> 1) POSIX syscalls where originally written with no threads in
Guilhem> mind.  glibc uses a trick to store errno in a thread local
Guilhem> storage using a special function. So the expected behaviour
Guilhem> of storing errno just after the accept is true only in this
Guilhem> case. If you use other type of threaded system then it may
Guilhem> not be right (or for example if the library is buggy).

Do these systems exist?

I was under the impression that this errno behavior was required by
the posix threads spec.  But I admit I don't have a definitive URL :-)

Tom



Re: Signals, sockets and threads

2006-10-20 Thread Tom Tromey
> "Twisti" == Christian Thalinger <[EMAIL PROTECTED]> writes:

Twisti> Right.  Robert told me that too, but why not using SIGHUP now
Twisti> everywhere?

Back then I think I thought that SIGUSR2 would be a better default
choice.  I don't think I had very good reasons for this though.

Tom



Re: gkeytool error

2006-10-19 Thread Tom Tromey
> ">" == Haoyang Lin <[EMAIL PROTECTED]> writes:

>> I checked the tools.zip. It contains no
>> gnu/classpath/tools/keytool/Main. There is Main.java in
>> /classpath-0.92/tools/gnu/classpath/tools/keytool/. What should I
>> change to make gkeytoll working well?

It is hard to say since we don't know much about how you built or
installed.  I would suggest starting at the beginning; make sure you
built Classpath in the way that your VM expects, make sure you ran
'make install', etc.

Tom



Re: Signals, sockets and threads

2006-10-19 Thread Tom Tromey
> "Twisti" == Christian Thalinger <[EMAIL PROTECTED]> writes:

Twisti> I've implemented Robert's suggestion today and it seems to work (at
Twisti> least on linux).  I used SIGHUP for now.  Why does GCJ use SIGUSR2 on
Twisti> non-linux and freebsd OSes?  Any good reason for that?

Here's the code.  Looks like we originally wanted SIGUSR2 everywhere
but were working around a LinuxThreads bug.

// The signal to use when interrupting a thread.
#if defined(LINUX_THREADS) || defined(FREEBSD_THREADS)
  // LinuxThreads (prior to glibc 2.1) usurps both SIGUSR1 and SIGUSR2.
  // GC on FreeBSD uses both SIGUSR1 and SIGUSR2.
#  define INTR SIGHUP
#else /* LINUX_THREADS */
#  define INTR SIGUSR2
#endif /* LINUX_THREADS */

Tom



Re: gkeytool error

2006-10-18 Thread Tom Tromey
> ">" == Haoyang Lin <[EMAIL PROTECTED]> writes:

>> I did : gkeytool

>> errors:
>>  java.lang.NoClassDefFoundError: gnu/classpath/tools/keytool/Main
>> <>

>> glibj.zip and tools.zip exist in /usr/local/classpath/share/classpath/ 
>>  What should I do? Please help.

First thing is, check tools.zip to see if that class is actually
contained in it.  Perhaps you have an out of date install or the like.

Tom



Re: Jboss/Java1.5 on HPPA in linux

2006-10-14 Thread Tom Tromey
> "Trevor" == Trevor Glen <[EMAIL PROTECTED]> writes:

Trevor> Has anyone had any luck with a 1.5 vm and/or classpath on a
Trevor> hppa linux box?

What VM are you using?
My impression is that hppa is probably the least support architecture
out there...

Beyond that, we've had success running jonas on gcj and other VMs.
We're working on jboss right now.  So, if it can't be done today, it
will probably be doable soon... at least on the more supported
platforms.

Tom



Re: file locking problem in Java_gnu_java_nio_VMChannel_lock

2006-10-11 Thread Tom Tromey
> "Edwin" == Edwin Steiner <[EMAIL PROTECTED]> writes:

Edwin> The attached patch fixes this case. It is still
Edwin> not safe for len > signed 32 bit.

Looks ok to me, I'm going to check it in.

I wrote a ChangeLog entry for you -- but please, next time, send one
with a patch.  Thanks!

Tom



Re: VMPlainDatagramSocketImpl still needed?

2006-10-07 Thread Tom Tromey
> "Robert" == Robert Schuster <[EMAIL PROTECTED]> writes:

Robert> Casey said that he found
Robert> gnu.java.nio.VMPlainDatagramSocketImpl to be obsolete.  I
Robert> quick glance at gnu.java.nio.PlainDatagramSocketImpl revealed
Robert> that it does not use this class any more.

In general I think if a VM class is no longer used from the main body
of Classpath, it is obsolete and should be removed.

Tom



Re: float printing in Formatter

2006-10-07 Thread Tom Tromey
> "Twisti" == Christian Thalinger <[EMAIL PROTECTED]> writes:

Twisti> A few days back I tried to implement float printing in
Twisti> Formatter.  When looking at the existing int/long code, I saw
Twisti> that toString() functions are used to print the value to a
Twisti> buffer.  That seems to be ok for such values, but handling
Twisti> floats like this won't work, I guess.  So the question is,
Twisti> should we stick to our native float-printing implementation
Twisti> (dtoa) or would it be better to have something, more flexible,
Twisti> in Java?

I suspect Formatter will need its own FP-formatting code.

Tom



Re: Request for enlighment (newbie struggling with classpath and gij)

2006-10-02 Thread Tom Tromey
> "Zoltan" == Bartko, Zoltan <[EMAIL PROTECTED]> writes:

Zoltan> I read somewhere on gcc's list Classpath 0.92 was integrated with the
Zoltan> newest gcc snapshots, so I downloaded gcc-4.2-20060930, compiled and
Zoltan> installed it.

Ok.

Zoltan> I executed gij -jar OmegaT.jar in the command line. gij
Zoltan> complained: Cannot load AWT toolkit:
Zoltan> gnu.java.awt.peer.gtk.GtkToolkit.

You probably did not configure gcc correctly.
At a guess you did not pass '--enable-java-awt=gtk'.

Tom



Re: native methods in inner classes (long)

2006-09-20 Thread Tom Tromey
> "Jeroen" == Jeroen Frijters <[EMAIL PROTECTED]> writes:

>> JNIEXPORT void JNICALL Java_OC_IC_natInit

Jeroen> This looks like a bug in javah. [1] claims they fixed it.

Thanks for finding this.
I was worried that I'd have to change everything to check the
InnerClasses attribute before doing JNI name mangling... would've been
gross.

Tom



Re: Debian dependencies for Classpath package

2006-09-12 Thread Tom Tromey
Chris> I'm especially surprised about the mysql dependency. Is all this really
Chris> necessary?

Not really; it depends on what kind of classpath you want to build.
This looks like the setup for a maximal classpath with all the peers
and stuff... though I don't see 'file' in there (needed for libmagic).

Tom



Re: A question @Mark Wilaard (and other developer)

2006-09-07 Thread Tom Tromey
>>> I think three different OpenSource implementations would be the
>>> worst case scenario, if Sun makes its Java OpenSource.

FWIW, I tend to agree overall.  Our experience merging libgcj with
classpath was that the merge improved both -- sometimes the libgcj
code was better, sometimes the classpath code was better.

Parts of the class libraries are platform dependent or worth replacing
depending on the VM or can have different implementations with
different properties.  But, most of the libraries are not like this.

In these cases I think the most desirable result is a single
implementation.

And, there's nothing forcing an all-or-nothing approach; we can do as
much or as little makes sense.

That said, the details matter; cf the harmony situation.

If Sun's terms are acceptable I would consider petitioning the FSF to
let us freely merge code back and forth.  Whether this will be the
case, and whether Sun would be interested in the kind of disruption
that this might entail, remains to be seen.

Tom



Re: possible problem with gcjh (long)

2006-09-07 Thread Tom Tromey
> "Raif" == Raif S Naffah <[EMAIL PROTECTED]> writes:

Raif> i'm attaching an OC$.java source and the generated header using
Raif> gcjh.  same behaviour --the dollar symbol is replaced by its
Raif> unicode codepoint.

Could you send the header file that the JDK's javah creates for this
class?  I'm curious about that.

Tom



Re: possible problem with gcjh (long)

2006-09-06 Thread Tom Tromey
> "Raif" == Raif S Naffah <[EMAIL PROTECTED]> writes:

Raif> $ gcjh -jni -classpath . -o OC_IC.h OC$IC

gcjh is probably just seeing 'OC' here, unless you actually quoted the
'$' on the command line.  This explains why the gcjh-generated OC_IC.h
is mostly empty -- the class OC has no native methods.

Try OC\$IC and you will get a different result.

Raif> $ /opt/jdk1.5.0_08/bin/javah -jni -classpath . -o OC_IC.h OC$IC

I'd guess that javah is also reading inner classes... gcjh will
probably never do this, I'm afraid, but we should probably modify the
javah in Classpath to be compatible here.  That shouldn't be hard.
Could you file a PR?

I don't have the JDK installed here so I didn't try to reproduce
this...

Raif> JNIEXPORT void JNICALL Java_OC_IC_natInit

Hmm, gcjh generates Java_OC_00024IC_natInit.
I'm surprised by the above, I (obviously I suppose :) would have
picked the gcjh interpretation instead.

Perhaps some experimentation is in order... what happens if you have a
class with an explicit '$' in its name that has a native method?

Tom



Re: Bootstrapping GNU Classpath on Fedora Core 5

2006-09-02 Thread Tom Tromey
> "Paul" == Paul Jenner <[EMAIL PROTECTED]> writes:

Paul> IMHO the INSTALL file in the distribution should contain enough detail
Paul> on requirements for people to be able to build. I'll take a look at
Paul> updating that if necessary and maybe compare notes with you offline
Paul> Alexander?

Yeah, that would be handy.  Updating it for all the distros when
things change may be a bit painful, but it is worth trying.

Paul> If mozilla devel dependency is not available on the system, I think it
Paul> should be picked up at configure time and either error or disable plugin
Paul> then, not have configure step succeed but compile fail later.

I like configure arguments in situations like this to be 3-state: if
nothing is specified, default to what is on the system, but if the
feature is explicitly requested, error out during configure if the
dependencies are not available.

This lets us maintain "best effort" -- handy for builds in eclipse,
for instance -- but also lets power users request a specific set of
features and get a real failure if the request can't be satisfied.

Tom



Re: Bootstrapping GNU Classpath on Fedora Core 5

2006-09-01 Thread Tom Tromey
> "Alexander" == Alexander Shopov <[EMAIL PROTECTED]> writes:

Alexander> Is there a small tutorial on how to bootstrap GNU classpath
Alexander> on Fedora Core 5?

Not exactly, I'm afraid.  In particular I don't think we document what
devel packages you need.  For general info there is the INSTALL file,
and some stuff on the wiki.

http://developer.classpath.org/mediation/ClasspathFirstSteps

Mostly it is a matter of figuring out what devel packages you need.
Once you've got those you should be in good shape.  Currently I'm
using an ordinary FC5 install on my main development machine, and I do
builds every day, so I'm confident it can be done :-)

Alexander> 4. ./configure --prefix=/home/ash/GNUCP --with-jikes 
--disable-gtk-peer

IMO better to use ecj instead of jikes.

Alexander> Another thing - which package provides the dependencies for
Alexander> gtk-peer?

gtk2-devel

Alexander> gcjwebplugin.cc:47:19: error: npapi.h: No such file or directory

yum install mozilla-devel

Tom



Re: [cp-patches] RFC: merge ssl-nio-branch into generics-branch

2006-08-12 Thread Tom Tromey
> "Casey" == Casey Marshall <[EMAIL PROTECTED]> writes:

Casey> The ssl-nio work is complete enough to the point where it can be merged
Casey> into the generics branch. Now that 0.92 has been released, this is a
Casey> good time to do that merge. I've accomplished three of the four goals I
Casey> set out on this project, which were [1]:

Congratulations!

Casey> Unless there are any issues with this, I'll try to commit the patch this
Casey> weekend.

Sounds good to me.

Tom



Re: glibj-generics-latest.zip corrupt?

2006-08-11 Thread Tom Tromey
> "Stuart" == Stuart Ballard <[EMAIL PROTECTED]> writes:

Stuart> [EMAIL PROTECTED]:~/defunct/japigenerics$ wget
Stuart> http://builder.classpath.org/dist/glibj-generics-latest.zip

I downloaded this an ran 'unzip' on it, and it worked fine.
I also looked at the file on builder, and it is ok there too.

Tom



Re: Running JOnAS 4.7.4 that uses 1.5 features

2006-08-09 Thread Tom Tromey
> "Gary" == Gary Benson <[EMAIL PROTECTED]> writes:

Gary> I wonder if this is what was not happening in gcj.  The patch I wrote
Gary> basically added the contents of java.endorsed.dirs to one of JOnAS's
Gary> many classloaders.

We implemented endorsed dirs specifically for jonas -- as I recall
this was needed not only for jacorb but also for loading xerces/xalan.
My recollection is that with the FC5 gcc (aka 4.1) we didn't need any
special jonas hacks in this area... if I'm wrong, I'd like to know so
we can fix it :-)

Tom



Re: SIGSEGV caused by libgconf-2.so.4

2006-08-03 Thread Tom Tromey
Raif> which i presume is caused by "no" being generated in the file
Raif> java.util.prefs.PreferencesFactory under resource/META-INF/services,
Raif> instead of "gnu.java.util.prefs.FileBasedFactory".

Try this.  (untested)

Tom

Index: configure.ac
===
RCS file: /cvsroot/classpath/classpath/configure.ac,v
retrieving revision 1.175
diff -u -r1.175 configure.ac
--- configure.ac2 Aug 2006 19:32:45 -   1.175
+++ configure.ac4 Aug 2006 00:39:11 -
@@ -89,7 +89,7 @@
   AS_HELP_STRING([--enable-default-preferences-peer],
  [fully qualified class name of default Preferences API 
Backend]))
 DEFAULT_PREFS_PEER=$enable_default_preferences_peer
-if test "$DEFAULT_PREFS_PEER" = ""; then
+if test "$DEFAULT_PREFS_PEER" = "no" || test "$DEFAULT_PREFS_PEER" = yes; then
DEFAULT_PREFS_PEER=gnu.java.util.prefs.FileBasedFactory
 fi
 dnl AC_SUBST(DEFAULT_PREFS_PEER)



Re: jboss-4.0.4

2006-07-31 Thread Tom Tromey
> "Rob" == Robert Lougher <[EMAIL PROTECTED]> writes:

Rob> No, but it doesn't look difficult to implement.  If I understand it
Rob> correctly it seems to be as simple as just prepending the value of
Rob> java.endorsed.dirs to the bootpath?

You need to search the endorsed directories for .jar and .zip files
and add each one to the boot class path.

Tom



Re: jboss-4.0.4

2006-07-31 Thread Tom Tromey
> "Twisti" == Christian Thalinger <[EMAIL PROTECTED]> writes:

Twisti> On shutdown I get a NPE:
Twisti> 13:07:37,901 WARN  [JRMPInvoker] Stopping failed
Twisti> jboss:service=invoker,type=jrmp
Twisti> java.lang.NullPointerException
Twisti>at 
java.rmi.server.UnicastRemoteObject.unexportObject(UnicastRemoteObject.java:240)

Could you file a PR for this?
I don't know RMI very well (does anybody?) but this seems like a real
Classpath bug to me.

Tom



Re: Xara backend over cairo?

2006-07-31 Thread Tom Tromey
> ">" == ê­ðõ   <[EMAIL PROTECTED]> writes:

>> The benchmark shows good perfomance than Cairo.
>> http://www.xaraxtreme.org/about/performance.html

>> But I don't know whether we can also use it for class path (though it is
>> basically a vector rendering engine).

If it is free software and does what we need for Java2D, I don't see
why not.  Naturally we would need a volunteer to start work on this :-)

Tom



Re: classpath-0_92-branch created

2006-07-28 Thread Tom Tromey
> "Andrew" == Andrew John Hughes <[EMAIL PROTECTED]> writes:

Andrew> I've synced the generics branch up to the branch point for 0.92.  Just
Andrew> apply any release branch patches both to generics and the release
Andrew> branch.

Are you going to hold off on any other head->generics merges until
0.92 ships?

Tom



RE: Testing JDK bugs?

2006-07-28 Thread Tom Tromey
Jeroen> We obviously agree on this, but I'm trying to point out that things
Jeroen> aren't always as "obvious" as one would think at first glance.

How about distilling this wisdom into a section in the Classpath
hacking guide?

Tom



Re: OpenTasks?

2006-07-27 Thread Tom Tromey
> "Hari" == Hari Shreedharan <[EMAIL PROTECTED]> writes:

Hari> I had mailed couple of weeks back on opentasks pending on GNU
Hari> Classpath.Kindly tell me what are all the open tasks except for Swing,
Hari> especially if any in networking and RMI.

For RMI I would suggest looking in the Classpath bugzilla.  If there
is a known issue, it would be there.

There may also be networking things in bugzilla.  I don't recall.
However there are also some new 1.5 additions in java.net that haven't
yet been written.  See the JAPI comparison pages on builder.classpath.org.

Tom



Re: Mauve regressions (Was: [cp-patches] FYI: Component.setName() fix)

2006-07-26 Thread Tom Tromey
> "Mark" == Mark Wielaard <[EMAIL PROTECTED]> writes:

Mark> The results aren't that. bad (all generated against cacao on fc5 x86-64)
Mark> Lots of new PASSes. One new fail:

I don't think new fails matter much.
I tend to ignore them myself; I think they're also ignored for the
purpose of baseline computation.

Mark> FAIL: java.lang.InheritableThreadLocal.simple

I updated Classpath and Mauve and ran this test case in my Eclipse
workspace -- everything passed.

Tom



Re: Mauve regressions (Was: [cp-patches] FYI: Component.setName() fix)

2006-07-26 Thread Tom Tromey
> "Francis" == Francis Kung <[EMAIL PROTECTED]> writes:

Francis> Most of those tests use the Robot in some way, and I've
Francis> noticed that tests using the robot require that the computer
Francis> be dedicated solely to the tests... running it in the
Francis> background while doing other work can cause the tests to
Francis> return incorrect results.

I thought the builder was running xvfb so that the AWT tests were
isolated on their own X server... ?

Tom



Re: VM interface changes for splash-screen support

2006-07-23 Thread Tom Tromey
> "Sven" == Sven de Marothy <[EMAIL PROTECTED]> writes:

Sven> So it seems AWT in 1.6 will include support for splash-screens.
Sven> This will require a little (optional) VM support, so here's a proposal
Sven> and some prototype code for this I'd like feedback on.

This seems pretty reasonable to me.

How is the splash screen taken down?  Do we need another native
function for that?

Sven> struct splashscreenhandle
Sven> {
Sven>   void *nativeWindowHandle;
Sven>   void *nativeImageHandle;
Sven> };

This type should probably be given a name starting with cp_.

Tom



Re: Harmony, Suns work in progress OSS Java, GNU Classpath and the Java SE front

2006-07-21 Thread Tom Tromey
>> An other point is GNU Classpath at the moment.
>> GNU Classpath 0.92 was ok. But all the snapshots after it have more
>> and more bugs.

Please file bug reports.

Tom



Re: Is anyone working on InetAdderess.isReachable()?

2006-07-19 Thread Tom Tromey
> "David" == David Daney <[EMAIL PROTECTED]> writes:

David> If not, I will probably give it a go.

I haven't heard of anyone working on this.

Tom



Re: Trouble using libxmlj in GNUJAXP classpath 0.90

2006-07-17 Thread Tom Tromey
> "Herve" == Herve Chang <[EMAIL PROTECTED]> writes:

Herve> => building classpath from sources do not give me any xmlj.dll file
Herve> needed for my usage (I'm using classpath on a windows mobile
Herve> environment). If someone have already built the shared library
Herve> xmlj.dll (or  either xmlj.so file), I would kindly appreciate these
Herve> infos :-)

FWIW I haven't heard of anybody doing this.

Herve> => If not, I am wondering if I am the first trying to use XML or
Herve> XML/DOM in classpath :-) ?

I don't recall doing it myself, but I am sure it has been done.

Herve> a) IMO, the UnsatisfiedLinkError catch block is not at the right
Herve> place. It is currently in gnu.xml.dom ImplementationSource class (as
Herve> Tom said) which is a client class. It should rather be directly in the
Herve> class that calls System.load() (gnu.xml.libxmlj.util.XMJ) something
Herve> like

It is a bit goofy, but I don't think it is incorrect.

Herve> b) Morover, another problem is that, the success/failure of libxmlj
Herve> loading is not considered. There should be a flag to indicate that
Herve> either native loading has succeeded or not. Otherwise, there would be
Herve> some ExceptionInInitializerError (as in the stacktrace), as some
Herve> others class may rely on libxmlj.

There shouldn't be any direct dependencies on this code -- if there
are then that is a bug.  The whole point, AIUI, is that this provider
is optional.

Herve> Caused by: java.lang.ExceptionInInitializerError
Herve> at java.lang.VMClass.forName (Native Method)
Herve> at java.lang.Class.forName (Class.java:161)
Herve> at gnu.xml.dom.ImplementationSource. 
(ImplementationSource.java)
Herve> at gnu.xml.dom.ImplementationSource. 
(ImplementationSource.java)
Herve> at java.lang.VMClassLoader.loadClass (Native Method)
Herve> ...25 more
Herve> Caused by: java.lang.UnsatisfiedLinkError: Native library `xmlj' not
Herve> found (as file `xmlj') in gnu.classpath.boot.library.path and
Herve> java.library.path
Herve> at java.lang.Runtime.loadLibrary (Runtime.java:763)
Herve> at java.lang.System.loadLibrary (System.java:529)
Herve> at gnu.xml.libxmlj.util.XMLJ.init (XMLJ.java:92)
Herve> at gnu.xml.libxmlj.dom.GnomeDocumentBuilder.
Herve> (GnomeDocumentBuilder.java)
Herve> at gnu.xml.libxmlj.dom.GnomeDocumentBuilder.
Herve> (GnomeDocumentBuilder.java)
Herve> at java.lang.VMClass.forName (Native Method)
Herve> ...29 more

Ah, I see the problem.

ImplementationSource is catching UnsatisfiedLinkError, but
Class.forName is actually wrapping it in ExceptionInInitializerError.

By my reading of the VM Spec:

http://java.sun.com/docs/books/vmspec/2nd-edition/html/Concepts.doc.html#24237

(see point #9) I think this is a VM bug.  In particular Error and its
subclasses should not be wrapped in ExceptionInInitializerError.

Tom



Re: Trouble using libxmlj in GNUJAXP classpath 0.90

2006-07-17 Thread Tom Tromey
> "Herve" == Herve Chang <[EMAIL PROTECTED]> writes:

Herve> So, as I want to use DOM/XML in classpath, I'd like to have your
Herve> comments/feedbacks about:

Herve> - Is the use of libxmlj mandatory? (according to my comments below,
Herve>   seems to be yes)

I don't think it is.  See below.

Herve> AFAIU, The DOM Boostrapping fallback class
Herve> gnu.xml.dom.ImplementationSource loads
Herve> gnu.xml.libxmlj.dom.GnomeDocumentBuilder which contains the
Herve> following static code:

Note the code in ImplementationSource:

try
  {
Class t = Class.forName("gnu.xml.libxmlj.dom.GnomeDocumentBuilder");
acc.add(t.newInstance());
  }
catch (Exception e)
  {
// libxmlj not available
  }
catch (UnsatisfiedLinkError e)
  {
// libxmlj not available
  }

In particular catching UnsatisfiedLinkError should guarantee that if
libxmlj is not found, then we can still proceed.

This definitely isn't ideal (IMO) but it seems like it ought to work
ok.

Tom



Re: classpath code coverage reports now online

2006-07-08 Thread Tom Tromey
> "Tony" == Anthony Balkissoon <[EMAIL PROTECTED]> writes:

Tony> There are code coverage reports for classpath-mauve now at
Tony> builder.classpath.org/~cpdev/coverage (there is a link from the main
Tony> builder.classpath.org page).

Thanks, this is really awesome.

Tom



Re: [cp-patches] FYI: X peers

2006-07-05 Thread Tom Tromey
> "Roman" == Roman Kennke <[EMAIL PROTECTED]> writes:

Roman> Mark proposed to put jars that are (optionally) needed for classpath on
Roman> http://builder.classpath.org/ somewhere. What do others think?

This seems like a reasonable idea to me.

Tom



Re: [Gcjwebplugin-devel] Re: NSAPI/ OJI/ Applet plugin

2006-06-21 Thread Tom Tromey
> "Philippe" == Philippe Laporte <[EMAIL PROTECTED]> writes:

.. replying to somewhat old email.

Philippe> I've reviewed the outstanding PRs on this.

Philippe> There was lots of activity in April/Eraly May around the
Philippe> WebPlugin, but as far as Security is concerned, the class
Philippe> lib seems not to have been touched, and so I guess none of
Philippe> these PRs have been updated.

The PRs have a pretty large granularity -- each one is a significant
amount of work.

Gary has been working steadily on the throwpoint test cases.  My
impression is that many of the checks are actually in place, so this
doesn't translate directly to a lot of commits to Classpath.  However,
the tests are important in their own right, as they give us some
assurance that we won't regress.  All this work of his comes under the
umbrella of a single PR -- hence no action there.

We could certainly use help in this area.  There's more to do, as I'm
sure you know (I saw you were CCd on all the security PRs).

Philippe> Is Security seen as vital for running Applets, in the usage contexts
Philippe> currently being addressed?

Right now we have this whitelist thing, which works nicely -- better
than I expected :-).  But, yes, security is vital for the long term.

Tom



Re: Status of NIO socket implementation

2006-06-21 Thread Tom Tromey
> "James" == James Greenfield <[EMAIL PROTECTED]> writes:

James> I'm struggling to find a decent summary of the status of the
James> Classpath's NIO socket implementation.

James> Can anyone summarize for me (or point me at the summary I've missed)?

It works well enough to run Azureus.  I searched in bugzilla and found
4 bugs, one of which is a feature request for an nio-related gcj
optimization (i.e., not that relevant).

Tom



javah

2006-06-19 Thread Tom Tromey
I recently rewrote 'gcjh' in java, including all the bits needed for
'javah'-like operation.

I'd like to check it in.  However, when I wrote it I used the ASM
library.  My preferred approach to this would be to check in the
needed ASM sources (in tools/external), and build the library as part
of the Classpath build.  That way we wouldn't have any java-based
external dependencies.

On irc Mark suggested a --with-asm configure option.  I could do that,
instead, though it would make the eclipse-based build a bit weird.

Any other ideas?

I'm happy to send the code to anybody who wants it.  It depends on the
classpath getopt code.

Tom



  1   2   3   4   5   6   7   8   9   10   >