Linker error when adding a new source file

Jan van Brügge jan at vanbruegge.de
Fri Aug 23 16:02:59 UTC 2019


Hi,

in order to clean up my code, I've moved a bunch of stuff to a new
source file, `TcRowTys.hs` that works similar to `TcTypeNats.hs`. But
when trying to compile a clean build of GHC, I get a linker error:

```

| Run Ghc LinkHs Stage0: _build/stage0/ghc/build/c/hschooks.o (and 1
more) => _build/stage0/bin/ghc
_build/stage0/lib/../lib/x86_64-linux-ghc-8.6.5/ghc-8.9.0.20190722/libHSghc-8.9.0.20190722.a(PrelInfo.o)(.text+0x2814):
error: undefined reference to 'ghc_TcRowTys_rowTyCons_closure'
_build/stage0/lib/../lib/x86_64-linux-ghc-8.6.5/ghc-8.9.0.20190722/libHSghc-8.9.0.20190722.a(PrelInfo.o)(.data+0x578):
error: undefined reference to 'ghc_TcRowTys_rowTyCons_closure'
_build/stage0/lib/../lib/x86_64-linux-ghc-8.6.5/ghc-8.9.0.20190722/libHSghc-8.9.0.20190722.a(TcHsType.o)(.data+0xdd8):
error: undefined reference to 'ghc_TcRowTys_rnilTyCon_closure'
collect2: Fehler: ld gab 1 als Ende-Status zurück
`gcc' failed in phase `Linker'. (Exit code: 1)

```

I had a look at the Wiki including the FAQ, but did not fine anything
about that topic. Does someone know what I have to do for this to work?

Cheers,
Jan



More information about the ghc-devs mailing list