[m-dev.] Bug in --make

Nicholas Nethercote njn at csse.unimelb.edu.au
Thu Apr 20 20:58:44 AEST 2006


Hi,

I just hit a bug in --make.  Here's what I get:

  [swordfish:~/ws/zinc/trunk7/compiler] mmc --make zinc
  ** Error reading file `lexer.m' to generate dependencies: file `lexer.m' not found.
  ** Module `lexer' is imported or included by module `term_io'.
  ** dependencies for `Mercury/int2s/lexer.int2' do not exist: lexer.m
  ** This indicates a bug in `mmc --make'.

The way this occurred was that I had a file in my program called lexer.m, 
which is also the name of a Mercury library file.  I got a link error 
because I used the same name for a type ("offset") in my lexer.m that was 
also used in Mercury's lexer.m -- there were two versions of the equality 
predicates for that type.

So I renamed my lexer.m to zinc_lexer.m, tried recompiling, and got the 
above.

I'm using the Mercury installed on swordfish:

   Mercury Compiler, version rotd-2006-04-19, configured for i686-pc-linux-gnu

As a simple workaround I deleted the Mercury/ directory and everything's 
working fine again.  I imagine the bug should be reproducible by compiling a 
small program that contains a lexer.m file and then renaming it.

Nick

ps: I wasn't sure if this was the best place to send bug reports.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list