[GHC] #1452: "undefined reference" while linking executable
(for cyclic import project) in ghc-6.6.1
GHC
trac at galois.com
Mon Jun 25 06:05:21 EDT 2007
#1452: "undefined reference" while linking executable (for cyclic import project)
in ghc-6.6.1
------------------------------+---------------------------------------------
Reporter: guest | Owner: guest
Type: bug | Status: assigned
Priority: normal | Milestone:
Component: Compiler | Version: 6.6.1
Severity: normal | Resolution:
Keywords: cyclic import | Difficulty: Moderate (1 day)
Os: Linux | Testcase:
Architecture: x86 |
------------------------------+---------------------------------------------
Comment (by simonpj):
Serge writes (in separate email)
Recently I submitted a bug report #1452 for ghc-6.6.1
of undefined references at the stage of linking executable,
and also of ignoring un-existing module import.
Now I discovered the following strange effect
(see the report source modules) which, probably, explains much.
1. (minor note) The file Match.hs-boot is not needed. All the effects
preserve after its removal.
2. The name `Match` must be in the list `other-modules:'
in the file `dm.cabal`, which describes the package.
But it is not in dm.cabal !
Because I have forgotten to put it there.
Further, make build
still finds and compiles Match.hs.
The only point where Match is needed is Reduce.hs: it imports
`Match'. But why GHC finds Match.hs ?
Probably, because it is in the current source directory.
Then,
{{{
make install
}}}
succeeds.
And further, the command
{{{
ghc $dmCpOpt --make Main
}}}
succeeds or not -- depending on whether `Match' is in dm.cabal or not!
First, I think that there is my oversight here.
But the GHC + Cabal system behaves strange in this example.
Must not it give a plain report of what is wrong with modules or
package setting ? Say,
{{{
"Error: `Match' is not in the package but is imported by Reduce.hs."
}}}
Probably, this is the matter of Cabal.
Further, if GHC still finds Match.hs and builds the package, why this
"undefined reference" appears while linking executable ?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1452>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
-------------- 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