Ticket #2997 (closed bug: fixed)
Package names starting with a numeric character cause assembler errors
| Reported by: | mboes | Owned by: | igloo |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.10.2 |
| Component: | Compiler | Version: | 6.10.1 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
Hi,
When trying to compile a package named 9pH, I get the following error:
/usr/bin/ghc -O -package-name 9pH-0.1 --make -XOverloadedStrings -XPatternGuards -XTemplateHaskell Network.GpH.Protocol.Derive
[1 of 1] Compiling Network.GpH.Protocol.Derive ( Network/GpH/Protocol/Derive.hs, Network/GpH/Protocol/Derive.o )
/tmp/ghc4263_0/ghc4263_0.s: Assembler messages:
/tmp/ghc4263_0/ghc4263_0.s:18137:0:
Error: junk at end of line, first unrecognized character is `9'
/tmp/ghc4263_0/ghc4263_0.s:18165:0:
Error: junk at end of line, first unrecognized character is `9'
/tmp/ghc4263_0/ghc4263_0.s:18166:0:
Error: unrecognized symbol type "9"
/tmp/ghc4263_0/ghc4263_0.s:18166:0:
Error: junk at end of line, first unrecognized character is `p'
/tmp/ghc4263_0/ghc4263_0.s:18167:0:
Error: junk at end of line, first unrecognized character is `9'
/tmp/ghc4263_0/ghc4263_0.s:18168:0:
Error: junk at end of line, first unrecognized character is `p'
/tmp/ghc4263_0/ghc4263_0.s:18172:0:
Error: junk at end of line, first unrecognized character is `p'
/tmp/ghc4263_0/ghc4263_0.s:18245:0:
Error: junk at end of line, first unrecognized character is `p'
...
It turns out that if I remove '-package-name 9pH-0.1' from the command line, or change the package name, then the compilation completes without error.
It seems that either:
- Package names starting with numeric characters should be banned. In which case it should be clearly documented in the user's guide and/or in the cabal manual and the compiler should check this early on in the compilation.
- Package names starting with a numeric character should be allowed. In which case package names should be mangled appropriately to avoid having the assembler complain.
In my view option 2 would be preferable.
Many thanks,
Mathieu
Change History
Note: See
TracTickets for help on using
tickets.
