I've been waiting to use features added to Cabal-2.2.* in conjunction with stack for a month now. Unfortunately there's been no traction on the three issues listed as blocking release (#3796, #3791, #3782).
Specifically I need to use the cxx-options and cxx-sources buildinfo fields for separate compilation of C and C++ source files. stack's lack of support of these features is roadblocking our development and continuous integration efforts.
Could you prioritize resolving issues blocking a release incorporating Cabal-2.2.*?
We're hoping to release 1.7 soon, so I've asked @mgsloan about the priotiy on those issues. The Cabal-2.2 changes are too big to backport to 1.6, so it'll have to be a new major release.
I'm glad to hear the new release is coming soon. Is there a time table for the v1.7 release somewhere or is that still being determined?
Looks like #3791 was the sole remaining P0: Blocking release issue, and AFAICT the fix has been merged (#3795). Is my hope merited?
@dukedave I think so! I'm sure there's a bit a of a review process in tagging a new release, something I'm unfamiliar with. I'm hoping the Stack team can make progress on that next week!
Release candidate for v1.7.1: https://github.com/commercialhaskell/stack/releases/tag/v1.7.0.1
@borsboom I tried to build this minimum working example test repository that requires the cxx-sources & cxx-options flags with the v1.7.0.1 pre-release version. Unfortunately it didn't correctly build.
I ran the following commands:
cabal --version
stack-1.7.0.1 init
stack-1.7.0.1 build
I got the following output:
stackuser@stackmachine:~/Code$ git clone https://github.com/recursion-ninja/tcm-memo.git
Cloning into 'tcm-memo'...
remote: Counting objects: 48, done.
remote: Total 48 (delta 0), reused 0 (delta 0), pack-reused 48
Unpacking objects: 100% (48/48), done.
stackuser@stackmachine:~/Code$ cd tcm-memo/
stackuser@stackmachine:~/Code/tcm-memo$ ls
Main.hs memoized-tcm README.md src tcm-memo.cabal
stackuser@stackmachine:~/Code/tcm-memo$ cabal --version
cabal-install version 2.2.0.0
compiled using version 2.2.0.1 of the Cabal library
stackuser@stackmachine:~/Code/tcm-memo$ stack-1.7.0.1 build
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Downloaded ghc-8.2.2.
Unpacking GHC into /home/stackuser/.stack/programs/x86_64-linux/ghc-8.2.2.temp/ Installed GHC.
Error parsing targets: The specified targets matched no packages.
Perhaps you need to run 'stack init'?
stackuser@stackmachine:~/Code/tcm-memo$ stack-1.7.0.1 init
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- ./
Warning: Cabal file warning in /home/stackuser/Code/tcm-memo/tcm-memo.cabal@
38:3: The field "cxx-sources" is available since Cabal [2,1]
Warning: Cabal file warning in /home/stackuser/Code/tcm-memo/tcm-memo.cabal@
40:3: The field "cxx-options" is available since Cabal [2,1]
Selecting the best among 13 snapshots...
Downloaded lts-11.5 build plan.
Didn't see GLFW-b-1.4.8.3@sha256:55beca023703a7d0fceeb381d7eb9c4d0617f161452962047a715d8200df82c6,2207 in your package indices.
Updating and trying again.
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpc Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpc Downloading timestamp
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpc Downloading snapshot
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpc Updating index
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpc Updated package index downloaded
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpc Update complete
Populated index cache.
* Matches lts-11.5
Selected resolver: lts-11.5
Initialising configuration using resolver: lts-11.5
Total number of user packages considered: 1
Writing configuration to file: stack.yaml
All done.
stackuser@stackmachine:~/Code/tcm-memo$ stack-1.7.0.1 build
Warning: Cabal file warning in /home/stackuser/Code/tcm-memo/tcm-memo.cabal@
38:3: The field "cxx-sources" is available since Cabal [2,1]
Warning: Cabal file warning in /home/stackuser/Code/tcm-memo/tcm-memo.cabal@
40:3: The field "cxx-options" is available since Cabal [2,1]
[1 of 2] Compiling Main ( /home/stackuser/.stack/setup-exe-src/setup-mPHDZzAJ.hs, /home/stackuser/.stack/setup-exe-src/setup-mPHDZzAJ.o )
[2 of 2] Compiling StackSetupShim ( /home/stackuser/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /home/stackuser/.stack/setup-exe-src/setup-shim-mPHDZzAJ.o )
Linking /home/stackuser/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_mPHDZzAJ_2.0.1.0_ghc-8.2.2 ...
base-orphans-0.7: configure
base-orphans-0.7: build
fail-4.9.0.0: configure
fail-4.9.0.0: build
mtl-2.2.2: configure
fail-4.9.0.0: copy/register
Progress 1/37: Cabal-2.0.1.1, base-orphans-0.7, call-stack-0.1.0, mtl-2.2.2, parallel-3.2.1.1, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, sem mtl-2.2.2: build
Progress 1/37: Cabal-2.0.1.1, base-orphans-0.7, call-stack-0.1.0, mtl-2.2.2, parallel-3.2.1.1, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, sem parallel-3.2.1.1: configure
Progress 1/37: Cabal-2.0.1.1, base-orphans-0.7, call-stack-0.1.0, mtl-2.2.2, parallel-3.2.1.1, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, sem base-orphans-0.7: copy/register
Progress 1/37: Cabal-2.0.1.1, base-orphans-0.7, call-stack-0.1.0, mtl-2.2.2, parallel-3.2.1.1, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, sem Progress 2/37: Cabal-2.0.1.1, call-stack-0.1.0, mtl-2.2.2, parallel-3.2.1.1, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, semigroups-0.18.4, st parallel-3.2.1.1: build
Progress 2/37: Cabal-2.0.1.1, call-stack-0.1.0, mtl-2.2.2, parallel-3.2.1.1, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, semigroups-0.18.4, st random-1.1: configure
Progress 2/37: Cabal-2.0.1.1, call-stack-0.1.0, mtl-2.2.2, parallel-3.2.1.1, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, semigroups-0.18.4, st random-1.1: build
Progress 2/37: Cabal-2.0.1.1, call-stack-0.1.0, mtl-2.2.2, parallel-3.2.1.1, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, semigroups-0.18.4, st reflection-2.1.3: configure
Progress 2/37: Cabal-2.0.1.1, call-stack-0.1.0, mtl-2.2.2, parallel-3.2.1.1, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, semigroups-0.18.4, stm- reflection-2.1.3: build
Progress 2/37: Cabal-2.0.1.1, call-stack-0.1.0, mtl-2.2.2, parallel-3.2.1.1, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, semigroups-0.18.4, stm- safe-0.3.17: configure
Progress 2/37: Cabal-2.0.1.1, call-stack-0.1.0, mtl-2.2.2, parallel-3.2.1.1, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, semigroups-0.18.4, stm- parallel-3.2.1.1: copy/register
Progress 2/37: Cabal-2.0.1.1, call-stack-0.1.0, mtl-2.2.2, parallel-3.2.1.1, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, semigroups-0.18.4, stm- Progress 3/37: Cabal-2.0.1.1, call-stack-0.1.0, mtl-2.2.2, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, semigroups-0.18.4, stm-2.4.5.0, safe-0.3.17: build
Progress 3/37: Cabal-2.0.1.1, call-stack-0.1.0, mtl-2.2.2, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17 call-stack-0.1.0: configure
Progress 3/37: Cabal-2.0.1.1, call-stack-0.1.0, mtl-2.2.2, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17 mtl-2.2.2: copy/register
Progress 3/37: Cabal-2.0.1.1, call-stack-0.1.0, mtl-2.2.2, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17 Progress 4/37: Cabal-2.0.1.1, call-stack-0.1.0, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, semigroup call-stack-0.1.0: build
Progress 4/37: Cabal-2.0.1.1, call-stack-0.1.0, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, semigroup semigroups-0.18.4: configure
Progress 4/37: Cabal-2.0.1.1, call-stack-0.1.0, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, semigroups-0.18.4, stm-2.4.5.0 semigroups-0.18.4: build
Progress 4/37: Cabal-2.0.1.1, call-stack-0.1.0, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, semigroups-0.18.4, stm-2.4.5.0 stm-2.4.5.0: configure
Progress 4/37: Cabal-2.0.1.1, call-stack-0.1.0, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, semigroups-0.18.4, stm-2.4.5.0 call-stack-0.1.0: copy/register
Progress 4/37: Cabal-2.0.1.1, call-stack-0.1.0, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, semigroups-0.18.4, stm-2.4.5.0 Progress 5/37: Cabal-2.0.1.1, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, semigroups-0.18.4, stm-2.4.5.0, text-1.2.3.0, th random-1.1: copy/register
Progress 5/37: Cabal-2.0.1.1, primitive-0.6.3.0, random-1.1, reflection-2.1.3, safe-0.3.17, semigroups-0.18.4, stm-2.4.5.0, text-1.2.3.0, th Progress 6/37: Cabal-2.0.1.1, primitive-0.6.3.0, reflection-2.1.3, safe-0.3.17, semigroups-0.18.4, stm-2.4.5.0, text-1.2.3.0, th-abstraction stm-2.4.5.0: build
Progress 6/37: Cabal-2.0.1.1, primitive-0.6.3.0, reflection-2.1.3, safe-0.3.17, semigroups-0.18.4, stm-2.4.5.0, text-1.2.3.0, th-abstraction primitive-0.6.3.0: configure
Progress 6/37: Cabal-2.0.1.1, primitive-0.6.3.0, reflection-2.1.3, safe-0.3.17, semigroups-0.18.4, stm-2.4.5.0, text-1.2.3.0, th-abstraction semigroups-0.18.4: copy/register
Progress 6/37: Cabal-2.0.1.1, primitive-0.6.3.0, reflection-2.1.3, safe-0.3.17, semigroups-0.18.4, stm-2.4.5.0, text-1.2.3.0, th-abstraction Progress 7/37: Cabal-2.0.1.1, primitive-0.6.3.0, reflection-2.1.3, safe-0.3.17, stm-2.4.5.0, text-1.2.3.0, th-abstraction-0.2.6.0, transform safe-0.3.17: copy/register
Progress 7/37: Cabal-2.0.1.1, primitive-0.6.3.0, reflection-2.1.3, safe-0.3.17, stm-2.4.5.0, text-1.2.3.0, th-abstraction-0.2.6.0, transform Progress 8/37: Cabal-2.0.1.1, primitive-0.6.3.0, reflection-2.1.3, stm-2.4.5.0, text-1.2.3.0, th-abstraction-0.2.6.0, transformers-compat-0. primitive-0.6.3.0: build
Progress 8/37: Cabal-2.0.1.1, primitive-0.6.3.0, reflection-2.1.3, stm-2.4.5.0, text-1.2.3.0, th-abstraction-0.2.6.0, transformers-compat-0. Cabal-2.0.1.1: configure
Progress 8/37: Cabal-2.0.1.1, primitive-0.6.3.0, reflection-2.1.3, stm-2.4.5.0, text-1.2.3.0, th-abstraction-0.2.6.0, transformers-compat-0. reflection-2.1.3: copy/register
Progress 8/37: Cabal-2.0.1.1, primitive-0.6.3.0, reflection-2.1.3, stm-2.4.5.0, text-1.2.3.0, th-abstraction-0.2.6.0, transformers-compat-0. Cabal-2.0.1.1: build
text-1.2.3.0: configure
text-1.2.3.0: build
th-abstraction-0.2.6.0: configure
stm-2.4.5.0: copy/register
Progress 9/37: Cabal-2.0.1.1, primitive-0.6.3.0, stm-2.4.5.0, text-1.2.3.0, th-abstraction-0.2.6.0, transformers-compat-0.5.1.4, void-0.7.2^Progress 10/37: Cabal-2.0.1.1, StateVar-1.1.0.4, primitive-0.6.3.0, text-1.2.3.0, th-abstraction-0.2.6.0, transformers-compat-0.5.1.4, void- th-abstraction-0.2.6.0: build
Progress 10/37: Cabal-2.0.1.1, StateVar-1.1.0.4, primitive-0.6.3.0, text-1.2.3.0, th-abstraction-0.2.6.0, transformers-compat-0.5.1.4, void- transformers-compat-0.5.1.4: configure
Progress 10/37: Cabal-2.0.1.1, StateVar-1.1.0.4, primitive-0.6.3.0, text-1.2.3.0, th-abstraction-0.2.6.0, transformers-compat-0.5.1.4, void- transformers-compat-0.5.1.4: build
Progress 10/37: Cabal-2.0.1.1, StateVar-1.1.0.4, primitive-0.6.3.0, text-1.2.3.0, th-abstraction-0.2.6.0, transformers-compat-0.5.1.4, void- void-0.7.2: configure
Progress 10/37: Cabal-2.0.1.1, StateVar-1.1.0.4, primitive-0.6.3.0, text-1.2.3.0, th-abstraction-0.2.6.0, transformers-compat-0.5.1.4, void- void-0.7.2: build
Progress 10/37: Cabal-2.0.1.1, StateVar-1.1.0.4, primitive-0.6.3.0, text-1.2.3.0, th-abstraction-0.2.6.0, transformers-compat-0.5.1.4, void- StateVar-1.1.0.4: configure
Progress 10/37: Cabal-2.0.1.1, StateVar-1.1.0.4, primitive-0.6.3.0, text-1.2.3.0, th-abstraction-0.2.6.0, transformers-compat-0.5.1.4, void- transformers-compat-0.5.1.4: copy/register
Progress 10/37: Cabal-2.0.1.1, StateVar-1.1.0.4, primitive-0.6.3.0, text-1.2.3.0, th-abstraction-0.2.6.0, transformers-compat-0.5.1.4, void- void-0.7.2: copy/register
Progress 10/37: Cabal-2.0.1.1, StateVar-1.1.0.4, primitive-0.6.3.0, text-1.2.3.0, th-abstraction-0.2.6.0, transformers-compat-0.5.1.4, void- Progress 11/37: Cabal-2.0.1.1, StateVar-1.1.0.4, exceptions-0.8.3, primitive-0.6.3.0, tagged-0.8.5, text-1.2.3.0, th-abstraction-0.2.6.0, tr Progress 12/37: Cabal-2.0.1.1, StateVar-1.1.0.4, exceptions-0.8.3, primitive-0.6.3.0, tagged-0.8.5, text-1.2.3.0, th-abstraction-0.2.6.0, tr StateVar-1.1.0.4: build
Progress 12/37: Cabal-2.0.1.1, StateVar-1.1.0.4, exceptions-0.8.3, primitive-0.6.3.0, tagged-0.8.5, text-1.2.3.0, th-abstraction-0.2.6.0, tr exceptions-0.8.3: configure
Progress 12/37: Cabal-2.0.1.1, StateVar-1.1.0.4, exceptions-0.8.3, primitive-0.6.3.0, tagged-0.8.5, text-1.2.3.0, th-abstraction-0.2.6.0, tr exceptions-0.8.3: build
Progress 12/37: Cabal-2.0.1.1, StateVar-1.1.0.4, exceptions-0.8.3, primitive-0.6.3.0, tagged-0.8.5, text-1.2.3.0, th-abstraction-0.2.6.0, tr transformers-base-0.4.4: configure
Progress 12/37: Cabal-2.0.1.1, StateVar-1.1.0.4, exceptions-0.8.3, primitive-0.6.3.0, tagged-0.8.5, text-1.2.3.0, th-abstraction-0.2.6.0, tr StateVar-1.1.0.4: copy/register
Progress 12/37: Cabal-2.0.1.1, StateVar-1.1.0.4, exceptions-0.8.3, primitive-0.6.3.0, tagged-0.8.5, text-1.2.3.0, th-abstraction-0.2.6.0, tr Progress 13/37: Cabal-2.0.1.1, contravariant-1.4.1, exceptions-0.8.3, primitive-0.6.3.0, tagged-0.8.5, text-1.2.3.0, th-abstraction-0.2.6.0, transformers-base-0.4.4: build
Progress 13/37: Cabal-2.0.1.1, contravariant-1.4.1, exceptions-0.8.3, primitive-0.6.3.0, tagged-0.8.5, text-1.2.3.0, th-abstraction-0.2.6.0, tagged-0.8.5: configure
Progress 13/37: Cabal-2.0.1.1, contravariant-1.4.1, exceptions-0.8.3, primitive-0.6.3.0, tagged-0.8.5, text-1.2.3.0, th-abstraction-0.2.6.0, th-abstraction-0.2.6.0: copy/register
Progress 13/37: Cabal-2.0.1.1, contravariant-1.4.1, exceptions-0.8.3, primitive-0.6.3.0, tagged-0.8.5, text-1.2.3.0, th-abstraction-0.2.6.0, tagged-0.8.5: build
contravariant-1.4.1: configure
primitive-0.6.3.0: copy/register
exceptions-0.8.3: copy/register
Progress 15/37: Cabal-2.0.1.1, contravariant-1.4.1, exceptions-0.8.3, tagged-0.8.5, text-1.2.3.0, tf-random-0.5, transformers-base-0.4.4, ve contravariant-1.4.1: build
Progress 15/37: Cabal-2.0.1.1, contravariant-1.4.1, exceptions-0.8.3, tagged-0.8.5, text-1.2.3.0, tf-random-0.5, transformers-base-0.4.4, ve tf-random-0.5: configure
Progress 15/37: Cabal-2.0.1.1, contravariant-1.4.1, exceptions-0.8.3, tagged-0.8.5, text-1.2.3.0, tf-random-0.5, transformers-base-0.4.4, ve transformers-base-0.4.4: copy/register
Progress 15/37: Cabal-2.0.1.1, contravariant-1.4.1, exceptions-0.8.3, tagged-0.8.5, text-1.2.3.0, tf-random-0.5, transformers-base-0.4.4, ve tf-random-0.5: build
vector-0.12.0.1: configure
vector-0.12.0.1: build
tagged-0.8.5: copy/register
contravariant-1.4.1: copy/register
tf-random-0.5: copy/register
QuickCheck-2.10.1: configure
QuickCheck-2.10.1: build
QuickCheck-2.10.1: copy/register
text-1.2.3.0: copy/register
hashable-1.2.7.0: configure
hashable-1.2.7.0: build
hashable-1.2.7.0: copy/register
unordered-containers-0.2.9.0: configure
unordered-containers-0.2.9.0: build
unordered-containers-0.2.9.0: copy/register
vector-0.12.0.1: copy/register
Cabal-2.0.1.1: copy/register
cabal-doctest-1.0.6: configure
cabal-doctest-1.0.6: build
cabal-doctest-1.0.6: copy/register
distributive-0.5.3: configure
distributive-0.5.3: build
distributive-0.5.3: copy/register
comonad-5.0.3: configure
comonad-5.0.3: build
comonad-5.0.3: copy/register
bifunctors-5.5.2: configure
bifunctors-5.5.2: build
bifunctors-5.5.2: copy/register
profunctors-5.2.2: configure
profunctors-5.2.2: build
semigroupoids-5.2.2: configure
semigroupoids-5.2.2: build
profunctors-5.2.2: copy/register
semigroupoids-5.2.2: copy/register
free-5.0.1: configure
free-5.0.1: build
free-5.0.1: copy/register
adjunctions-4.4: configure
adjunctions-4.4: build
adjunctions-4.4: copy/register
kan-extensions-5.1: configure
kan-extensions-5.1: build
kan-extensions-5.1: copy/register
lens-4.16.1: download
lens-4.16.1: configure
lens-4.16.1: build
lens-4.16.1: copy/register
Building all executables for `tcm-memo' once. After a successful build of all of them, only specified executables will be rebuilt.
tcm-memo-1.0.0.0: configure (lib + exe)
Warning: tcm-memo.cabal: Unknown fields: cxx-sources (line 38), cxx-options
(line 40)
Fields allowed in this section:
exposed-modules, reexported-modules, signatures, exposed,
buildable, build-tools, build-tool-depends, build-depends, mixins,
cpp-options, cc-options, ld-options, pkgconfig-depends, frameworks,
extra-framework-dirs, c-sources, js-sources, default-language,
other-languages, default-extensions, other-extensions, extensions,
extra-libraries, extra-ghci-libraries, extra-lib-dirs, includes,
install-includes, include-dirs, hs-source-dirs, other-modules,
autogen-modules, ghc-prof-options, ghcjs-prof-options,
ghc-shared-options, ghcjs-shared-options, ghc-options,
ghcjs-options, jhc-options, hugs-options, nhc98-options
Configuring tcm-memo-1.0.0.0...
tcm-memo-1.0.0.0: build (lib + exe)
Preprocessing library for tcm-memo-1.0.0.0..
Building library for tcm-memo-1.0.0.0..
[1 of 3] Compiling Bio.Character.Exportable.Class ( src/Bio/Character/Exportable/Class.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/Bio/Character/Exportable/Class.o )
[2 of 3] Compiling Data.TCM.Memoized.FFI ( .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/Data/TCM/Memoized/FFI.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/Data/TCM/Memoized/FFI.o )
[3 of 3] Compiling Data.TCM.Memoized ( src/Data/TCM/Memoized.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/Data/TCM/Memoized.o )
Preprocessing executable 'use-the-code' for tcm-memo-1.0.0.0..
Building executable 'use-the-code' for tcm-memo-1.0.0.0..
[1 of 1] Compiling Main ( Main.hs, .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/use-the-code/use-the-code-tmp/Main.o )
Linking .stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/use-the-code/use-the-code ...
/home/stackuser/Code/tcm-memo/.stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/libHStcm-memo-1.0.0.0-IOwpDFGvo0sIPrIJlWs5ou.a(costMatrixWrapper.o):costMatrixWrapper.c:function matrixInit: error: undefined reference to 'construct_CostMatrix_C'
/home/stackuser/Code/tcm-memo/.stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/libHStcm-memo-1.0.0.0-IOwpDFGvo0sIPrIJlWs5ou.a(costMatrixWrapper.o):costMatrixWrapper.c:function matrixDestroy: error: undefined reference to 'destruct_CostMatrix_C'
/home/stackuser/Code/tcm-memo/.stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/libHStcm-memo-1.0.0.0-IOwpDFGvo0sIPrIJlWs5ou.a(costMatrixWrapper.o):costMatrixWrapper.c:function getCostInternal: error: undefined reference to 'call_getSetCost_C'
/home/stackuser/Code/tcm-memo/.stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/libHStcm-memo-1.0.0.0-IOwpDFGvo0sIPrIJlWs5ou.a(costMatrixWrapper.o):costMatrixWrapper.c:function getCostAndMedian: error: undefined reference to 'call_getSetCost_C'
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
Completed 37 action(s).
-- While building custom Setup.hs for package tcm-memo-1.0.0.0 using:
/home/stackuser/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_2.0.1.0_ghc-8.2.2 --builddir=.stack-work/dist/x86_64-linux/Cabal-2.0.1.0 build lib:tcm-memo exe:use-the-code --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
There were a lot of warnings emitted regarding the cxx-sources & cxx-options flags. Also, there was a lot of Cabal-2.0.1.1 in the output. I'm not convinced that it is building using Cabal-2.2.
tcm-memo.cabal should specify cabal-version: 2.2, otherwise those fields won't be recognized. Although once you do that, your build will fail with:
Cabal-simple_mPHDZzAJ_2.0.1.0_ghc-8.2.2: This package description follows
version 2.2 of the Cabal specification. This tool only supports up to version
2.0.1.0
That's because GHC 8.2.2 comes with Cabal-2.0.1.0 and so that is the version that's used to build your package. Change the resolver in stack.yaml to nightly-2018-04-17, to use GHC 8.4.1, and it should work.
@borsboom thanks for the technical assistance, let me try to rebuild in the morning with ghc-8.4.1.
I did try bumping the cabal-version field to 2.2 but was getting parse errors from cabal with ghc-8.2.2. That consumed my attention and caused me to miss the informative warning message.
@borsboom the test repository _does build_ with the v1.7.0.1 release candidate after ensuring that the resolver used ghc-8.4.1!
Most helpful comment
I'm glad to hear the new release is coming soon. Is there a time table for the
v1.7release somewhere or is that still being determined?