[GHC] #9785: Link error when using Data.Vector in separate compilation mode
GHC
ghc-devs at haskell.org
Sat Nov 8 21:50:43 UTC 2014
#9785: Link error when using Data.Vector in separate compilation mode
-------------------------------------+-------------------------------------
Reporter: yugr | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.3
Keywords: | Operating System: Windows
Architecture: x86_64 (amd64) | Type of failure: GHC
Difficulty: Unknown | rejects valid program
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
When I compile attached files all at once they link fine:
$ ghc A.hs B.hs Main.hs
Linking Main.exe ...
But with separate compilation they produce link errors:
$ rm -f *.o *.hi
$ ghc -c A.hs
$ ghc -c B.hs
$ ghc -c Main.hs
$ ghc A.o B.o Main.o
B.o:fake:(.text+0x34): undefined reference to
`vectorzm0zi10zi11zi0_DataziVector_fromList_closure'
B.o:fake:(.data+0x20): undefined reference to
`vectorzm0zi10zi11zi0_DataziVector_fromList_closure'
c:/program files/haskell
platform/2014.2.0.0/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe:
B.o: bad reloc address 0x20 in section `.data'
c:/program files/haskell
platform/2014.2.0.0/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe:
final link failed: Invalid operation
collect2: ld returned 1 exit status
I'm using the latest Haskell Platform 2014.2.0.0 for Windows.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9785>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list