FS#56101 - [stack] ncurses update causes issues compiling some software

Attached to Project: Community Packages
Opened by Dominik Schrempf (dschrempf) - Tuesday, 24 October 2017, 08:59 GMT
Last edited by Ivy Foster (escondida) - Friday, 11 October 2019, 19:33 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 6
Private No

Details

Description:
When installing Haskell `stack` from the Arch package repositories, `stack` fails to build several packages, one of those is `network`. The problem seems to be the `ncurses` library, because installing `ncurses-full` from the AUR fixes the problem for `stack`, but then other problems related to Haskell occur (e.g., the xmonad.hs can not be recompiled, because libtnfo is missing).

Additional info:
* package version(s)
Name : stack
Version : 1.5.1.20170916-9

Name : ncurses
Version : 6.0+20170902-2

Repository : aur
Name : ncurses-full
Version : 6.0+20170902-1

* configName and/or log files etc.
None.

Steps to reproduce:
Here, I use the package `network` to demonstrate the problem, but I think other packages also fail to build.

pacman -S ncurses stack
stack unpack network
cd network-2.6.3.2
stack init
stack build

The following error occurs:

network-2.6.3.2: configure (lib)
[1 of 2] Compiling Main ( /home/dominik/network-2.6.3.2/Setup.hs, /home/dominik/network-2.6.3.2/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/setup/Main.o )
[2 of 2] Compiling StackSetupShim ( /home/dominik/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /home/dominik/network-2.6.3.2/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/setup/StackSetupShim.o )
Linking /home/dominik/network-2.6.3.2/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/setup/setup ...
Configuring network-2.6.3.2...
configure: WARNING: unrecognized options: --with-compiler
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... /usr/bin/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
configure: error: in `/home/dominik/network-2.6.3.2':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
checking whether we are cross compiling...

-- While building package network-2.6.3.2 using:
/home/dominik/network-2.6.3.2/.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0/setup/setup --builddir=.stack-work/dist/x86_64-linux-tinfo6-nopie/Cabal-1.24.2.0 configure --with-ghc=/home/dominik/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/bin/ghc --with-ghc-pkg=/home/dominik/.stack/programs/x86_64-linux/ghc-tinfo6-nopie-8.0.2/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/home/dominik/.stack/snapshots/x86_64-linux-tinfo6-nopie/lts-9.10/8.0.2/pkgdb --package-db=/home/dominik/network-2.6.3.2/.stack-work/install/x86_64-linux-tinfo6-nopie/lts-9.10/8.0.2/pkgdb --libdir=/home/dominik/network-2.6.3.2/.stack-work/install/x86_64-linux-tinfo6-nopie/lts-9.10/8.0.2/lib --bindir=/home/dominik/network-2.6.3.2/.stack-work/install/x86_64-linux-tinfo6-nopie/lts-9.10/8.0.2/bin --datadir=/home/dominik/network-2.6.3.2/.stack-work/install/x86_64-linux-tinfo6-nopie/lts-9.10/8.0.2/share --libexecdir=/home/dominik/network-2.6.3.2/.stack-work/install/x86_64-linux-tinfo6-nopie/lts-9.10/8.0.2/libexec --sysconfdir=/home/dominik/network-2.6.3.2/.stack-work/install/x86_64-linux-tinfo6-nopie/lts-9.10/8.0.2/etc --docdir=/home/dominik/network-2.6.3.2/.stack-work/install/x86_64-linux-tinfo6-nopie/lts-9.10/8.0.2/doc/network-2.6.3.2 --htmldir=/home/dominik/network-2.6.3.2/.stack-work/install/x86_64-linux-tinfo6-nopie/lts-9.10/8.0.2/doc/network-2.6.3.2 --haddockdir=/home/dominik/network-2.6.3.2/.stack-work/install/x86_64-linux-tinfo6-nopie/lts-9.10/8.0.2/doc/network-2.6.3.2 --dependency=base=base-4.9.1.0 --dependency=bytestring=bytestring-0.10.8.1 --dependency=unix=unix-2.7.2.1 --enable-benchmarks
Process exited with code: ExitFailure 1

This task depends upon

Closed by  Ivy Foster (escondida)
Friday, 11 October 2019, 19:33 GMT
Reason for closing:  Fixed
Additional comments about closing:  Seems this was teething pains with ncurses changes at the time.
Comment by Dominik Schrempf (dschrempf) - Tuesday, 24 October 2017, 08:59 GMT Comment by Steven Williams (flounders) - Tuesday, 24 October 2017, 15:55 GMT
It looks like ncurses-full does not have /usr/lib/libtinfo.so.6.0+20170902 which it is supposed to symlink to. I just put a comment on the AUR package (https://aur.archlinux.org/packages/ncurses-full/#comment-617872). I'm attaching the config.log file that is produced from the steps Dominik outlined. The ideal solution would be to fix the main ncurses package so that we don't have to go to AUR to solve our problem.

Comment by Brian Gomes Bascoy (pera) - Friday, 10 November 2017, 18:05 GMT
This issue with ncurses and tinfo started after this change:

https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/ncurses&id=e5cd527d1ab09e10ae44fdfd1c4ab16a4ad993bf

which adds these following two parameters to autoconf's configure: --with-termlib=tinfo --with-ticlib=tic

Aside of the symlink problem, both ncurses5-compat-libs and ncurses-full on AUR don't include those parameters.
Comment by Ivy Foster (escondida) - Friday, 11 October 2019, 00:12 GMT
dschrempf, do you still run into this issue?
Comment by Dominik Schrempf (dschrempf) - Friday, 11 October 2019, 08:26 GMT
No! Everything works fine! If I am not mistaken, this may be related to stack working fine now with position indipendent executables (PIE). At the time of this bug report, it was still necessary to use the nopie GHC versions. However, this is only a guess. Thanks!
Comment by Ivy Foster (escondida) - Friday, 11 October 2019, 19:33 GMT
Thank *you*!

Loading...