[Haskell-cafe] HPC and Template Haskell (GHC 7.8.3, Yesod)

David Turner dct25-561bs at mythic-beasts.com
Fri Dec 19 18:32:46 UTC 2014


Hi,

I'm having trouble making a HPC build of a Yesod application. It fails with:

/usr/bin/ld: dist/build/StreamReading/Config.dyn_o: relocation
R_X86_64_PC32 against undefined symbol
`_hpc_tickboxes_tracszmenterprisezm0zi0zi0_Settings_hpc' can not be
used when making a shared object; recompile with -fPIC

I've narrowed it down to a call to ghc and posted the output in all
its gory detail at http://lpaste.net/116872 if that's any help.

Of note is that dist/build/Settings.dyn_o is unexpectedly missing from
the list of parameters to the last call to gcc, and the missing symbol
is defined in the same. There are, in fact, quite a number of missing
.dyn_o files in that list.

Slightly weirdly, when I run the same command line again, it seems to
work. At least, there are no errors reported and the exit code is 0.

Any ideas?

Cheers,

David


More information about the Haskell-Cafe mailing list