This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problems with duplicate declarations of modules


On 6/25/09 8:08 AM, "Per Bothner" <per@bothner.com> wrote:
> On 06/23/2009 08:40 PM, alex mitchell wrote:
>> I have a fairly complex project, with roughly 20 .scm files that form a set
>> of libraries, which are then used by numerous other files. Several of the
>> library files make use of other library files. Occasionally, when I require
>> two of these library files, I get errors that there are duplicate
>> declarations of the files that THEY require.
> 
> What kind of errors?  What kind of declarations?
> 
> Could you send me the error messages, and the source files?
> At least the declarations being complained about.

Here's an example of the errors:

#|kawa:1|# java.lang.RuntimeException: load: errors while compiling
'[..]/runminischeme.scm':

[..]/graphics.scm:6:3: duplicate declaration of 'load-native-library'

[..] graphics.scm:5:3: (this is the previous declaration of
'load-native-library')

[..] graphics.scm:6:3: duplicate declaration of 'is-null?'

[..]/graphics.scm:5:3: (this is the previous declaration of 'is-null?')

[..]/graphics.scm:6:3: duplicate declaration of 'not-null?'

[..]/graphics.scm:5:3: (this is the previous declaration of 'not-null?')

[..]/graphics.scm:6:3: duplicate declaration of 'make-random'

[..]/graphics.scm:5:3: (this is the previous declaration of 'make-random')

[..]/graphics.scm:6:3: duplicate declaration of 'make-dimension'

[..]/graphics.scm:5:3: (this is the previous declaration of
'make-dimension')

[..]/graphics.scm:6:3: duplicate declaration of 'generate-random-float'

[..]/graphics.scm:5:3: (this is the previous declaration of
'generate-random-float')

[..]/graphics.scm:6:3: duplicate declaration of 'list-is-numeric?'

[..]/graphics.scm:5:3: (this is the previous declaration of
'list-is-numeric?')

[..]/graphics.scm:6:3: duplicate declaration of 'string-is-numeric?'

[..]/graphics.scm:5:3: (this is the previous declaration of
'string-is-numeric?')

[..]/graphics.scm:6:3: duplicate declaration of 'string-is-double?'

[..]/graphics.scm:5:3: (this is the previous declaration of
'string-is-double?')

[..]/graphics.scm:6:3: duplicate declaration of 'number->java-string'

[..]/graphics.scm:5:3: (this is the previous declaration of
'number->java-string')



#|kawa:2|#     at kawa.standard.load.apply2(load.java:163)

at kawa.standard.load.apply1(load.java:145)

at gnu.mapping.Procedure.apply(Procedure.java:112)

at gnu.mapping.Procedure.apply(Procedure.java:95)

at gnu.mapping.CallContext.runUntilDone(CallContext.java:251)

at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:352)

at gnu.expr.ModuleExp.evalModule(ModuleExp.java:176)

at kawa.Shell.run(Shell.java:273)

at kawa.Shell.run(Shell.java:184)

at kawa.Shell.run(Shell.java:165)

at kawa.repl.processArgs(repl.java:395)

at kawa.repl.main(repl.java:866)

Note that line 5 of graphics.scm is
(require "graphics-kawa.scm")
line 6 of graphics.scm is
(require "ui-kawa.scm")
and line 3 of graphics-kawa.scm is
(require "ui-kawa.scm)

The definitions which the compiler claims are duplicate are all declared in
ui-kawa.scm.

Note that I'm running this from the kawa command line, rather than
compiling, and I'm using the --no-warn-invoke-unknown-method flag.

Alex


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