You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--enable-executable-dynamic and template haskell causing errors #1553
Scaffolding/Scaffolder.hs:54:22:
Dynamic linking required, but this is a non-standard build (eg. prof).
You need to build the program twice: once the normal way, and then
in the desired way using -osuf to set the object file suffix.
cabal: Error: some packages failed to install:
I have tried cleaning the build directory, but the same message still occurs.
I have also tried removing profiling, but the same message still occurs:
'cabal' 'install' '--builddir=/home/bob/.cache/haskell/ghc-7.6.3-package-build-files/yesod-bin' '--enable-shared' '--with-compiler=/usr/bin/ghc-7.6.3' '--enable-executable-dynamic' '--reinstall' '--force-reinstalls'
I have also tried removing profiling and --enable-shared, but the same message still occurs:
'cabal' 'install' '--builddir=/home/bob/.cache/haskell/ghc-7.6.3-package-build-files/yesod-bin' '--with-compiler=/usr/bin/ghc-7.6.3' '--enable-executable-dynamic' '--reinstall' '--force-reinstalls'
I have also tried in-directory build with no dynamic first:
I get the same error message each time I use executable-dynamic: True if I set executable-profiling: False:
$ cabal clean && cabal configure && cabal build
...
Loading package hslogger-1.2.3 ... linking ... done.
Loading package regex-posix-0.95.2 ... linking ... done.
Loading package regex-compat-0.95.1 ... linking ... done.
Loading package MissingH-1.2.0.2 ... linking ... done.
HTMLRenderer.hs:31:23:
Dynamic linking required, but this is a non-standard build (eg. prof).
You need to build the program twice: once the normal way, and then
in the desired way using -osuf to set the object file suffix.
If I set executable-profiling to True I get:
$ cabal clean && cabal configure && cabal build
cleaning...
Resolving dependencies...
Configuring RSSGen-0.1.0.0...
Building RSSGen-0.1.0.0...
Preprocessing executable 'RSSGen' for RSSGen-0.1.0.0...
main.hs:1:1:
Could not find module `Prelude'
Perhaps you haven't installed the "p_dyn" libraries for package `base'?
Use -v to see a list of the files searched for.
I compiled my whole haskell packages with cabal and the settings:
I noticed that now ghc is called 3 times (with cabal 1.16 just one time). First time with arguments -no-link -static, then with -no-link -dynamic -osuf dyn_o -dyn_hi dyn_hi and then with -dynamic -osuf dyn_o -hisuf dyn_hi. If I remember well with cabal 1.16 there was just one ghc call with argument -dynamic. This must be the reason, why it did not work...
Activity
23Skidoo commentedon Oct 20, 2013
Try editing the .cabal file and adding
Extensions: TemplateHaskellto theExecutablestanza.23Skidoo commentedon Oct 25, 2013
Closing since this seems to be a bug in
yesod-bin. Please reopen if you disagree.kulla commentedon Mar 3, 2014
I get the same error message each time I use
executable-dynamic: Trueif I setexecutable-profiling: False:If I set
executable-profilingtoTrueI get:I compiled my whole haskell packages with cabal and the settings:
I have Ubuntu 13.10 installed. Do I have to recompile everything with
executable-profiling: Falseandlibrary-profiling: False?kulla commentedon Mar 3, 2014
As suggested I already added
Extensions: TemplateHaskellto my cabal file. My cabal version:GHC version:
kulla commentedon Mar 3, 2014
Mailinglist discussion about TemplateHaskell and dynamic linking: http://www.haskell.org/pipermail/glasgow-haskell-users/2014-February/024647.html (
-dynamicwill be mandatory for TemplateHaskell and is implied by using it). Maybe I have to upgrade to GHC 7.8 and Cabal 1.18?!23Skidoo commentedon Mar 3, 2014
@kulla Yes, please try with 1.18.
kulla commentedon Mar 3, 2014
With cabal 1.18 everything worked fine! ;-)
I noticed that now ghc is called 3 times (with cabal 1.16 just one time). First time with arguments
-no-link -static, then with-no-link -dynamic -osuf dyn_o -dyn_hi dyn_hiand then with-dynamic -osuf dyn_o -hisuf dyn_hi. If I remember well with cabal 1.16 there was just one ghc call with argument-dynamic. This must be the reason, why it did not work...