Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#8443 closed bug (invalid)

cannot find normal object file when compiling TH code

Reported by: snoyberg Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.7
Keywords: Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: GHC rejects valid program Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


Unfortunately, I haven't been able to whittle this down to a smaller test case. In order to reproduce, just run cabal install yesod-core- --enable-tests. The result is:

    cannot find normal object file ‛dist/build/tests/tests-tmp/YesodCoreTest/NoOverloadedStringsSub.dyn_o’
    while linking an interpreted expression

Tested using:

The Glorious Glasgow Haskell Compilation System, version 7.7.20131012 cabal-install version using version 1.18.0 of the Cabal library

I'm on Ubuntu 12.04 64-bit. Compiling with GHC 7.6.3 and 7.4.2 works correctly.

Let me know if there's any other information I can provide.

Change History (4)

comment:1 Changed 3 years ago by igloo

Resolution: invalid
Status: newclosed

test/YesodCoreTest/NoOverloadedStrings.hs uses TemplateHaskell, but the .cabal file doesn't declare that it uses TH. Cabal should DTRT if it knows that TH is used.

comment:2 Changed 3 years ago by snoyberg

Can you clarify what the recommended fix is? I'm not certain if you're saying this is a bug in Cabal, or if there is a new requirement to somehow state that code will be using TemplateHaskell and, if such a requirement exists, how a user is supposed to do so.

comment:3 Changed 3 years ago by igloo

It's a bug in yesod-core.

You need something like extensions: TemplateHaskell somewhere.

comment:4 Changed 2 years ago by nh2

For readers who pass by:

other-extensions: TemplateHaskell in your cabal file is the recommended way to deal with this.

Note: See TracTickets for help on using tickets.