public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* gcj 1.5.x: error: /classname/ cannot be resolved to a type
@ 2009-07-15  8:09 Mathieu Malaterre
  2009-07-15  8:25 ` Andrew Haley
  0 siblings, 1 reply; 6+ messages in thread
From: Mathieu Malaterre @ 2009-07-15  8:09 UTC (permalink / raw)
  To: java

Hi there,

  I am getting an error using gcj 1.5.x I was not getting in older
release, and I do not understand what I am doing wrong.

  Compilation line:

cd /home/mathieu/Perso/gdcm/debug-snap/Utilities/VTK/java &&
/usr/lib/gcc-snapshot/java-1.5.0-gcj-4.5/bin/javac -cp
/home/mathieu/Kitware/VTK-snap/bin/vtk.jar vtk/*.java
gcj: warning: already-compiled .class files ignored with -C
vtk/vtkGDCMImageReader.java:5: warning: The import vtk is never used
  import vtk.*;
         ^^^
vtk/vtkGDCMImageReader.java:7: error: vtkMedicalImageReader2 cannot be
resolved to a type
  public class vtkGDCMImageReader extends vtkMedicalImageReader2
                                          ^^^^^^^^^^^^^^^^^^^^^^


With:

$ /usr/lib/gcc-snapshot/java-1.5.0-gcj-4.5/bin/jar  tvf
/home/mathieu/Kitware/VTK-snap/bin/vtk.jar | grep
vtkMedicalImageReader2
 2990 Wed 7 08 10:54:20 CEST 2009 vtk/vtkMedicalImageReader2.java
 3023 Wed 7 08 10:54:22 CEST 2009 vtk/vtkMedicalImageReader2.class


Copy of the java code:

...
$ head ./Utilities/VTK/java/vtk/vtkGDCMImageReader.java
// java wrapper for vtkGDCMImageReader object
//

package vtk;
import vtk.*;

public class vtkGDCMImageReader extends vtkMedicalImageReader2
{

  private native String GetClassName_0();
...


References version:
$ /usr/lib/gcc-snapshot/java-1.5.0-gcj-4.5/bin/javac -version
gcj (Debian 20090620-1) 4.5.0 20090620 (experimental) [trunk revision 148747]
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ /usr/lib/gcc-snapshot/java-1.5.0-gcj-4.5/bin/jar --version
jar (GNU Classpath) 0.98

Copyright 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Thank you
-- 
Mathieu

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gcj 1.5.x: error: /classname/ cannot be resolved to a type
  2009-07-15  8:09 gcj 1.5.x: error: /classname/ cannot be resolved to a type Mathieu Malaterre
@ 2009-07-15  8:25 ` Andrew Haley
  2009-07-15  8:29   ` Mathieu Malaterre
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Haley @ 2009-07-15  8:25 UTC (permalink / raw)
  To: Mathieu Malaterre; +Cc: java

On 07/15/2009 09:08 AM, Mathieu Malaterre wrote:
> Hi there,
>
>    I am getting an error using gcj 1.5.x I was not getting in older
> release, and I do not understand what I am doing wrong.
>
>    Compilation line:
>
> cd /home/mathieu/Perso/gdcm/debug-snap/Utilities/VTK/java&&
> /usr/lib/gcc-snapshot/java-1.5.0-gcj-4.5/bin/javac -cp
> /home/mathieu/Kitware/VTK-snap/bin/vtk.jar vtk/*.java
> gcj: warning: already-compiled .class files ignored with -C
> vtk/vtkGDCMImageReader.java:5: warning: The import vtk is never used
>    import vtk.*;
>           ^^^
> vtk/vtkGDCMImageReader.java:7: error: vtkMedicalImageReader2 cannot be
> resolved to a type
>    public class vtkGDCMImageReader extends vtkMedicalImageReader2
>                                            ^^^^^^^^^^^^^^^^^^^^^^
>
>
> With:
>
> $ /usr/lib/gcc-snapshot/java-1.5.0-gcj-4.5/bin/jar  tvf
> /home/mathieu/Kitware/VTK-snap/bin/vtk.jar | grep
> vtkMedicalImageReader2
>   2990 Wed 7 08 10:54:20 CEST 2009 vtk/vtkMedicalImageReader2.java
>   3023 Wed 7 08 10:54:22 CEST 2009 vtk/vtkMedicalImageReader2.class
>
>
> Copy of the java code:
>
> ...
> $ head ./Utilities/VTK/java/vtk/vtkGDCMImageReader.java
> // java wrapper for vtkGDCMImageReader object
> //
>
> package vtk;
> import vtk.*;
>
> public class vtkGDCMImageReader extends vtkMedicalImageReader2
> {
>
>    private native String GetClassName_0();
> ...
>
>
> References version:
> $ /usr/lib/gcc-snapshot/java-1.5.0-gcj-4.5/bin/javac -version
> gcj (Debian 20090620-1) 4.5.0 20090620 (experimental) [trunk revision 148747]
> Copyright (C) 2009 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> $ /usr/lib/gcc-snapshot/java-1.5.0-gcj-4.5/bin/jar --version
> jar (GNU Classpath) 0.98
>
> Copyright 2008 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I really need a test case for this.  Something I can build.

Andrew.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gcj 1.5.x: error: /classname/ cannot be resolved to a type
  2009-07-15  8:25 ` Andrew Haley
@ 2009-07-15  8:29   ` Mathieu Malaterre
  2009-07-15  8:35     ` Andrew Haley
  0 siblings, 1 reply; 6+ messages in thread
From: Mathieu Malaterre @ 2009-07-15  8:29 UTC (permalink / raw)
  To: Andrew Haley; +Cc: java

On Wed, Jul 15, 2009 at 10:24 AM, Andrew Haley<aph@redhat.com> wrote:
> On 07/15/2009 09:08 AM, Mathieu Malaterre wrote:
>>
>> Hi there,
>>
>>   I am getting an error using gcj 1.5.x I was not getting in older
>> release, and I do not understand what I am doing wrong.
>>
>>   Compilation line:
>>
>> cd /home/mathieu/Perso/gdcm/debug-snap/Utilities/VTK/java&&
>> /usr/lib/gcc-snapshot/java-1.5.0-gcj-4.5/bin/javac -cp
>> /home/mathieu/Kitware/VTK-snap/bin/vtk.jar vtk/*.java
>> gcj: warning: already-compiled .class files ignored with -C
>> vtk/vtkGDCMImageReader.java:5: warning: The import vtk is never used
>>   import vtk.*;
>>          ^^^
>> vtk/vtkGDCMImageReader.java:7: error: vtkMedicalImageReader2 cannot be
>> resolved to a type
>>   public class vtkGDCMImageReader extends vtkMedicalImageReader2
>>                                           ^^^^^^^^^^^^^^^^^^^^^^
>>
>>
>> With:
>>
>> $ /usr/lib/gcc-snapshot/java-1.5.0-gcj-4.5/bin/jar  tvf
>> /home/mathieu/Kitware/VTK-snap/bin/vtk.jar | grep
>> vtkMedicalImageReader2
>>  2990 Wed 7 08 10:54:20 CEST 2009 vtk/vtkMedicalImageReader2.java
>>  3023 Wed 7 08 10:54:22 CEST 2009 vtk/vtkMedicalImageReader2.class
>>
>>
>> Copy of the java code:
>>
>> ...
>> $ head ./Utilities/VTK/java/vtk/vtkGDCMImageReader.java
>> // java wrapper for vtkGDCMImageReader object
>> //
>>
>> package vtk;
>> import vtk.*;
>>
>> public class vtkGDCMImageReader extends vtkMedicalImageReader2
>> {
>>
>>   private native String GetClassName_0();
>> ...
>>
>>
>> References version:
>> $ /usr/lib/gcc-snapshot/java-1.5.0-gcj-4.5/bin/javac -version
>> gcj (Debian 20090620-1) 4.5.0 20090620 (experimental) [trunk revision
>> 148747]
>> Copyright (C) 2009 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.  There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
>> PURPOSE.
>>
>> $ /usr/lib/gcc-snapshot/java-1.5.0-gcj-4.5/bin/jar --version
>> jar (GNU Classpath) 0.98
>>
>> Copyright 2008 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.  There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
>> PURPOSE.
>
> I really need a test case for this.  Something I can build.

Everything is open source. Ref build failure on automated debian build
system (hppa machine):

https://buildd.debian.org/~luk/status/package.php?p=gdcm

The problem is that this is quite complex to build on a non-debian
system. Does redhat system comes with a system installed 'vtk.jar'
file ?

To reproduce you need to get VTK package, turn java wrapping on. Then
build GDCM against that VTK version. If you need more info, please
contact me directly.

Thanks,
-- 
Mathieu

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gcj 1.5.x: error: /classname/ cannot be resolved to a type
  2009-07-15  8:29   ` Mathieu Malaterre
@ 2009-07-15  8:35     ` Andrew Haley
  2009-07-15  8:43       ` Mathieu Malaterre
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Haley @ 2009-07-15  8:35 UTC (permalink / raw)
  To: Mathieu Malaterre; +Cc: java

On 07/15/2009 09:29 AM, Mathieu Malaterre wrote:
> On Wed, Jul 15, 2009 at 10:24 AM, Andrew Haley<aph@redhat.com>  wrote:
>> On 07/15/2009 09:08 AM, Mathieu Malaterre wrote:
>>> Hi there,
>>>
>>>    I am getting an error using gcj 1.5.x I was not getting in older
>>> release, and I do not understand what I am doing wrong.
>>>

>> I really need a test case for this.  Something I can build.
>
> Everything is open source. Ref build failure on automated debian build
> system (hppa machine):
>
> https://buildd.debian.org/~luk/status/package.php?p=gdcm
>
> The problem is that this is quite complex to build on a non-debian
> system. Does redhat system comes with a system installed 'vtk.jar'
> file ?

Sure, but I don't see what would stop your from extracting the relevant
files into a test case that anyone can try.

Andrew.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gcj 1.5.x: error: /classname/ cannot be resolved to a type
  2009-07-15  8:35     ` Andrew Haley
@ 2009-07-15  8:43       ` Mathieu Malaterre
  2009-07-16 12:12         ` Mathieu Malaterre
  0 siblings, 1 reply; 6+ messages in thread
From: Mathieu Malaterre @ 2009-07-15  8:43 UTC (permalink / raw)
  To: Andrew Haley; +Cc: java

On Wed, Jul 15, 2009 at 10:35 AM, Andrew Haley<aph@redhat.com> wrote:
> On 07/15/2009 09:29 AM, Mathieu Malaterre wrote:
>>
>> On Wed, Jul 15, 2009 at 10:24 AM, Andrew Haley<aph@redhat.com>  wrote:
>>>
>>> On 07/15/2009 09:08 AM, Mathieu Malaterre wrote:
>>>>
>>>> Hi there,
>>>>
>>>>   I am getting an error using gcj 1.5.x I was not getting in older
>>>> release, and I do not understand what I am doing wrong.
>>>>
>
>>> I really need a test case for this.  Something I can build.
>>
>> Everything is open source. Ref build failure on automated debian build
>> system (hppa machine):
>>
>> https://buildd.debian.org/~luk/status/package.php?p=gdcm
>>
>> The problem is that this is quite complex to build on a non-debian
>> system. Does redhat system comes with a system installed 'vtk.jar'
>> file ?
>
> Sure, but I don't see what would stop your from extracting the relevant
> files into a test case that anyone can try.

Oh sorry :)

Does this help:

http://gdcm.sourceforge.net/vtk-java/

Thanks again
-- 
Mathieu

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: gcj 1.5.x: error: /classname/ cannot be resolved to a type
  2009-07-15  8:43       ` Mathieu Malaterre
@ 2009-07-16 12:12         ` Mathieu Malaterre
  0 siblings, 0 replies; 6+ messages in thread
From: Mathieu Malaterre @ 2009-07-16 12:12 UTC (permalink / raw)
  To: Andrew Haley; +Cc: java

On Wed, Jul 15, 2009 at 10:43 AM, Mathieu
Malaterre<mathieu.malaterre@gmail.com> wrote:
> On Wed, Jul 15, 2009 at 10:35 AM, Andrew Haley<aph@redhat.com> wrote:
>> On 07/15/2009 09:29 AM, Mathieu Malaterre wrote:
>>>
>>> On Wed, Jul 15, 2009 at 10:24 AM, Andrew Haley<aph@redhat.com>  wrote:
>>>>
>>>> On 07/15/2009 09:08 AM, Mathieu Malaterre wrote:
>>>>>
>>>>> Hi there,
>>>>>
>>>>>   I am getting an error using gcj 1.5.x I was not getting in older
>>>>> release, and I do not understand what I am doing wrong.
>>>>>
>>
>>>> I really need a test case for this.  Something I can build.
>>>
>>> Everything is open source. Ref build failure on automated debian build
>>> system (hppa machine):
>>>
>>> https://buildd.debian.org/~luk/status/package.php?p=gdcm
>>>
>>> The problem is that this is quite complex to build on a non-debian
>>> system. Does redhat system comes with a system installed 'vtk.jar'
>>> file ?
>>
>> Sure, but I don't see what would stop your from extracting the relevant
>> files into a test case that anyone can try.
>
> Oh sorry :)
>
> Does this help:
>
> http://gdcm.sourceforge.net/vtk-java/

Thanks to Andrew, I was able to track down the issue to a problem with
the javac wrapper as distribute in the debian linux distribution.
Which basically provide a javac Sun-like cmd line, and forward args to
gcj. Namely:

...
    } elsif ($arg eq '-classpath' or $arg eq '--classpath' or $arg eq '--cp') {
        $appendNextArg = '--classpath=';
...

Thus -cp was never taken into account.

Sorry for the noise,
-- 
Mathieu

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-07-16 12:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-15  8:09 gcj 1.5.x: error: /classname/ cannot be resolved to a type Mathieu Malaterre
2009-07-15  8:25 ` Andrew Haley
2009-07-15  8:29   ` Mathieu Malaterre
2009-07-15  8:35     ` Andrew Haley
2009-07-15  8:43       ` Mathieu Malaterre
2009-07-16 12:12         ` Mathieu Malaterre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).