cyclic import error

Serge D. Mechveliani mechvel at botik.ru
Fri Jun 22 05:02:03 EDT 2007


Dear GHC developers,

Please, find attached the archive (54 Kb) presenting a strange 
                                                         ghc-6.6.1 
error report about undefined references at the stage of linking 
executable. Unzip and follow  install.txt.
I tested this under  Debian Linux,  Intel Pentium machine, 
ghc-6.6.1 made from source.

* Unzip and 
  set the system variable  $dmSource  pointing to the source
  root (where  dm.cabal  resides).

* cd $dmSource
  make configure
  make build 
  make install 

* Set to  $dmCpOpt  the options for the compilation under Dumatel
  (copy them from  dm.cabal)

* To `make' the executable, command  

  cd $dmSource/..
  ghc $dmCpOpt --make Main 


1. At the stage of linking this executable it stops reporting the 
   error:  certain undefined references.

2. Go to  Reduce.hs,  to the function  evaluate_c,  
   and comment out its last (6) lines starting with the line

      rule : rules' ->

command  rm -rf inst/
         make build
         make install
         cd ..
         rm *.o *.hi
         ghc $dmCpOpt --make Main 

Now, it `makes' `Main' successfully.


Remarks
-------

* The project has 18 .hs modules and 5 .hs-boot modules. 
* There are many type decls, many imports and exports.
* But the value implementations are trivial, like this:  error "".
* The module  Main  imports certain values from the created package,
  but it does not use them, `main' is defined as  putStr "hello\n".
* This example project is contrived.
  In my real project, I suffer of the following effect. The module 
  Reduce  is too large, and I have split from it the new module  Match.
  GHC required for a 1-2 hs-boot-s. I provided them. But then, it 
  reports undefined references at the stage of linking executable.

Regards,

-----------------
Serge Mechveliani
mechvel at botik.ru
 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: importCycleBug.zip
Type: application/zip
Size: 54742 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/glasgow-haskell-bugs/attachments/20070622/08e3a60b/importCycleBug.zip
-------------- next part --------------
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs at haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


More information about the Glasgow-haskell-bugs mailing list