cabal
cabal copied to clipboard
cabal-install-3.12.1.0 works, later versions don't - for project using libncursesw
cabal run for example from hscurses:
- does work when built with cabal-install-3.10.3.0
- does not work (example starts but shows funny behaviour) with later cabal-install
Something changed in the way that the linker is called?
see https://github.com/skogsbaer/hscurses/issues/46#issuecomment-2880561979
reproduce:
git clone https://github.com/skogsbaer/hscurses/
cd hscurses
does not work:
cabal run -f examples -f debug contact-manager -- example/contacts
works (with older cabal-install, built separately)
$HOME/software/haskell/cabal-install-3.10.3.0/dist-newstyle/build/x86_64-linux/ghc-9.12.2/cabal-install-3.10.3.0/x/cabal/build/cabal/cabal run -f examples -f debug contact-manager -- example/contacts
Can confirm the example does not work here (Cabal head).
To be clear: it does compile, but the terminal app is broken (corrupted screen).
And I believe this is the part regarding the linker:
Wanted module build ways(library): [DynWay,StaticWay]
Final module build ways(library): [DynWay,StaticWay]
GHC response file arguments: '-package-env=-' --make -fbuilding-cabal-package -O -static -dynamic-too -dynosuf dyn_o -dynhisuf dyn_hi -outputdir dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build -odir dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build -hidir dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build -hiedir dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/extra-compilation-artifacts/hie -stubdir dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build -i -i. -idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build -idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/autogen -idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/global-autogen -Idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/autogen -Idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/global-autogen -Idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build -Icbits -Idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/cbits -optP-include -optPdist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/autogen/cabal_macros.h -this-unit-id hscurses-1.5.0.0-inplace -hide-all-packages -Wmissing-home-modules -no-user-package-db -package-db /home/f/.local/state/cabal/store/ghc-9.10.1-25ec/package.db -package-db /tmp/hscurses/dist-newstyle/packagedb/ghc-9.10.1 -package-db dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/package.conf.inplace -package-id base-4.20.0.0-1f57 -package-id exceptions-0.10.7-087b -package-id mtl-2.3.1-aac9 -package-id time-1.12.2-dfcf -package-id unix-2.8.5.1-651f -XHaskell2010 -XCPP -XExistentialQuantification -XForeignFunctionInterface -XGeneralizedNewtypeDeriving -XScopedTypeVariables UI.HSCurses.Curses UI.HSCurses.CursesHelper UI.HSCurses.Logging UI.HSCurses.Widgets UI.HSCurses.CWString UI.HSCurses.IConv -funbox-strict-fields -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -hide-all-packages '-Werror=incomplete-patterns' '-Werror=missing-fields'
Running: /home/f/media/vcs/ghc/9.10.1/bin/ghc '@/tmp/ghc792330-6.rsp'
[1 of 6] Compiling UI.HSCurses.CWString ( dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/CWString.hs, dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/CWString.o, dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/CWString.dyn_o )
[2 of 6] Compiling UI.HSCurses.IConv ( dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/IConv.hs, dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/IConv.o, dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/IConv.dyn_o )
[3 of 6] Compiling UI.HSCurses.Logging ( UI/HSCurses/Logging.hs, dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/Logging.o, dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/Logging.dyn_o )
[4 of 6] Compiling UI.HSCurses.Curses ( dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/Curses.hs, dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/Curses.o, dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/Curses.dyn_o )
[5 of 6] Compiling UI.HSCurses.CursesHelper ( UI/HSCurses/CursesHelper.hs, dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/CursesHelper.o, dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/CursesHelper.dyn_o )
[6 of 6] Compiling UI.HSCurses.Widgets ( UI/HSCurses/Widgets.hs, dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/Widgets.o, dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/Widgets.dyn_o )
Building C Sources...
creating
/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build
GHC response file arguments: '-package-env=-' -c -dynamic -fPIC -osuf dyn_o -odir dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build -Idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/autogen -Idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/global-autogen -Idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build -Icbits -Idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/cbits -optc-O2 -pgmc /usr/bin/gcc -hide-all-packages -no-user-package-db -package-db /home/f/.local/state/cabal/store/ghc-9.10.1-25ec/package.db -package-db /tmp/hscurses/dist-newstyle/packagedb/ghc-9.10.1 -package-db dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/package.conf.inplace -package-id base-4.20.0.0-1f57 -package-id exceptions-0.10.7-087b -package-id mtl-2.3.1-aac9 -package-id time-1.12.2-dfcf -package-id unix-2.8.5.1-651f cbits/HSCursesUtils.c -funbox-strict-fields -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -hide-all-packages '-Werror=incomplete-patterns' '-Werror=missing-fields'
Running: /home/f/media/vcs/ghc/9.10.1/bin/ghc '@/tmp/ghc792330-7.rsp'
GHC response file arguments: '-package-env=-' -c -fPIC -odir dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build -Idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/autogen -Idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/global-autogen -Idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build -Icbits -Idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/cbits -optc-O2 -pgmc /usr/bin/gcc -hide-all-packages -no-user-package-db -package-db /home/f/.local/state/cabal/store/ghc-9.10.1-25ec/package.db -package-db /tmp/hscurses/dist-newstyle/packagedb/ghc-9.10.1 -package-db dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/package.conf.inplace -package-id base-4.20.0.0-1f57 -package-id exceptions-0.10.7-087b -package-id mtl-2.3.1-aac9 -package-id time-1.12.2-dfcf -package-id unix-2.8.5.1-651f cbits/HSCursesUtils.c -funbox-strict-fields -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -hide-all-packages '-Werror=incomplete-patterns' '-Werror=missing-fields'
Running: /home/f/media/vcs/ghc/9.10.1/bin/ghc '@/tmp/ghc792330-8.rsp'
Linking...
[(DefiniteUnitId (DefUnitId {unDefUnitId = UnitId
"base-4.20.0.0-1f57"}),DefaultRenaming),(DefiniteUnitId (DefUnitId
{unDefUnitId = UnitId
"exceptions-0.10.7-087b"}),DefaultRenaming),(DefiniteUnitId (DefUnitId
{unDefUnitId = UnitId "mtl-2.3.1-aac9"}),DefaultRenaming),(DefiniteUnitId
(DefUnitId {unDefUnitId = UnitId
"time-1.12.2-dfcf"}),DefaultRenaming),(DefiniteUnitId (DefUnitId {unDefUnitId
= UnitId "unix-2.8.5.1-651f"}),DefaultRenaming)]
GHC response file arguments: '-package-env=-' -shared -dynamic -lncurses -lncursesw '-dynload deploy' -optl-Wl,-rpath,/home/f/media/vcs/ghc/9.10.1/lib/ghc-9.10.1/lib/x86_64-linux-ghc-9.10.1 -this-unit-id hscurses-1.5.0.0-inplace -hide-all-packages -no-auto-link-packages -no-user-package-db -package-db /home/f/.local/state/cabal/store/ghc-9.10.1-25ec/package.db -package-db /tmp/hscurses/dist-newstyle/packagedb/ghc-9.10.1 -package-db dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/package.conf.inplace -package-id base-4.20.0.0-1f57 -package-id exceptions-0.10.7-087b -package-id mtl-2.3.1-aac9 -package-id time-1.12.2-dfcf -package-id unix-2.8.5.1-651f dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/Curses.dyn_o dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/CursesHelper.dyn_o dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/Logging.dyn_o dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/Widgets.dyn_o dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/CWString.dyn_o dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/IConv.dyn_o dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/cbits/HSCursesUtils.dyn_o -o dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/libHShscurses-1.5.0.0-inplace-ghc9.10.1.so -hide-all-packages '-Werror=incomplete-patterns' '-Werror=missing-fields'
Running: /home/f/media/vcs/ghc/9.10.1/bin/ghc '@/tmp/ghc792330-9.rsp'
Running: /usr/bin/ar -r dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/objs-792330/libHShscurses-1.5.0.0-inplace.a '@/tmp/ar792330-10.rsp'
Running: /home/f/media/vcs/ghc/9.10.1/bin/ghc-pkg-9.10.1 recache '--package-db=dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/package.conf.inplace'
creating
/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager
creating
/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/autogen
creating
/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/autogen
creating
/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/autogen
creating
/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/autogen
Preprocessing executable 'contact-manager' for hscurses-1.5.0.0...
Building executable 'contact-manager' for hscurses-1.5.0.0...
creating
/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager
creating
/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp
Wanted module build ways(executable 'contact-manager'): [StaticWay]
Final module build ways(executable 'contact-manager'): [StaticWay]
GHC response file arguments: '-package-env=-' --make -no-link -fbuilding-cabal-package -O -static -outputdir dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -odir dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -hidir dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -hiedir dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp/extra-compilation-artifacts/hie -stubdir dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -i -iexample -idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/autogen -idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/global-autogen -Idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/autogen -Idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/global-autogen -Idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -optP-include -optPdist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/autogen/cabal_macros.h -this-unit-id hscurses-1.5.0.0-inplace-contact-manager -hide-all-packages -Wmissing-home-modules -no-user-package-db -package-db /home/f/.local/state/cabal/store/ghc-9.10.1-25ec/package.db -package-db /tmp/hscurses/dist-newstyle/packagedb/ghc-9.10.1 -package-db dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/package.conf.inplace -package-id base-4.20.0.0-1f57 -package-id hscurses-1.5.0.0-inplace -package-id mtl-2.3.1-aac9 -package-id pretty-1.1.3.6-7049 -XHaskell2010 example/ContactManager.hs -hide-all-packages '-Werror=incomplete-patterns' '-Werror=missing-fields'
Running: /home/f/media/vcs/ghc/9.10.1/bin/ghc '@/tmp/ghc792330-15.rsp'
[1 of 1] Compiling Main ( example/ContactManager.hs, dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp/Main.o )
Linking...
GHC response file arguments: '-package-env=-' --make -fbuilding-cabal-package -O -static -outputdir dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -odir dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -hidir dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -hiedir dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp/extra-compilation-artifacts/hie -stubdir dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -i -iexample -idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/autogen -idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/global-autogen -Idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/autogen -Idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/global-autogen -Idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -optP-include -optPdist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/autogen/cabal_macros.h -this-unit-id hscurses-1.5.0.0-inplace-contact-manager -hide-all-packages -Wmissing-home-modules -no-user-package-db -package-db /home/f/.local/state/cabal/store/ghc-9.10.1-25ec/package.db -package-db /tmp/hscurses/dist-newstyle/packagedb/ghc-9.10.1 -package-db dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/package.conf.inplace -package-id base-4.20.0.0-1f57 -package-id hscurses-1.5.0.0-inplace -package-id mtl-2.3.1-aac9 -package-id pretty-1.1.3.6-7049 -XHaskell2010 example/ContactManager.hs -o dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager -hide-all-packages '-Werror=incomplete-patterns' '-Werror=missing-fields'
Running: /home/f/media/vcs/ghc/9.10.1/bin/ghc '@/tmp/ghc792330-16.rsp'
[2 of 2] Linking dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager
Using self-exec internal setup method with build-type Configure and args:
["act-as-setup","--build-type=Configure","--","--working-dir=/tmp/hscurses/.","register","--verbose=2","--builddir=dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0","--inplace","--gen-pkg-config=/tmp/hscurses/dist-newstyle/tmp/package-registration--790584/pkgConf"]
/home/f/.local/bin/cabal act-as-setup --build-type=Configure --
--working-dir=/tmp/hscurses/. register --verbose=2
--builddir=dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0
--inplace
--gen-pkg-config=/tmp/hscurses/dist-newstyle/tmp/package-registration--790584/pkgConf
Including the following environment variable overrides:
- hscurses_datadir=/tmp/hscurses/./.
Running: /home/f/.local/bin/cabal act-as-setup '--build-type=Configure' -- '--working-dir=/tmp/hscurses/.' register '--verbose=2' '--builddir=dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0' --inplace '--gen-pkg-config=/tmp/hscurses/dist-newstyle/tmp/package-registration--790584/pkgConf'
For 3.10:
Building library for hscurses-1.5.0.0..
creating
/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build
Running: /home/f/media/vcs/ghc/9.10.1/bin/ghc --make -fbuilding-cabal-package -O -static -dynamic-too -dynosuf dyn_o -dynhisuf dyn_hi -outputdir /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build -odir /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build -hidir /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build -stubdir /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build -i -i/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build -i. -i/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/autogen -i/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/global-autogen -I/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/autogen -I/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/global-autogen -I/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build -Icbits -I/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/cbits -optP-include -optP/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/autogen/cabal_macros.h -this-unit-id hscurses-1.5.0.0-inplace -hide-all-packages -Wmissing-home-modules -no-user-package-db -package-db /home/f/.local/state/cabal/store/ghc-9.10.1/package.db -package-db /tmp/hscurses/dist-newstyle/packagedb/ghc-9.10.1 -package-db /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/package.conf.inplace -package-id base-4.20.0.0-1f57 -package-id exceptions-0.10.7-087b -package-id mtl-2.3.1-aac9 -package-id time-1.12.2-dfcf -package-id unix-2.8.5.1-651f -XHaskell2010 -XCPP -XExistentialQuantification -XForeignFunctionInterface -XGeneralizedNewtypeDeriving -XScopedTypeVariables UI.HSCurses.Curses UI.HSCurses.CursesHelper UI.HSCurses.Logging UI.HSCurses.Widgets UI.HSCurses.CWString UI.HSCurses.IConv -funbox-strict-fields -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -hide-all-packages '-Werror=incomplete-patterns' '-Werror=missing-fields'
[1 of 6] Compiling UI.HSCurses.CWString ( /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/CWString.hs, /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/CWString.o, /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/CWString.dyn_o )
[2 of 6] Compiling UI.HSCurses.IConv ( /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/IConv.hs, /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/IConv.o, /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/IConv.dyn_o )
[3 of 6] Compiling UI.HSCurses.Logging ( UI/HSCurses/Logging.hs, /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/Logging.o, /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/Logging.dyn_o )
[4 of 6] Compiling UI.HSCurses.Curses ( /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/Curses.hs, /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/Curses.o, /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/Curses.dyn_o )
[5 of 6] Compiling UI.HSCurses.CursesHelper ( UI/HSCurses/CursesHelper.hs, /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/CursesHelper.o, /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/CursesHelper.dyn_o )
[6 of 6] Compiling UI.HSCurses.Widgets ( UI/HSCurses/Widgets.hs, /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/Widgets.o, /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/Widgets.dyn_o )
Building C Sources...
creating dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build
Running: /home/f/media/vcs/ghc/9.10.1/bin/ghc -c -fPIC -odir dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build -I/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/autogen -I/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/global-autogen -Idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build -Icbits -I/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/cbits -optc-O2 -pgmc /usr/bin/gcc -hide-all-packages -no-user-package-db -package-db /home/f/.local/state/cabal/store/ghc-9.10.1/package.db -package-db /tmp/hscurses/dist-newstyle/packagedb/ghc-9.10.1 -package-db /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/package.conf.inplace -package-id base-4.20.0.0-1f57 -package-id exceptions-0.10.7-087b -package-id mtl-2.3.1-aac9 -package-id time-1.12.2-dfcf -package-id unix-2.8.5.1-651f cbits/HSCursesUtils.c -funbox-strict-fields -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -hide-all-packages '-Werror=incomplete-patterns' '-Werror=missing-fields'
Running: /home/f/media/vcs/ghc/9.10.1/bin/ghc -c -dynamic -fPIC -osuf dyn_o -odir dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build -I/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/autogen -I/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/global-autogen -Idist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build -Icbits -I/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/cbits -optc-O2 -pgmc /usr/bin/gcc -hide-all-packages -no-user-package-db -package-db /home/f/.local/state/cabal/store/ghc-9.10.1/package.db -package-db /tmp/hscurses/dist-newstyle/packagedb/ghc-9.10.1 -package-db /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/package.conf.inplace -package-id base-4.20.0.0-1f57 -package-id exceptions-0.10.7-087b -package-id mtl-2.3.1-aac9 -package-id time-1.12.2-dfcf -package-id unix-2.8.5.1-651f cbits/HSCursesUtils.c -funbox-strict-fields -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -hide-all-packages '-Werror=incomplete-patterns' '-Werror=missing-fields'
Linking...
[(DefiniteUnitId (DefUnitId {unDefUnitId = UnitId
"base-4.20.0.0-1f57"}),DefaultRenaming),(DefiniteUnitId (DefUnitId
{unDefUnitId = UnitId
"exceptions-0.10.7-087b"}),DefaultRenaming),(DefiniteUnitId (DefUnitId
{unDefUnitId = UnitId "mtl-2.3.1-aac9"}),DefaultRenaming),(DefiniteUnitId
(DefUnitId {unDefUnitId = UnitId
"time-1.12.2-dfcf"}),DefaultRenaming),(DefiniteUnitId (DefUnitId {unDefUnitId
= UnitId "unix-2.8.5.1-651f"}),DefaultRenaming)]
Running: /usr/bin/ar -r dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/objs-806504/libHShscurses-1.5.0.0-inplace.a '@dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/objs-806504/ar806504-6.rsp'
Running: /home/f/media/vcs/ghc/9.10.1/bin/ghc -shared -dynamic -lncursesw -lncurses '-dynload deploy' -optl-Wl,-rpath,/home/f/media/vcs/ghc/9.10.1/lib/ghc-9.10.1/lib/x86_64-linux-ghc-9.10.1 -this-unit-id hscurses-1.5.0.0-inplace -hide-all-packages -no-auto-link-packages -no-user-package-db -package-db /home/f/.local/state/cabal/store/ghc-9.10.1/package.db -package-db /tmp/hscurses/dist-newstyle/packagedb/ghc-9.10.1 -package-db /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/package.conf.inplace -package-id base-4.20.0.0-1f57 -package-id exceptions-0.10.7-087b -package-id mtl-2.3.1-aac9 -package-id time-1.12.2-dfcf -package-id unix-2.8.5.1-651f dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/Curses.dyn_o dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/CursesHelper.dyn_o dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/Logging.dyn_o dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/Widgets.dyn_o dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/CWString.dyn_o dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/UI/HSCurses/IConv.dyn_o dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/cbits/HSCursesUtils.dyn_o -o dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/libHShscurses-1.5.0.0-inplace-ghc9.10.1.so -hide-all-packages '-Werror=incomplete-patterns' '-Werror=missing-fields'
Running: /home/f/media/vcs/ghc/9.10.1/bin/ghc-pkg-9.10.1 recache '--package-db=/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/package.conf.inplace'
creating
/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager
creating
/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/autogen
creating
/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/autogen
creating
/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/autogen
Preprocessing executable 'contact-manager' for hscurses-1.5.0.0..
Building executable 'contact-manager' for hscurses-1.5.0.0..
creating
/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager
creating
/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp
Running: /home/f/media/vcs/ghc/9.10.1/bin/ghc --make -no-link -fbuilding-cabal-package -O -static -outputdir /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -odir /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -hidir /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -stubdir /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -i -i/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -iexample -i/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/autogen -i/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/global-autogen -I/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/autogen -I/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/global-autogen -I/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -optP-include -optP/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/autogen/cabal_macros.h -hide-all-packages -Wmissing-home-modules -no-user-package-db -package-db /home/f/.local/state/cabal/store/ghc-9.10.1/package.db -package-db /tmp/hscurses/dist-newstyle/packagedb/ghc-9.10.1 -package-db /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/package.conf.inplace -package-id base-4.20.0.0-1f57 -package-id hscurses-1.5.0.0-inplace -package-id mtl-2.3.1-aac9 -package-id pretty-1.1.3.6-7049 -XHaskell2010 example/ContactManager.hs -hide-all-packages '-Werror=incomplete-patterns' '-Werror=missing-fields'
[1 of 1] Compiling Main ( example/ContactManager.hs, /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp/Main.o )
Linking...
Running: /home/f/media/vcs/ghc/9.10.1/bin/ghc --make -fbuilding-cabal-package -O -static -outputdir /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -odir /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -hidir /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -stubdir /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -i -i/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -iexample -i/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/autogen -i/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/global-autogen -I/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/autogen -I/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/global-autogen -I/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager-tmp -optP-include -optP/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/autogen/cabal_macros.h -hide-all-packages -Wmissing-home-modules -no-user-package-db -package-db /home/f/.local/state/cabal/store/ghc-9.10.1/package.db -package-db /tmp/hscurses/dist-newstyle/packagedb/ghc-9.10.1 -package-db /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/package.conf.inplace -package-id base-4.20.0.0-1f57 -package-id hscurses-1.5.0.0-inplace -package-id mtl-2.3.1-aac9 -package-id pretty-1.1.3.6-7049 -XHaskell2010 example/ContactManager.hs -o /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager -hide-all-packages '-Werror=incomplete-patterns' '-Werror=missing-fields'
[2 of 2] Linking /tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager
Using self-exec internal setup method with build-type Configure and args:
["act-as-setup","--build-type=Configure","--","register","--verbose=2","--builddir=/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0","--inplace","--gen-pkg-config=/tmp/hscurses/dist-newstyle/tmp/package-registration--804016/pkgConf"]
/home/f/.local/bin/cabal-3.10 act-as-setup --build-type=Configure -- register
--verbose=2
--builddir=/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0
--inplace
--gen-pkg-config=/tmp/hscurses/dist-newstyle/tmp/package-registration--804016/pkgConf
Running: /home/f/.local/bin/cabal-3.10 act-as-setup '--build-type=Configure' -- register '--verbose=2' '--builddir=/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0' --inplace '--gen-pkg-config=/tmp/hscurses/dist-newstyle/tmp/package-registration--804016/pkgConf'
Reading parameters from
/tmp/hscurses/dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/hscurses.buildinfo
cabal freeze has the same output for head and 3.10.
git bisect says:
2d07efe3580a9fe8f1191d26056307d47205462c
#9969
@sheaf
The tip of 3.12 does not show this problem.
Thanks for bisecting this. I will try to figure out what is going on.
I can't reproduce this on NixOS. With cabal-install 3.14.2.0, the example works correctly for me. Here is the ldd output:
ldd dist-newstyle/build/x86_64-linux/ghc-9.4.6/hscurses-1.5.0.0/build/contact-manager/contact-manager
linux-vdso.so.1 (0x00007fffbcfc7000)
libm.so.6 => /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libm.so.6 (0x00007ffb00489000)
libncursesw.so.6 => /nix/store/d48d0ppksa6gwxjlkwf2i93rilyv9jvq-ncurses-6.4/lib/libncursesw.so.6 (0x00007ffb00415000)
libgmp.so.10 => /nix/store/qmfxliqa7drz0vamnr475jw5l5j01plx-gmp-with-cxx-6.3.0/lib/libgmp.so.10 (0x00007ffb00372000)
libc.so.6 => /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libc.so.6 (0x00007ffb0018c000)
librt.so.1 => /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/librt.so.1 (0x00007ffb00185000)
libdl.so.2 => /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/libdl.so.2 (0x00007ffb00180000)
libffi.so.8 => /nix/store/35badg7gpxkhyzcrdyh2dfi9wfd43phz-libffi-3.4.4/lib/libffi.so.8 (0x00007ffb00173000)
/nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/ld-linux-x86-64.so.2 => /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib64/ld-linux-x86-64.so.2 (0x00007ffb0056b000)
Mhhh, I tried cabal-install 3.14.2.0 (compiled using version 3.14.2.0 of the Cabal library), Debian 12 (bookworm). It does not work.
ldd output:
$ ldd dist-newstyle/build/x86_64-linux/ghc-9.10.1/hscurses-1.5.0.0/build/contact-manager/contact-manager
linux-vdso.so.1 (0x00007ffdfddf6000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f97aaddb000)
libncurses.so.6 => /lib/x86_64-linux-gnu/libncurses.so.6 (0x00007f97aadb2000)
libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007f97aad7f000)
libncursesw.so.6 => /lib/x86_64-linux-gnu/libncursesw.so.6 (0x00007f97aad45000)
libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f97aacc4000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f97aaae1000)
/lib64/ld-linux-x86-64.so.2 (0x00007f97aaee0000)
I investigated with the help of @mpickering. Here is our analysis:
hscurses.cabalcontainsextra-libraries: ncurses.hscursesuse the configure build type, with the configure script producinghscurses.buildinfo. Thehscurses.buildinfo.infile is:extra-libraries: @CURSES@.
On a system in which configuring results in CURSES=ncursesw (such as Debian/Fedora as reported in the OP), the behaviour is as follows:
- With
cabal-installversion 3.12 or lower, we combine them in the orderextra-libraries: ncursesw ncurses, which works. - With
cabal-installversion 3.14, we combine theextra-librariesreturned by the configure script on the right, so we end up gettingextra-libraries: ncurses ncursesw, which does not work.
I couldn't find any documentation of what behaviour is expected. My naive expectation would be that the extra-libraries returned by the configure script should be added on later, but one can argue that because the behaviour was the other way around for so long that it has set a certain expectation.
My opinion is that the library should be extra clear about the ordering which it wants the libraries to be specified, so I argue it should remove the extra-libraries: ncurses from its cabal file, because the correct library is found and specified by the configure script. If one really wants both, then one should be explicit about ordering in the hscurses.buildinfo.in file, by writing:
extra-libraries: @CURSES@ ncurses
What do other people think? Do we explicitly want to preserve the old behaviour?
My naive expectation would be that the extra-libraries returned by the configure script should be added on later
And the last one gets picked, right? In this case, it seems quite reasonable.
My opinion is that the library should be extra clear about the ordering which it wants the libraries to be specified, so I argue it should remove the extra-libraries: ncurses from its cabal file, because the correct library is found and specified by the configure script.
Makes sense!
I confirm that
diff --git a/hscurses.cabal b/hscurses.cabal
index 43f723b..8ea5c01 100644
--- a/hscurses.cabal
+++ b/hscurses.cabal
@@ -74,8 +74,6 @@ library
, mtl <2.4
, time <1.15
- extra-libraries: ncurses
-
if !os(windows)
build-depends: unix <2.9
builds a working executable, with both cabal-install-3.14.2.0 and -3.12.1.0 (ghc-9.12.2, on Fedora-42)
I couldn't find any documentation of what behaviour is expected.
@sheaf would you mind telling us where you looked?
Release is getting nearer and I would like to document this, but I would not know where to modify the manual.