On Tue, Jul 01, 2008 at 05:36:56PM +0100, Mary Ellen Foster wrote:
[ oops, just replied to Andrew the first time ... ]
2008/7/1 Andrew Haley <aph(a)redhat.com>:
> Daniel Veillard wrote:
>> the java class compilations break for example with java-1.5.0-gcj [-devel]
>> on Fedora-8 (didn't tried icedtea yet, though I guess that would work)
>> this looks related to dependancies when compiling a bunch of .java
>> together in one command as
>>
>> /usr/bin/javac -classpath "org/libvirt" org/libvirt/*.java
>> 2. ERROR in org/libvirt/VirConnectAuthDefault.java (at line 14)
>> credType= new VirConnectCredential.VirConnectCredentialType[] {
>> ^^^^^^^^
>> credType cannot be resolved
>>
>> though VirConnectCredential.java is there and defines the type.
>
> Hmm. I think we need to find out if this is a real bug in ecj, and
> fix it if so. I can't remember seeing anything like this before.
>
> Can you create a stand-alone test case that shows this failure? I can't
> figure out how to do so.
I think the problem might actually be a lack of "-source 1.5" on the
javac line, actually. Without that, it doesn't seem to like the "enum"
declarations and doesn't create any of the enum classes, resulting in
the above error (and, if you scroll down, errors about the enum
declarations too).
Haha, yes !
This fixes it. I still gets 3 warnings but not a blocker :-)
This is testing with java-1.5.0-gcj-devel-1.5.0.0-17.fc8 on Fedora 8,
FWIW.
Right :-)
If I understand correctly enum was added in Java 1.5, if I ask about
the version I get
laptop:~/libvirt-java/src -> /usr/bin/javac -version
Eclipse Java Compiler 0.771, 3.3.0, Copyright IBM Corp 2000, 2007. All rights reserved.
Maybe the most portable way to fix this is to force that version flag
when javac is the Eclipse compiler.
I think I will augment the checkings done in configure.in accordingly
thanks !
Daniel
--
Red Hat Virtualization group
http://redhat.com/virtualization/
Daniel Veillard | virtualization library
http://libvirt.org/
veillard(a)redhat.com | libxml GNOME XML XSLT toolkit
http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine
http://rpmfind.net/