Link error when using Data.Vector in separate compilation mode
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.
Trac metadata
Trac field | Value |
---|---|
Version | 7.8.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |