#7764 closed bug (worksforme)
Link Error on windows
Reported by: | Ericson2314 | Owned by: | igloo |
---|---|---|---|
Priority: | normal | Milestone: | 7.8.1 |
Component: | Compiler | Version: | 7.4.2 |
Keywords: | Cc: | ||
Operating System: | Windows | Architecture: | x86 |
Type of failure: | Other | Test Case: | |
Blocked By: | Blocking: | ||
Related Tickets: | Differential Rev(s): | ||
Wiki Page: |
Description
specific commit in question: https://github.com/Ericson2314/Codec.Archive.CnCMix/commit/eb9c843e4d56068c670e3c33c5697243bee42349
When I try to compile my project I get these I get errors at link-time:
C:\Program Files\Haskell Platform\2012.4.0.0\lib\base-4.5.1.0/libHSbase-4.5.1.0.a(Data__683.o):fake:(.text+0x22): undefined reference to `base_DataziData_aonsConstr_closure' C:\Program Files\Haskell Platform\2012.4.0.0\lib\base-4.5.1.0/libHSbase-4.5.1.0.a(Data__683.o):fake:(.data+0x4): undefined reference to `base_DataziData_aonsConstr_closure' collect2: ld returned 1 exit status
I am not using any foreign functions, and unresolved symbol seems to be part of GHC so it looks like a bug to me.
Change History (8)
comment:1 Changed 7 years ago by
difficulty: | → Unknown |
---|---|
Status: | new → infoneeded |
comment:2 Changed 7 years ago by
Probably just "ghc Main" and "ghc Main -o cncnix" from the directory with Main.hs. I am away from my computer so I cannot test this again at the moment.
comment:3 Changed 7 years ago by
OK, confirmed compiling like that does fail. Interestingly I could use cabal to install cmdlib, the one dependancy of this project not in the haskell package, and I can interpret my code with either ghci and ":load Main", runhaskell, or runghc.
comment:4 Changed 7 years ago by
Milestone: | → 7.8.1 |
---|---|
Status: | infoneeded → new |
I can't reproduce this on Linux/amd64 with:
git clone https://github.com/Ericson2314/Codec.Archive.CnCMix.git cd Codec.Archive.CnCMix git reset --hard eb9c843e4d56068c670e3c33c5697243bee42349 cabal install cmdlib ghc Main ghc Main -o cncnix
I'll try on Windows.
comment:5 Changed 7 years ago by
Owner: | set to igloo |
---|
comment:6 Changed 7 years ago by
Yes, I can compile on Linux (x86-32). The problem only arises when I rebooted to windows (thus also x86-32) and tried to compile there. Also I was able to get somebody else to compile on Windows for me, so the issue clearly doesn't arise on all Windows machines. I could run their binary in my Windows, but I am not sure whether that means they were also running x86-32.
comment:7 Changed 7 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
I can't reproduce it on Windows either, also using HP 2012.4.0.0. The symbol should be base_DataziData_consConstr_closure
.
$ ar x "C:/Program Files (x86)/Haskell Platform/2012.4.0.0/lib/base-4.5.1.0/libHSbase-4.5.1.0.a" $ nm Data__683.o 00000000 b .bss 00000000 d .data 00000000 t .text U _base_DataziData_consConstr_closure U _base_DataziData_nilConstr_closure 00000008 D _base_DataziData_zdLr4lklvl89_closure 0000003c T _base_DataziData_zdLr4lklvl89_info 00000000 d _base_DataziData_zdLr4lklvl89_srt 0000000c t _s7nr_info
It looks like your GHC install has become corrupted somehow, perhaps due to dodgy hardware or badly behaved software.
comment:8 Changed 7 years ago by
Weird, I hope my file system isn't corrupted or hard drive damaged. I'll re-install the platform and report back.
Thanks for your help, igloo.
Can you please tell me what commands I need to run to reproduce this problem?