Opened 6 months ago

Closed 6 months ago

Last modified 6 months 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 Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

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-1.2.4.5 --enable-tests. The result is:

test/YesodCoreTest/NoOverloadedStrings.hs:16:26:
    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 1.18.0.2
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 (3)

comment:1 Changed 6 months ago by igloo

  • Resolution set to invalid
  • Status changed from new to closed

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 6 months 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 6 months ago by igloo

It's a bug in yesod-core.

You need something like extensions: TemplateHaskell somewhere.

Note: See TracTickets for help on using tickets.