Stack build error: while building package aeson. (cabal) ExitFailure 1 - haskell

When I run "stack build" I get an error:
-- While building package aeson-1.1.2.0 using:
/Users/kaspazza/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.2.0 build --ghc-options ""
Process exited with code: ExitFailure 1
My stack.yaml:
resolver: lts-9.10
packages:
- '.'
extra-deps: []
flags: {}
extra-package-dbs: []
command: stack exec -- which ghc
gives:
/Users/kaspazza/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc
command: ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.8.3
command: stack build
aeson > configure
aeson > Configuring aeson-1.1.2.0...
aeson > build
aeson > Building aeson-1.1.2.0...
aeson > Preprocessing library aeson-1.1.2.0...
aeson > [ 1 of 21] Compiling Data.Aeson.Types.Internal ( Data/Aeson/Types/Internal.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/Aeson/Types/Internal.o )
aeson > [ 2 of 21] Compiling Data.Aeson.Types.Generic ( Data/Aeson/Types/Generic.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/Aeson/Types/Generic.o )
aeson > [ 3 of 21] Compiling Data.Aeson.Parser.UnescapeFFI ( ffi/Data/Aeson/Parser/UnescapeFFI.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/Aeson/Parser/UnescapeFFI.o )
aeson > [ 4 of 21] Compiling Data.Aeson.Parser.Unescape ( Data/Aeson/Parser/Unescape.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/Aeson/Parser/Unescape.o )
aeson > [ 5 of 21] Compiling Data.Aeson.Parser.Internal ( Data/Aeson/Parser/Internal.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Data/Aeson/Parser/Internal.o )
aeson > <command line>: can't load .so/.DLL for: /Users/kaspazza/.stack/snapshots/x86_64-osx/8b5cff025076e7bab89d6dbb5e562716cf2b67bbcde1528460c4f36feefa23fb/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHStime-locale-compat-0.1.1.3-KZ1jqNx8uhlHjmuPPj6V1Y-ghc8.0.2.dylib (dlopen(/Users/kaspazza/.stack/snapshots/x86_64-osx/8b5cff025076e7bab89d6dbb5e562716cf2b67bbcde1528460c4f36feefa23fb/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHStime-locale-compat-0.1.1.3-KZ1jqNx8uhlHjmuPPj6V1Y-ghc8.0.2.dylib, 5): REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB has segment 2 which is not a writable segment (__LINKEDIT) in /Users/kaspazza/.stack/snapshots/x86_64-osx/8b5cff025076e7bab89d6dbb5e562716cf2b67bbcde1528460c4f36feefa23fb/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHStime-locale-compat-0.1.1.3-KZ1jqNx8uhlHjmuPPj6V1Y-ghc8.0.2.dylib)
-- While building package aeson-1.1.2.0 using:
/Users/kaspazza/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.2.0 build --ghc-options ""
Process exited with code: ExitFailure 1
Progress 1/2
command: cabal install
cabal: Could not resolve dependencies:
[__0] trying: duckling-0.1.6.1 (user goal)
[__1] next goal: snap-server (dependency of duckling)
[__1] rejecting: snap-server-1.1.1.1 (conflict: duckling =>
snap-server>=1.0.1.1 && <1.1)
[__1] skipping: snap-server-1.1.1.0, snap-server-1.1.0.0 (has the same
characteristics that caused the previous version to fail: excluded by
constraint '>=1.0.1.1 && <1.1' from 'duckling')
[__1] trying: snap-server-1.0.3.3
[__2] next goal: base (dependency of duckling)
[__2] rejecting: base-4.13.0.0/installed-4.13.0.0 (conflict: snap-server =>
base>=4 && <4.11)
[__2] skipping: base-4.14.0.0, base-4.13.0.0, base-4.12.0.0, base-4.11.1.0,
base-4.11.0.0 (has the same characteristics that caused the previous version
to fail: excluded by constraint '>=4 && <4.11' from 'snap-server')
[__2] rejecting: base-4.10.1.0, base-4.10.0.0, base-4.9.1.0, base-4.9.0.0,
base-4.8.2.0, base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1,
base-4.7.0.0, base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0,
base-4.4.1.0, base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2,
base-4.2.0.1, base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2,
base-3.0.3.1 (constraint from non-upgradeable package requires installed
instance)
[__2] fail (backjumping, conflict set: base, duckling, snap-server)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: snap-server, duckling, base
(I'm on a mac, and I think the problem is with versions/dependencies of tools on my machine)
Any ideas why I get the error, or how can I debug it?

copy from my comment
Apparently this has been build also with ghc-8.6.3. Such a version of ghc is available in stack's snapshot 13.11. If you wish, change stack.yaml to set the resolver to lts-13.11. It'll download a different version of the compiler and libraries. Maybe it works
From your comment
as you've said, you have to add allow-newer: true so it can resolve dependencies properly

Related

Fay can't find fay-base

I want to use Fay with Yesod, but can't get Fay typechecking to work.
Will appreciate any advice.
$ stack build
[ 9 of 11] Compiling Handler.Home ( src/Handler/Home.hs, .stack-work/dist/x86_64-linux-dkda49f7ca9b244180d3cfb1987cbc9743/Cabal-2.4.0.1/build/Handler/Home.o )
/home/user/code/myproject/src/Handler/Home.hs:121:13: error:
_ Exception when trying to run compile-time code:
ghc-pkg describe error:
Timestamp 2019-05-07 18:46:44 UTC for /opt/ghc/8.6.5/lib/ghc-8.6.5/package.conf.d/package.cache
ghc-pkg: cannot find package fay-base <- ########### Why?
GHC package manager version 8.6.5
using cache: /opt/ghc/8.6.5/lib/ghc-8.6.5/package.conf.d/package.cache
db stack: ["/opt/ghc/8.6.5/lib/ghc-8.6.5/package.conf.d"]
flag db stack: ["/opt/ghc/8.6.5/lib/ghc-8.6.5/package.conf.d"]
CallStack (from HasCallStack):
error, called at src/Fay/Compiler/Packages.hs:70:24 in fay-0.24.0.3-CdLcUWVJEOpLCiYHkNVTai:Fay.Compiler.Packages
Code: fayFile' (ConE 'StaticR) "HelloWorld"
_ In the untyped splice: $(fayFile' (ConE 'StaticR) "HelloWorld")
|
121 | $( fayFile' (ConE 'StaticR) "HelloWorld" )
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Fay packages are not yet in stackage, so I added them to stack.yaml as extra-deps:
extra-deps: - fay-0.24.0.3
- fay-base-0.21.1.1
- fay-dom-0.5.0.1
- fay-text-0.3.2.2
- yesod-fay-0.10.0
and to package.yaml as dependencies:
dependencies:
... more dependencies ...
- fay == 0.24.0.3
- fay-base == 0.21.1.1
- fay-dom == 0.5.0.1
- fay-text == 0.3.2.2
- yesod-fay == 0.10.0
Fay packages are in the local package database:
$ stack exec -- ghc-pkg list
/opt/ghc/8.6.5/lib/ghc-8.6.5/package.conf.d
Cabal-2.4.0.1
array-0.5.3.0
base-4.12.0.0
...
/home/user/.stack/snapshots/x86_64-linux-dkda49f7ca9b244180d3cfb1987cbc9743/lts-13.30/8.6.5/pkgdb
Cabal-2.4.1.0
Diff-0.3.4
HUnit-1.6.0.0
...
yesod-1.6.0
yesod-core-1.6.14
yesod-form-1.6.5
yesod-newsfeed-1.6.1.0
yesod-persistent-1.6.0.2
yesod-static-1.6.0.1
/home/user/code/myproject/.stack-work/install/x86_64-linux-dkda49f7ca9b244180d3cfb1987cbc9743/lts-13.30/8.6.5/pkgdb
fay-0.24.0.3
fay-base-0.21.1.1
fay-dom-0.5.0.1
fay-text-0.3.2.2
yesod-fay-0.10.0
However trying to set HASKELL_PACKAGE_SANDBOX to the local database as Fay Troubleshooting suggests doesn't work, because sandboxes containing the string .stack are ignored in yesod-fay.
If I remove that check from yesod-fay and force the --package-db to point to the local database, it still doesn't work, complains that fay-base can't find the fay package.
$ stack build
/home/user/code/myproject/src/Handler/Home.hs:121:13: error:
• Exception when trying to run compile-time code:
Unable to compile Fay module "HelloWorld":
ghc: <command line>: cannot satisfy -package fay-base-0.21.1.1:
fay-base-0.21.1.1-91eIy2f24Wa5OHg9LMre7 is unusable due to missing dependencies:
fay-0.24.0.3-CdLcUWVJEOpLCiYHkNVTai
(use -v for more information)
CallStack (from HasCallStack):
error, called at ./Yesod/Fay.hs:483:3 in yesod-fay-0.10.9999-CzTT9fyZ6636pi0gIof7Ge:Yesod.Fay
Code: fayFile' (ConE 'StaticR) "HelloWorld"
• In the untyped splice: $(fayFile' (ConE 'StaticR) "HelloWorld")
|
121 | $( fayFile' (ConE 'StaticR) "HelloWorld" )
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Update: not using satck or cabal and using packages that are installed system-wide, this error doesn't occur. I guess the problem is in my local stack package database (the one in .stack-work)
I concluded that fay doesn't work with stack.

stack build fails with "Failed to load interface for `Main' no unit id matching `main' was found"

I've been trying to change a project to also provide a library (previous it was just an executable).
The only change has been (to the hpack package.yaml):
+library:
+ source-dirs: src
+ exposed-modules:
+ - CYAva
However now when running stack build I see output of:
2018-12-31 16:32:06.406901: [warn] Failed to load interface for `Main'
2018-12-31 16:32:06.407023: [warn] no unit id matching `main' was found
hpack file:
library:
source-dirs: src
exposed-modules:
- CYAva
executable:
source-dirs: src
main: Main.hs
license-file: LICENSE
build-type: Simple
maintainer: Chris Stryczynski
dependencies:
- base >=4.10 && <4.12
- colour
- data-default-class
# common
- Chart-cairo
- Chart
- lens
- aeson
- bytestring
- stm
- split
- text
- time
- thyme
- binary
- binary-orphans
- old-locale
- directory
- pretty-simple
- string-conversions
- optparse-applicative
name: ceriumyankeeavocado
version: '0.1.0.0'
extra-source-files: ChangeLog.md
author: Chris Stryczynski
license: BSD3
cabal file:
cabal-version: 1.12
-- This file has been generated from package.yaml by hpack version 0.31.1.
--
-- see: https://github.com/sol/hpack
--
-- hash: d90f1b53fc8bb74ddff9cf98937222e0c38a20affcd2506880039312e549541f
name: ceriumyankeeavocado
version: 0.1.0.0
author: Chris Stryczynski
maintainer: Chris Stryczynski
license: BSD3
license-file: LICENSE
build-type: Simple
extra-source-files:
ChangeLog.md
library
exposed-modules:
CYAva
other-modules:
Main
Paths_ceriumyankeeavocado
hs-source-dirs:
src
build-depends:
Chart
, Chart-cairo
, aeson
, base >=4.10 && <4.12
, binary
, binary-orphans
, bytestring
, colour
, data-default-class
, directory
, lens
, old-locale
, optparse-applicative
, pretty-simple
, split
, stm
, string-conversions
, text
, thyme
, time
default-language: Haskell2010
executable ceriumyankeeavocado
main-is: Main.hs
other-modules:
CYAva
Paths_ceriumyankeeavocado
hs-source-dirs:
src
build-depends:
Chart
, Chart-cairo
, aeson
, base >=4.10 && <4.12
, binary
, binary-orphans
, bytestring
, colour
, data-default-class
, directory
, lens
, old-locale
, optparse-applicative
, pretty-simple
, split
, stm
, string-conversions
, text
, thyme
, time
default-language: Haskell2010
stack build
thyme-0.3.5.5: configure
thyme-0.3.5.5: build
Chart-1.9: configure
Chart-1.9: build
Chart-1.9: copy/register
Chart-cairo-1.9: configure
Chart-cairo-1.9: build
Chart-cairo-1.9: copy/register
thyme-0.3.5.5: copy/register
Building all executables for `ceriumyankeeavocado' once. After a successful build of all of them, only specified executables will be rebuilt.
ceriumyankeeavocado-0.1.0.0: configure (lib + exe)
Configuring ceriumyankeeavocado-0.1.0.0...
ceriumyankeeavocado-0.1.0.0: build (lib + exe)
Preprocessing executable 'ceriumyankeeavocado' for ceriumyankeeavocado-0.1.0.0..
Building executable 'ceriumyankeeavocado' for ceriumyankeeavocado-0.1.0.0..
[1 of 3] Compiling CYAva ( src/CYAva.hs, .stack-work/dist/x86_64-linux-nix/Cabal-2.2.0.1/build/ceriumyankeeavocado/ceriumyankeeavocado-tmp/CYAva.o )
[2 of 3] Compiling Main ( src/Main.hs, .stack-work/dist/x86_64-linux-nix/Cabal-2.2.0.1/build/ceriumyankeeavocado/ceriumyankeeavocado-tmp/Main.o )
[3 of 3] Compiling Paths_ceriumyankeeavocado ( .stack-work/dist/x86_64-linux-nix/Cabal-2.2.0.1/build/ceriumyankeeavocado/autogen/Paths_ceriumyankeeavocado.hs, .stack-work/dist/x86_64-linux-nix/Cabal-2.2.0.1/build/ceriumyankeeavocado/ceriumyankeeavocado-tmp/Paths_ceriumyankeeavocado.o )
Linking .stack-work/dist/x86_64-linux-nix/Cabal-2.2.0.1/build/ceriumyankeeavocado/ceriumyankeeavocado ...
Preprocessing library for ceriumyankeeavocado-0.1.0.0..
Building library for ceriumyankeeavocado-0.1.0.0..
[1 of 3] Compiling CYAva ( src/CYAva.hs, .stack-work/dist/x86_64-linux-nix/Cabal-2.2.0.1/build/CYAva.o )
[2 of 3] Compiling Main ( src/Main.hs, .stack-work/dist/x86_64-linux-nix/Cabal-2.2.0.1/build/Main.o )
Failed to load interface for `Main'
no unit id matching `main' was found
Completed 4 action(s).
-- While building package ceriumyankeeavocado-0.1.0.0 using:
/home/chris/.stack/setup-exe-cache/x86_64-linux-nix/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-linux-nix/Cabal-2.2.0.1 build lib:ceriumyankeeavocado exe:ceriumyankeeavocado --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
I did not have the following in my Main.hs file:
module Main where
The above changed fixed it..

Problems updating cabal-install v. 1.20.0.3

Problems updating cabal-install v. 1.20.0.3
The following is what I made
C:\Windows\system32>cabal update
Downloading the latest package list from hackage.haskell.org
Note: there is a new version of cabal-install available.
To upgrade, run: cabal install cabal-install
C:\Windows\system32>cabal install cabal-install
Resolving dependencies...
Configuring network-2.6.0.2...
cabal: The package has a './configure' script. This requires a Unix
compatibility toolchain such as MinGW+MSYS or Cygwin.
Failed to install network-2.6.0.2
cabal: Error: some packages failed to install:
HTTP-4000.2.19 depends on network-2.6.0.2 which failed to install.
cabal-install-1.20.0.4 depends on network-2.6.0.2 which failed to install.
network-2.6.0.2 failed during the configure step. The exception was:
ExitFailure 1
C:\Windows\system32>cabal --v
cabal-install version 1.20.0.3
using version 1.20.0.2 of the Cabal library
After these messages I installed Cygwin64 and tried to reinstall "cabal-install", but nothing changed.
What can I do now? Thank you for your help.
CABAL INFO NETWORK
$ cabal info network
* network (library)
Synopsis: Low-level networking interface
Versions available: 2.3.2.0, 2.4.1.2, 2.4.2.1, 2.4.2.2, 2.4.2.3, 2.5.0.0,
2.6.0.0, 2.6.0.1, 2.6.0.2 (and 39 others)
Versions installed: 2.4.2.3, 2.6.0.2
Homepage: https://github.com/haskell/network
Bug reports: https://github.com/haskell/network/issues
Description: This package provides a low-level networking interface.
In network-2.6 the #Network.URI# module was split off into
its own package, network-uri-2.6. If you're using the
#Network.URI# module you can automatically get it from the
right package by adding this to your .cabal file:
> flag network-uri > description: Get Network.URI from the
network-uri package > default: True > > library > -- ... > if
flag(network-uri) > build-depends: network-uri >= 2.6,
network >= 2.6 > else > build-depends: network-uri < 2.6,
network < 2.6
That is, get the module from either network < 2.6 or from
network-uri >= 2.6.
Category: Network
License: BSD3
Maintainer: Johan Tibell <johan.tibell#gmail.com>
Source repo: git://github.com/haskell/network.git
Dependencies: base >=3 && <5, bytestring <0.11, unix >=2,
test-framework-hunit -any, test-framework -any, network -any,
HUnit -any, bytestring -any, base <5,
test-framework-hunit -any, test-framework -any, network -any,
HUnit -any, bytestring -any, base <5
Documentation: [ Not installed ]
Cached: Yes
Modules:
Network
Network.BSD
Network.Socket
Network.Socket.ByteString
Network.Socket.ByteString.Lazy
Network.Socket.Internal
Following the latest instructions i tried:
I tried:
C:\Windows\system32>cabal install cabal-install --constraint="network==2.4.2.3"
...
Linking dist\build\cabal\cabal.exe ...
Installing executable(s) in C:\Users\Alberto\AppData\Roaming\cabal\bin
Installed cabal-install-1.20.0.4
C:\Windows\system32>cabal --v
cabal-install version 1.20.0.4
using version 1.20.0.2 of the Cabal library
Instead with: cabal install cabal-install -v --constraint="network==2.6.0.2"
These are the last lines:
c:/program files/haskell platform/2014.2.0.0/mingw/bin/../lib/gcc/x86_64-w64-min
gw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: final link failed: Invalid
operation
collect2: ld returned 1 exit status
Failed to install cabal-install-1.20.0.4
World file is already up to date.
cabal: Error: some packages failed to install:
cabal-install-1.20.0.4 failed during the building phase. The exception was:
ExitFailure 1
The following is the incomplete version of the verbose process. (Incomplete because the Command Prompt window is too little to contain all the lines.) And also the "Body" of this post is "limited to 30000 characters" and I entered 43408.
Linking...
C:\Program Files\Haskell Platform\2014.2.0.0\bin\ghc.exe --make -fbuilding-cabal
-package -O -static -outputdir dist\build\cabal\cabal-tmp -odir dist\build\cabal
\cabal-tmp -hidir dist\build\cabal\cabal-tmp -stubdir dist\build\cabal\cabal-tmp
-i -idist\build\cabal\cabal-tmp -i. -idist\build\autogen -Idist\build\autogen -
Idist\build\cabal\cabal-tmp -optP-DWIN32 -optP-include -optPdist\build\autogen\c
abal_macros.h -hide-all-packages -package-db dist\package.conf.inplace -package-
id Cabal-1.20.0.2-2d0d4b50a80873bd77d7619acdc39282 -package-id HTTP-4000.2.19-a3
b06338bfc05de6b2dff745ab78e8e2 -package-id Win32-2.3.0.2-698249828064ce7d3e73140
6aa0b6536 -package-id array-0.5.0.0-a620a6e52b09b01c2ee52fdc2f35ba14 -package-id
base-4.7.0.1-7c4827d45272c6220486aa798a981cbc -package-id bytestring-0.10.4.0-0
168d7fce99b3d6589c7684c734053d4 -package-id containers-0.5.5.1-08015588ba3fe884f
62b392b72b7a17f -package-id directory-1.2.1.0-8cccd8e1806d43153b63c8c02500965e -
package-id filepath-1.3.0.2-a4d1d9ee29199e7f421cb1e2eeca7b3c -package-id mtl-2.1
.3.1-045b529925f92141fbca5a09ccb76887 -package-id network-2.6.0.2-cd717cc95784d3
d2c843373d48659787 -package-id network-uri-2.6.0.1-474d71b66fbfc5e5890f880a23bc7
62f -package-id pretty-1.1.1.1-c695907dd1419865c9783baf249b36b0 -package-id proc
ess-1.2.0.0-8428b2db1fb32008b84b305e3dcf61f8 -package-id random-1.0.1.1-1c39aaa7
8f370b133a79ccf1ef25922b -package-id stm-2.4.2-6e8cfbcce8457ecf64e4555b5e253ae6
-package-id time-1.4.2-10261674b91c0791587926806ccad1bb -package-id zlib-0.5.4.1
-28702d80c2a2842f8db883ae46443522 -XHaskell98 .\Main.hs dist\build\cabal\cabal-t
mp\cbits/getnumcores.o -o dist\build\cabal\cabal.exe -Wall -fwarn-tabs -threaded
Linking dist\build\cabal\cabal.exe ...
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x26a6): undefined reference to `shutdow
nWinSock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x2fae): undefined reference to `shutdow
nWinSock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x300b): undefined reference to `initWin
Sock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x3156): undefined reference to `shutdow
nWinSock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x393e): undefined reference to `shutdow
nWinSock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x399b): undefined reference to `initWin
Sock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x3ade): undefined reference to `shutdow
nWinSock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x4336): undefined reference to `shutdow
nWinSock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x4393): undefined reference to `initWin
Sock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x44d6): undefined reference to `shutdow
nWinSock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x4c8e): undefined reference to `shutdow
nWinSock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x4ceb): undefined reference to `initWin
Sock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x4e36): undefined reference to `shutdow
nWinSock'
c:/program files/haskell platform/2014.2.0.0/mingw/bin/../lib/gcc/x86_64-w64-min
gw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Alberto\AppData\R
oaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/libHSHTTP-4000.2.19.a(TCP.o
): bad reloc address 0x0 in section `.data'
c:/program files/haskell platform/2014.2.0.0/mingw/bin/../lib/gcc/x86_64-w64-min
gw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: final link failed: Invalid
operation
collect2: ld returned 1 exit status
Failed to install cabal-install-1.20.0.4
World file is already up to date.
cabal: Error: some packages failed to install:
cabal-install-1.20.0.4 failed during the building phase. The exception was:
ExitFailure 1
cabal install cabal-install -v --constraint="network==2.6.0.2"
[17 of 76] Compiling Distribution.Client.Types ( Distribution\Client\Types.hs, d
ist\build\cabal\cabal-tmp\Distribution\Client\Types.o )
[18 of 76] Compiling Distribution.Client.Dependency.Modular.Flag ( Distribution\
Client\Dependency\Modular\Flag.hs, dist\build\cabal\cabal-tmp\Distribution\Clien
t\Dependency\Modular\Flag.o )
[19 of 76] Compiling Distribution.Client.Dependency.Modular.Dependency ( Distrib
ution\Client\Dependency\Modular\Dependency.hs, dist\build\cabal\cabal-tmp\Distri
bution\Client\Dependency\Modular\Dependency.o )
[20 of 76] Compiling Distribution.Client.Dependency.Modular.Tree ( Distribution\
Client\Dependency\Modular\Tree.hs, dist\build\cabal\cabal-tmp\Distribution\Clien
t\Dependency\Modular\Tree.o )
[21 of 76] Compiling Distribution.Client.Dependency.Modular.Index ( Distribution
\Client\Dependency\Modular\Index.hs, dist\build\cabal\cabal-tmp\Distribution\Cli
ent\Dependency\Modular\Index.o )
[22 of 76] Compiling Distribution.Client.Dependency.Modular.Builder ( Distributi
on\Client\Dependency\Modular\Builder.hs, dist\build\cabal\cabal-tmp\Distribution
\Client\Dependency\Modular\Builder.o )
[23 of 76] Compiling Distribution.Client.Dependency.Modular.Message ( Distributi
on\Client\Dependency\Modular\Message.hs, dist\build\cabal\cabal-tmp\Distribution
\Client\Dependency\Modular\Message.o )
[24 of 76] Compiling Distribution.Client.Dependency.Modular.Configured ( Distrib
ution\Client\Dependency\Modular\Configured.hs, dist\build\cabal\cabal-tmp\Distri
bution\Client\Dependency\Modular\Configured.o )
[25 of 76] Compiling Distribution.Client.Dependency.Modular.Assignment ( Distrib
ution\Client\Dependency\Modular\Assignment.hs, dist\build\cabal\cabal-tmp\Distri
bution\Client\Dependency\Modular\Assignment.o )
[26 of 76] Compiling Distribution.Client.Dependency.Modular.Validate ( Distribut
ion\Client\Dependency\Modular\Validate.hs, dist\build\cabal\cabal-tmp\Distributi
on\Client\Dependency\Modular\Validate.o )
[27 of 76] Compiling Distribution.Client.Dependency.TopDown.Types ( Distribution
\Client\Dependency\TopDown\Types.hs, dist\build\cabal\cabal-tmp\Distribution\Cli
ent\Dependency\TopDown\Types.o )
[28 of 76] Compiling Distribution.Client.Dependency.Modular.IndexConversion ( Di
stribution\Client\Dependency\Modular\IndexConversion.hs, dist\build\cabal\cabal-
tmp\Distribution\Client\Dependency\Modular\IndexConversion.o )
[29 of 76] Compiling Distribution.Client.Init.Licenses ( Distribution\Client\Ini
t\Licenses.hs, dist\build\cabal\cabal-tmp\Distribution\Client\Init\Licenses.o )
[30 of 76] Compiling Distribution.Client.Init.Types ( Distribution\Client\Init\T
ypes.hs, dist\build\cabal\cabal-tmp\Distribution\Client\Init\Types.o )
[31 of 76] Compiling Distribution.Client.Compat.Time ( Distribution\Client\Compa
t\Time.hs, dist\build\cabal\cabal-tmp\Distribution\Client\Compat\Time.o )
Distribution\Client\Compat\Time.hs:27:1: Warning:
the 'stdcall' calling convention is unsupported on this platform,
treating as ccall
When checking declaration:
foreign import stdcall safe "static windows.h GetFileAttributesExW" c_getF
ileAttributesEx
:: LPCTSTR -> Int32 -> LPVOID -> IO BOOL
Distribution\Client\Compat\Time.hs:90:62: Warning:
In the use of `bitSize' (imported from Data.Bits):
Deprecated: "Use 'bitSizeMaybe' or 'finiteBitSize' instead"
[32 of 76] Compiling Distribution.Client.Tar ( Distribution\Client\Tar.hs, dist\
build\cabal\cabal-tmp\Distribution\Client\Tar.o )
[33 of 76] Compiling Paths_cabal_install ( dist\build\autogen\Paths_cabal_instal
l.hs, dist\build\cabal\cabal-tmp\Paths_cabal_install.o )
[34 of 76] Compiling Distribution.Client.HttpUtils ( Distribution\Client\HttpUti
ls.hs, dist\build\cabal\cabal-tmp\Distribution\Client\HttpUtils.o )
[35 of 76] Compiling Distribution.Client.FetchUtils ( Distribution\Client\FetchU
tils.hs, dist\build\cabal\cabal-tmp\Distribution\Client\FetchUtils.o )
[36 of 76] Compiling Distribution.Client.Utils ( Distribution\Client\Utils.hs, d
ist\build\cabal\cabal-tmp\Distribution\Client\Utils.o )
[37 of 76] Compiling Distribution.Client.Init.Heuristics ( Distribution\Client\I
nit\Heuristics.hs, dist\build\cabal\cabal-tmp\Distribution\Client\Init\Heuristic
s.o )
[38 of 76] Compiling Distribution.Client.IndexUtils ( Distribution\Client\IndexU
tils.hs, dist\build\cabal\cabal-tmp\Distribution\Client\IndexUtils.o )
[39 of 76] Compiling Distribution.Client.Sandbox.Index ( Distribution\Client\San
dbox\Index.hs, dist\build\cabal\cabal-tmp\Distribution\Client\Sandbox\Index.o )
[40 of 76] Compiling Distribution.Client.InstallPlan ( Distribution\Client\Insta
llPlan.hs, dist\build\cabal\cabal-tmp\Distribution\Client\InstallPlan.o )
[41 of 76] Compiling Distribution.Client.Dependency.Types ( Distribution\Client\
Dependency\Types.hs, dist\build\cabal\cabal-tmp\Distribution\Client\Dependency\T
ypes.o )
[42 of 76] Compiling Distribution.Client.Dependency.Modular.Log ( Distribution\C
lient\Dependency\Modular\Log.hs, dist\build\cabal\cabal-tmp\Distribution\Client\
Dependency\Modular\Log.o )
[43 of 76] Compiling Distribution.Client.Dependency.Modular.Explore ( Distributi
on\Client\Dependency\Modular\Explore.hs, dist\build\cabal\cabal-tmp\Distribution
\Client\Dependency\Modular\Explore.o )
[44 of 76] Compiling Distribution.Client.Dependency.Modular.Preference ( Distrib
ution\Client\Dependency\Modular\Preference.hs, dist\build\cabal\cabal-tmp\Distri
bution\Client\Dependency\Modular\Preference.o )
[45 of 76] Compiling Distribution.Client.Dependency.Modular.Solver ( Distributio
n\Client\Dependency\Modular\Solver.hs, dist\build\cabal\cabal-tmp\Distribution\C
lient\Dependency\Modular\Solver.o )
[46 of 76] Compiling Distribution.Client.Dependency.Modular.ConfiguredConversion
( Distribution\Client\Dependency\Modular\ConfiguredConversion.hs, dist\build\ca
bal\cabal-tmp\Distribution\Client\Dependency\Modular\ConfiguredConversion.o )
[47 of 76] Compiling Distribution.Client.Dependency.Modular ( Distribution\Clien
t\Dependency\Modular.hs, dist\build\cabal\cabal-tmp\Distribution\Client\Dependen
cy\Modular.o )
[48 of 76] Compiling Distribution.Client.BuildReports.Anonymous ( Distribution\C
lient\BuildReports\Anonymous.hs, dist\build\cabal\cabal-tmp\Distribution\Client\
BuildReports\Anonymous.o )
[49 of 76] Compiling Distribution.Client.BuildReports.Storage ( Distribution\Cli
ent\BuildReports\Storage.hs, dist\build\cabal\cabal-tmp\Distribution\Client\Buil
dReports\Storage.o )
[50 of 76] Compiling Distribution.Client.BuildReports.Upload ( Distribution\Clie
nt\BuildReports\Upload.hs, dist\build\cabal\cabal-tmp\Distribution\Client\BuildR
eports\Upload.o )
[51 of 76] Compiling Distribution.Client.Dependency.TopDown.Constraints ( Distri
bution\Client\Dependency\TopDown\Constraints.hs, dist\build\cabal\cabal-tmp\Dist
ribution\Client\Dependency\TopDown\Constraints.o )
[52 of 76] Compiling Distribution.Client.Dependency.TopDown ( Distribution\Clien
t\Dependency\TopDown.hs, dist\build\cabal\cabal-tmp\Distribution\Client\Dependen
cy\TopDown.o )
[53 of 76] Compiling Distribution.Client.Win32SelfUpgrade ( Distribution\Client\
Win32SelfUpgrade.hs, dist\build\cabal\cabal-tmp\Distribution\Client\Win32SelfUpg
rade.o )
Distribution\Client\Win32SelfUpgrade.hs:48:1: Warning:
The qualified import of `System.Win32.DLL' is redundant
except perhaps to import instances from `System.Win32.DLL'
To import instances alone, use: import System.Win32.DLL()
Distribution\Client\Win32SelfUpgrade.hs:164:1: Warning:
the 'stdcall' calling convention is unsupported on this platform,
treating as ccall
When checking declaration:
foreign import stdcall unsafe "static windows.h GetCurrentProcessId" getCu
rrentProcessId
:: IO DWORD
Distribution\Client\Win32SelfUpgrade.hs:167:1: Warning:
the 'stdcall' calling convention is unsupported on this platform,
treating as ccall
When checking declaration:
foreign import stdcall unsafe "static windows.h WaitForSingleObject" waitF
orSingleObject_
:: HANDLE -> DWORD -> IO DWORD
Distribution\Client\Win32SelfUpgrade.hs:178:1: Warning:
the 'stdcall' calling convention is unsupported on this platform,
treating as ccall
When checking declaration:
foreign import stdcall unsafe "static windows.h CreateEventW" createEvent_
:: Ptr () -> BOOL -> BOOL -> LPCTSTR -> IO HANDLE
Distribution\Client\Win32SelfUpgrade.hs:187:1: Warning:
the 'stdcall' calling convention is unsupported on this platform,
treating as ccall
When checking declaration:
foreign import stdcall unsafe "static windows.h OpenEventW" openEvent_
:: DWORD -> BOOL -> LPCTSTR -> IO HANDLE
Distribution\Client\Win32SelfUpgrade.hs:199:1: Warning:
the 'stdcall' calling convention is unsupported on this platform,
treating as ccall
When checking declaration:
foreign import stdcall unsafe "static windows.h SetEvent" setEvent_
:: HANDLE -> IO BOOL
[54 of 76] Compiling Distribution.Client.Init ( Distribution\Client\Init.hs, dis
t\build\cabal\cabal-tmp\Distribution\Client\Init.o )
[55 of 76] Compiling Distribution.Client.Sandbox.Types ( Distribution\Client\San
dbox\Types.hs, dist\build\cabal\cabal-tmp\Distribution\Client\Sandbox\Types.o )
[56 of 76] Compiling Distribution.Client.Run ( Distribution\Client\Run.hs, dist\
build\cabal\cabal-tmp\Distribution\Client\Run.o )
[57 of 76] Compiling Distribution.Client.Check ( Distribution\Client\Check.hs, d
ist\build\cabal\cabal-tmp\Distribution\Client\Check.o )
[58 of 76] Compiling Distribution.Client.Update ( Distribution\Client\Update.hs,
dist\build\cabal\cabal-tmp\Distribution\Client\Update.o )
[59 of 76] Compiling Distribution.Client.Targets ( Distribution\Client\Targets.h
s, dist\build\cabal\cabal-tmp\Distribution\Client\Targets.o )
[60 of 76] Compiling Distribution.Client.Dependency ( Distribution\Client\Depend
ency.hs, dist\build\cabal\cabal-tmp\Distribution\Client\Dependency.o )
[61 of 76] Compiling Distribution.Client.Setup ( Distribution\Client\Setup.hs, d
ist\build\cabal\cabal-tmp\Distribution\Client\Setup.o )
[62 of 76] Compiling Distribution.Client.Config ( Distribution\Client\Config.hs,
dist\build\cabal\cabal-tmp\Distribution\Client\Config.o )
[63 of 76] Compiling Distribution.Client.SetupWrapper ( Distribution\Client\Setu
pWrapper.hs, dist\build\cabal\cabal-tmp\Distribution\Client\SetupWrapper.o )
[64 of 76] Compiling Distribution.Client.Sandbox.Timestamp ( Distribution\Client
\Sandbox\Timestamp.hs, dist\build\cabal\cabal-tmp\Distribution\Client\Sandbox\Ti
mestamp.o )
[65 of 76] Compiling Distribution.Client.Upload ( Distribution\Client\Upload.hs,
dist\build\cabal\cabal-tmp\Distribution\Client\Upload.o )
[66 of 76] Compiling Distribution.Client.List ( Distribution\Client\List.hs, dis
t\build\cabal\cabal-tmp\Distribution\Client\List.o )
[67 of 76] Compiling Distribution.Client.Configure ( Distribution\Client\Configu
re.hs, dist\build\cabal\cabal-tmp\Distribution\Client\Configure.o )
[68 of 76] Compiling Distribution.Client.Fetch ( Distribution\Client\Fetch.hs, d
ist\build\cabal\cabal-tmp\Distribution\Client\Fetch.o )
[69 of 76] Compiling Distribution.Client.SrcDist ( Distribution\Client\SrcDist.h
s, dist\build\cabal\cabal-tmp\Distribution\Client\SrcDist.o )
[70 of 76] Compiling Distribution.Client.Get ( Distribution\Client\Get.hs, dist\
build\cabal\cabal-tmp\Distribution\Client\Get.o )
[71 of 76] Compiling Distribution.Client.Sandbox.PackageEnvironment ( Distributi
on\Client\Sandbox\PackageEnvironment.hs, dist\build\cabal\cabal-tmp\Distribution
\Client\Sandbox\PackageEnvironment.o )
[72 of 76] Compiling Distribution.Client.Freeze ( Distribution\Client\Freeze.hs,
dist\build\cabal\cabal-tmp\Distribution\Client\Freeze.o )
[73 of 76] Compiling Distribution.Client.InstallSymlink ( Distribution\Client\In
stallSymlink.hs, dist\build\cabal\cabal-tmp\Distribution\Client\InstallSymlink.o
)
[74 of 76] Compiling Distribution.Client.Install ( Distribution\Client\Install.h
s, dist\build\cabal\cabal-tmp\Distribution\Client\Install.o )
[75 of 76] Compiling Distribution.Client.Sandbox ( Distribution\Client\Sandbox.h
s, dist\build\cabal\cabal-tmp\Distribution\Client\Sandbox.o )
[76 of 76] Compiling Main ( Main.hs, dist\build\cabal\cabal-tmp\Main
.o )
Building C Sources...
creating dist\build\cabal\cabal-tmp
C:\Program Files\Haskell Platform\2014.2.0.0\bin\ghc.exe -c -static -odir dist\b
uild\cabal\cabal-tmp -Idist\build\autogen -Idist\build\cabal\cabal-tmp -optc-O2
-package-db dist\package.conf.inplace -package-id Cabal-1.20.0.2-2d0d4b50a80873b
d77d7619acdc39282 -package-id HTTP-4000.2.19-a3b06338bfc05de6b2dff745ab78e8e2 -p
ackage-id Win32-2.3.0.2-698249828064ce7d3e731406aa0b6536 -package-id array-0.5.0
.0-a620a6e52b09b01c2ee52fdc2f35ba14 -package-id base-4.7.0.1-7c4827d45272c622048
6aa798a981cbc -package-id bytestring-0.10.4.0-0168d7fce99b3d6589c7684c734053d4 -
package-id containers-0.5.5.1-08015588ba3fe884f62b392b72b7a17f -package-id direc
tory-1.2.1.0-8cccd8e1806d43153b63c8c02500965e -package-id filepath-1.3.0.2-a4d1d
9ee29199e7f421cb1e2eeca7b3c -package-id mtl-2.1.3.1-045b529925f92141fbca5a09ccb7
6887 -package-id network-2.6.0.2-cd717cc95784d3d2c843373d48659787 -package-id ne
twork-uri-2.6.0.1-474d71b66fbfc5e5890f880a23bc762f -package-id pretty-1.1.1.1-c6
95907dd1419865c9783baf249b36b0 -package-id process-1.2.0.0-8428b2db1fb32008b84b3
05e3dcf61f8 -package-id random-1.0.1.1-1c39aaa78f370b133a79ccf1ef25922b -package
-id stm-2.4.2-6e8cfbcce8457ecf64e4555b5e253ae6 -package-id time-1.4.2-10261674b9
1c0791587926806ccad1bb -package-id zlib-0.5.4.1-28702d80c2a2842f8db883ae46443522
cbits/getnumcores.c
Linking...
C:\Program Files\Haskell Platform\2014.2.0.0\bin\ghc.exe --make -fbuilding-cabal
-package -O -static -outputdir dist\build\cabal\cabal-tmp -odir dist\build\cabal
\cabal-tmp -hidir dist\build\cabal\cabal-tmp -stubdir dist\build\cabal\cabal-tmp
-i -idist\build\cabal\cabal-tmp -i. -idist\build\autogen -Idist\build\autogen -
Idist\build\cabal\cabal-tmp -optP-DWIN32 -optP-include -optPdist\build\autogen\c
abal_macros.h -hide-all-packages -package-db dist\package.conf.inplace -package-
id Cabal-1.20.0.2-2d0d4b50a80873bd77d7619acdc39282 -package-id HTTP-4000.2.19-a3
b06338bfc05de6b2dff745ab78e8e2 -package-id Win32-2.3.0.2-698249828064ce7d3e73140
6aa0b6536 -package-id array-0.5.0.0-a620a6e52b09b01c2ee52fdc2f35ba14 -package-id
base-4.7.0.1-7c4827d45272c6220486aa798a981cbc -package-id bytestring-0.10.4.0-0
168d7fce99b3d6589c7684c734053d4 -package-id containers-0.5.5.1-08015588ba3fe884f
62b392b72b7a17f -package-id directory-1.2.1.0-8cccd8e1806d43153b63c8c02500965e -
package-id filepath-1.3.0.2-a4d1d9ee29199e7f421cb1e2eeca7b3c -package-id mtl-2.1
.3.1-045b529925f92141fbca5a09ccb76887 -package-id network-2.6.0.2-cd717cc95784d3
d2c843373d48659787 -package-id network-uri-2.6.0.1-474d71b66fbfc5e5890f880a23bc7
62f -package-id pretty-1.1.1.1-c695907dd1419865c9783baf249b36b0 -package-id proc
ess-1.2.0.0-8428b2db1fb32008b84b305e3dcf61f8 -package-id random-1.0.1.1-1c39aaa7
8f370b133a79ccf1ef25922b -package-id stm-2.4.2-6e8cfbcce8457ecf64e4555b5e253ae6
-package-id time-1.4.2-10261674b91c0791587926806ccad1bb -package-id zlib-0.5.4.1
-28702d80c2a2842f8db883ae46443522 -XHaskell98 .\Main.hs dist\build\cabal\cabal-t
mp\cbits/getnumcores.o -o dist\build\cabal\cabal.exe -Wall -fwarn-tabs -threaded
Linking dist\build\cabal\cabal.exe ...
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x26a6): undefined reference to `shutdow
nWinSock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x2fae): undefined reference to `shutdow
nWinSock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x300b): undefined reference to `initWin
Sock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x3156): undefined reference to `shutdow
nWinSock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x393e): undefined reference to `shutdow
nWinSock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x399b): undefined reference to `initWin
Sock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x3ade): undefined reference to `shutdow
nWinSock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x4336): undefined reference to `shutdow
nWinSock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x4393): undefined reference to `initWin
Sock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x44d6): undefined reference to `shutdow
nWinSock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x4c8e): undefined reference to `shutdow
nWinSock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x4ceb): undefined reference to `initWin
Sock'
C:\Users\Alberto\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/l
ibHSHTTP-4000.2.19.a(TCP.o):fake:(.text+0x4e36): undefined reference to `shutdow
nWinSock'
c:/program files/haskell platform/2014.2.0.0/mingw/bin/../lib/gcc/x86_64-w64-min
gw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Alberto\AppData\R
oaming\cabal\x86_64-windows-ghc-7.8.3\HTTP-4000.2.19/libHSHTTP-4000.2.19.a(TCP.o
): bad reloc address 0x0 in section `.data'
c:/program files/haskell platform/2014.2.0.0/mingw/bin/../lib/gcc/x86_64-w64-min
gw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: final link failed: Invalid
operation
collect2: ld returned 1 exit status
Failed to install cabal-install-1.20.0.4
World file is already up to date.
cabal: Error: some packages failed to install:
cabal-install-1.20.0.4 failed during the building phase. The exception was:
ExitFailure 1

Haskell - Packaging cabal package with custom preprocessors

I've implemented a custom preprocessor which creates *.hs files form *.tpl files. It is specified in Setup.hs by using a Build-Type: Custom. Everything works fine, but I can't create tar.gz package from it (using cabal sdist).
Cabal complains, that it can not find the exposed modules which are generated by the preprocessor. The error message is
cabal: Error: Could not find module with any
suffix: ["gc","chs","hsc","x","y","ly","cpphs","hs","lhs"]
How can I make Cabal aware of the fact that the module is not missing, or maybe add tpl to the known file extensions, or something?
This is a known issue with cabal sdist. Use ./dist/setup/setup sdist instead.
Here's an example:
$ cat preprocessor-test.cabal
name: preprocessor-test
version: 0.1.0.0
build-type: Custom
cabal-version: >=1.10
extra-source-files: PreprocessorTest/*.prepro
library
exposed-modules: PreprocessorTest.PreprocessorTest
build-depends: base ==4.5.*
-- hs-source-dirs:
default-language: Haskell2010
$ cat Setup.hs
#!/usr/bin/env runhaskell
import Distribution.Simple
import Distribution.Simple.PreProcess
import Distribution.Simple.Utils
import Distribution.PackageDescription
import Distribution.Simple.LocalBuildInfo
import System.Cmd (rawSystem)
import System.FilePath ((</>))
main = let hooks = simpleUserHooks
dummy = ("prepro", dummyPreprocessor)
in defaultMainWithHooks hooks
{ hookedPreProcessors = dummy:knownSuffixHandlers }
dummyPreprocessor :: BuildInfo -> LocalBuildInfo -> PreProcessor
dummyPreprocessor build local = PreProcessor {
platformIndependent = True,
runPreProcessor =
mkSimplePreProcessor $ \inFile outFile verbosity -> do
notice verbosity (inFile ++ " is being preprocessed to " ++ outFile)
rawSystem "cp" [inFile, outFile]
return ()
}
$ cat PreprocessorTest/PreprocessorTest.prepro
module PreprocessorTest.PreprocessorTest
where
preprocessorTest :: Int
preprocessorTest = 1
$ cabal configure
Resolving dependencies...
[1 of 1] Compiling Main ( Setup.hs, dist/setup/Main.o )
Linking ./dist/setup/setup ...
Configuring preprocessor-test-0.1.0.0...
$ cabal build
Building preprocessor-test-0.1.0.0...
Preprocessing library preprocessor-test-0.1.0.0...
PreprocessorTest/PreprocessorTest.prepro is being preprocessed to
dist/build/PreprocessorTest/PreprocessorTest.hs
[1 of 1] Compiling PreprocessorTest.PreprocessorTest ( dist/build/PreprocessorTest/PreprocessorTest.hs, dist/build/PreprocessorTest/PreprocessorTest.o )
Registering preprocessor-test-0.1.0.0...
$ ./dist/setup/setup sdist
Distribution quality errors:
No 'synopsis' or 'description' field.
The 'license' field is missing or specified as AllRightsReserved.
Distribution quality warnings:
No 'category' field.
No 'maintainer' field.
Note: the public hackage server would reject this package.
Building source dist for preprocessor-test-0.1.0.0...
Preprocessing library preprocessor-test-0.1.0.0...
PreprocessorTest/PreprocessorTest.prepro is being preprocessed to
dist/src/sdist.-6767/preprocessor-test-0.1.0.0/dist/build/PreprocessorTest/PreprocessorTest.hs
Source tarball created: dist/preprocessor-test-0.1.0.0.tar.gz
$ tar tzf dist/preprocessor-test-0.1.0.0.tar.gz
preprocessor-test-0.1.0.0/
preprocessor-test-0.1.0.0/dist/
preprocessor-test-0.1.0.0/dist/build/
preprocessor-test-0.1.0.0/dist/build/PreprocessorTest/
preprocessor-test-0.1.0.0/dist/build/PreprocessorTest/PreprocessorTest.hs
preprocessor-test-0.1.0.0/Setup.hs
preprocessor-test-0.1.0.0/PreprocessorTest/
preprocessor-test-0.1.0.0/PreprocessorTest/PreprocessorTest.prepro
preprocessor-test-0.1.0.0/preprocessor-test.cabal

yesod devel fail when starting development server

I was starting to read about Yesod and I tried to install it on my Linux Mint Maya 64-bit machine.
The haskell platform was already installed, I just installed the yesod-platform package with cabal install yesod-platform and all worked very well.
Next step was to call yesod init with respond to all the questions - the application name: test. The problems starts when I called yesod devel... here it is what I've got:
Yesod devel server. Press ENTER to quit
Resolving dependencies...
Configuring test-0.0.0...
Rebuilding application...
Building test-0.0.0...
Preprocessing library test-0.0.0...
Registering test-0.0.0...
Starting development server: runghc -package-confdist/package.conf.inplace devel.hs
devel.hs:2:1:
Failed to load interface for `Application'
It is not a module in the current program, or in any known package.
Exit code: ExitFailure 1
I'm a little bit lost with this issue - I made a lot of research related to it but I have no luck...
Can anyone help with this problem?
Here it is my ghc-pkg list:
/var/lib/ghc/package.conf.d:
Cabal-1.14.0
GLUT-2.1.2.1
HDBC-2.3.1.1
HDBC-odbc-2.2.3.0
HTTP-4000.2.2
HUnit-1.2.4.2
MonadCatchIO-mtl-0.3.0.4
OpenGL-2.2.3.1
QuickCheck-2.4.2
SHA-1.5.0.0
aeson-0.6.0.0
ansi-terminal-0.5.5
array-0.4.0.0
asn1-data-0.6.1.3
attoparsec-0.10.1.1
attoparsec-conduit-0.2.0
attoparsec-enumerator-0.3
authenticate-1.0.0.1
base-4.5.0.0
base-unicode-symbols-0.2.2.3
base64-bytestring-0.1.1.0
bin-package-db-0.0.0.0
binary-0.5.1.0
blaze-builder-0.3.1.0
blaze-builder-conduit-0.2.0
blaze-html-0.4.3.1
byteorder-1.0.3
bytestring-0.9.2.1
bytestring-lexing-0.4.0
case-insensitive-0.4.0.1
cereal-0.3.5.1
certificate-1.1.0
cgi-3001.1.8.2
clientsession-0.7.4.1
conduit-0.2.0
containers-0.4.2.1
convertible-1.0.11.0
cookie-0.4.0
cprng-aes-0.2.3
crypto-api-0.9
crypto-conduit-0.1.3.1
crypto-pubkey-types-0.1.0
cryptocipher-0.3.0
cryptohash-0.7.4
css-text-0.1.1
data-default-0.3.0
deepseq-1.3.0.0
directory-1.1.0.2
dlist-0.5
email-validate-0.2.8
entropy-0.2.1
enumerator-0.4.18
extensible-exceptions-0.1.1.4
failure-0.2.0
fast-logger-0.0.2
fgl-5.4.2.4
file-embed-0.0.4.1
filepath-1.3.0.0
(ghc-7.4.1)
ghc-prim-0.2.0.0
hamlet-0.10.8
hashable-1.1.2.3
haskell-src-1.0.1.5
(haskell2010-1.1.0.1)
(haskell98-2.0.0.1)
hjsmin-0.0.15
hoopl-3.8.7.3
hpc-0.5.1.1
html-1.0.1.2
http-conduit-1.2.5
http-date-0.0.2
http-types-0.6.9
integer-gmp-0.4.0.0
language-javascript-0.4.10
largeword-1.0.1
lifted-base-0.1.0.3
mime-mail-0.4.1.1
monad-control-0.3.1
mtl-2.0.1.0
network-2.3.0.10
old-locale-1.0.0.4
old-time-1.1.0.0
parallel-3.2.0.2
parsec-3.1.2
path-pieces-0.1.0
persistent-0.8.0.1
persistent-template-0.8.1.1
pool-conduit-0.0.0.1
pretty-1.1.1.0
primitive-0.4.1
process-1.1.0.1
pureMD5-2.1.0.3
pwstore-fast-2.2
random-1.0.1.1
ranges-0.2.4
regex-base-0.93.2
regex-compat-0.95.1
regex-posix-0.95.1
resource-pool-0.2.1.0
rts-1.0
safe-0.3.3
semigroups-0.8
shakespeare-0.10.3.1
shakespeare-css-0.10.7
shakespeare-i18n-0.0.1
shakespeare-js-0.11.0.1
shakespeare-text-0.10.5
simple-sendfile-0.2.0
skein-0.1.0.5
socks-0.4.1
stm-2.2.0.1
syb-0.3.6
system-filepath-0.4.6
tagged-0.2.3.1
tagsoup-0.12.6
template-haskell-2.7.0.0
text-0.11.1.13
time-1.4
tls-0.9.0
tls-extra-0.4.3
transformers-0.2.2.0
transformers-base-0.4.1
unix-2.5.1.0
unix-compat-0.3.0.1
unordered-containers-0.1.4.6
utf8-light-0.4.0.1
utf8-string-0.3.7
vault-0.1.0.0
vector-0.9.1
wai-1.1.0.1
wai-app-static-1.1.2
wai-extra-1.1.0.1
wai-logger-0.1.4
warp-1.1.0.1
xhtml-3000.2.0.5
xml-conduit-0.5.3
xml-types-0.3.1
xss-sanitize-0.3.1
yaml-0.5.2
yesod-0.10.1.3
yesod-auth-0.8.1.1
yesod-core-0.10.2.1
yesod-form-0.4.2
yesod-json-0.3.1
yesod-persistent-0.3.1
yesod-routes-0.0.1
yesod-static-0.10.1
zlib-0.5.3.3
zlib-bindings-0.0.3.2
zlib-conduit-0.2.0
/home/ionica/.ghc/x86_64-linux-7.4.1/package.conf.d:
Cabal-1.16.0.1
HDBC-2.3.1.1
HDBC-odbc-2.3.1.0
HDBC-sqlite3-2.3.3.0
HaXml-1.23.3
SHA-1.5.1
aeson-0.6.0.2
ansi-terminal-0.5.5
asn1-data-0.7.1
attoparsec-0.10.2.0
attoparsec-conduit-0.5.0.2
authenticate-1.3.1.1
base-unicode-symbols-0.2.2.4
base64-bytestring-1.0.0.0
blaze-builder-0.3.1.0
blaze-builder-conduit-0.5.0.1
blaze-html-0.5.1.0
blaze-markup-0.5.1.1
byteorder-1.0.3
cairo-0.12.3.1
case-insensitive-0.4.0.3
cereal-0.3.5.2
certificate-1.2.8
cipher-aes-0.1.2
clientsession-0.8.0.1
conduit-0.5.2.5
conduit-0.5.2.6
convertible-1.0.11.1
cookie-0.4.0.1
cpphs-1.14
cprng-aes-0.2.4
cpu-0.1.1
crypto-api-0.10.2
crypto-conduit-0.4.0.1
crypto-pubkey-types-0.1.1
cryptocipher-0.3.5
cryptohash-0.7.5
css-text-0.1.1
data-default-0.5.0
date-cache-0.3.0
derive-2.5.11
dlist-0.5
email-validate-0.2.8
entropy-0.2.1
failure-0.2.0.1
fast-logger-0.3.1
file-embed-0.0.4.6
filesystem-conduit-0.5.0.1
ghc-paths-0.1.0.8
gio-0.12.3
glib-0.12.3.1
gtk-0.12.3.1
hamlet-1.1.1
hashable-1.1.2.5
haskell-src-exts-1.13.5
hjsmin-0.1.3
hspec-1.3.0.1
hspec-expectations-0.3.0.2
html-conduit-0.1.0.2
http-conduit-1.6.1.2
http-date-0.0.2
http-types-0.7.3.0.1
language-javascript-0.5.5
largeword-1.0.3
lifted-base-0.1.2
lifted-base-0.2
mime-mail-0.4.1.2
mime-types-0.1.0.0
monad-control-0.3.1.4
monad-logger-0.2.1
network-conduit-0.6.0
network-conduit-0.6.1.1
pango-0.12.3
parallel-3.2.0.2
parallel-3.2.0.3
parallel-io-0.3.2.1
path-pieces-0.1.2
pem-0.1.1
persistent-1.0.1.3
persistent-sqlite-0.8.0
persistent-sqlite-1.0.0
persistent-template-1.0.0.2
polyparse-1.8
pool-conduit-0.1.0.3
primitive-0.5
primitive-0.5.0.1
pureMD5-2.1.2.1
pwstore-fast-2.3
ranges-0.2.4
resource-pool-0.2.1.1
resourcet-0.4.0.1
resourcet-0.4.0.2
safe-0.3.3
semigroups-0.8.4.1
shakespeare-1.0.1.4
shakespeare-css-1.0.1.5
shakespeare-i18n-1.0.0.2
shakespeare-js-1.0.0.6
shakespeare-text-1.0.0.5
silently-1.2.0.2
simple-sendfile-0.2.8
skein-0.1.0.9
socks-0.4.2
split-0.1.4.3
stringsearch-0.3.6.4
system-fileio-0.3.10
system-filepath-0.4.7
tagged-0.4.4
tagsoup-0.12.8
tagstream-conduit-0.5.3
tar-0.3.2.0
tar-0.4.0.1
tls-0.9.11
tls-extra-0.4.7
transformers-base-0.4.1
uniplate-1.6.7
unix-compat-0.4.0.0
unix-time-0.1.2
unordered-containers-0.2.2.1
utf8-string-0.3.7
vault-0.2.0.1
vector-0.10
vector-0.10.0.1
void-0.5.8
wai-1.3.0.1
wai-app-static-1.3.0.2
wai-extra-1.3.0.3
wai-logger-0.3.0
wai-test-1.3.0
warp-1.3.4.1
xml-conduit-1.0.3.1
xml-types-0.3.3
xss-sanitize-0.3.2
yaml-0.8.1
yesod-1.1.2
yesod-auth-1.1.1.2
yesod-core-1.1.3.1
yesod-default-0.6.1
yesod-default-1.1.0.2
yesod-form-1.1.3
yesod-json-1.1.0
yesod-persistent-1.1.0
yesod-platform-1.1.4
yesod-routes-1.1.0.1
yesod-routes-1.1.0.2
yesod-static-1.1.0.1
yesod-test-0.3.0.1
zlib-bindings-0.1.1.1
zlib-conduit-0.5.0.1
After a complete clean up of the system - I mean uninstall haskell-platform, yesod-platform and delete files related to haskell, yesod and ghc - then a fresh install for haskell-platform + yesod-platform all goes splendid.

Resources