Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 916785 - dev-haskell/pandoc-lua-engine-0.2.1.2 - setup build failed
Summary: dev-haskell/pandoc-lua-engine-0.2.1.2 - setup build failed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Haskell Language team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-11-04 08:49 UTC by Toralf Förster
Modified: 2025-05-15 07:11 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,18.77 KB, text/plain)
2023-11-04 08:49 UTC, Toralf Förster
Details
dev-haskell:pandoc-lua-engine-0.2.1.2:20231104-010529.log (dev-haskell:pandoc-lua-engine-0.2.1.2:20231104-010529.log,11.76 KB, text/plain)
2023-11-04 08:49 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,227.94 KB, text/plain)
2023-11-04 08:49 UTC, Toralf Förster
Details
environment (environment,87.36 KB, text/plain)
2023-11-04 08:49 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.07 KB, application/x-xz)
2023-11-04 08:49 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,33.72 KB, application/x-xz)
2023-11-04 08:49 UTC, Toralf Förster
Details
qlist-info.txt.xz (qlist-info.txt.xz,58.20 KB, application/x-xz)
2023-11-04 08:49 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,22.50 KB, application/x-xz)
2023-11-04 08:49 UTC, Toralf Förster
Details
emerge pandoc from scratch (emerge -pv pandoc.txt,25.54 KB, text/plain)
2025-02-21 23:40 UTC, Maxim P. Dementiev
Details
pandoc-lua-engine failed with "cannot satisfy -package-id pandoc" (pandoc-lua-engine-0.2.1.2-build.log,11.87 KB, text/plain)
2025-02-21 23:42 UTC, Maxim P. Dementiev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2023-11-04 08:49:17 UTC
./setup build
Preprocessing library for pandoc-lua-engine-0.2.1.2..
Building library for pandoc-lua-engine-0.2.1.2..
<command line>: cannot satisfy -package-id pandoc-3.1.8-JYWN9o3oeAHCqChwENid4M
    (use -v for more information)
 * ERROR: dev-haskell/pandoc-lua-engine-0.2.1.2::gentoo failed (compile phase):
 *   setup build failed
 * 
 * Call stack:

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_no_multilib_hardened-20231031-113534

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-10
 [2] x86_64-pc-linux-gnu-13 *
clang/llvm (if any):
clang version 17.0.4
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/17/bin
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
/usr/lib/llvm/17
17.0.4
Python 3.11.6
Available Ruby profiles:
  [1]   ruby31 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.73.0 *
The following VMs are available for generation-2:
*)	Eclipse Temurin JDK 21.0.1_p12 [openjdk-bin-21]
2)	Eclipse Temurin JDK 8.382_p05 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-21  system-vm

The Glorious Glasgow Haskell Compilation System, version 9.2.8
php cli (if any):
  [1]   php8.1
  [2]   php8.2 *
go version go1.21.3 linux/amd64

  HEAD of ::gentoo
commit 4f897cb22032ccce1d87b2b902666d65f583f4da
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Fri Nov 3 23:47:00 2023 +0000

    2023-11-03 23:46:59 UTC

emerge -qpvO dev-haskell/pandoc-lua-engine
[ebuild  N    ] dev-haskell/pandoc-lua-engine-0.2.1.2  USE="-doc -hscolour -profile -test"
Comment 1 Toralf Förster gentoo-dev 2023-11-04 08:49:18 UTC
Created attachment 874010 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-11-04 08:49:19 UTC
Created attachment 874011 [details]
dev-haskell:pandoc-lua-engine-0.2.1.2:20231104-010529.log
Comment 3 Toralf Förster gentoo-dev 2023-11-04 08:49:20 UTC
Created attachment 874012 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2023-11-04 08:49:21 UTC
Created attachment 874013 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2023-11-04 08:49:22 UTC
Created attachment 874014 [details]
etc.clang.tar.xz
Comment 6 Toralf Förster gentoo-dev 2023-11-04 08:49:23 UTC
Created attachment 874015 [details]
etc.portage.tar.xz
Comment 7 Toralf Förster gentoo-dev 2023-11-04 08:49:24 UTC
Created attachment 874016 [details]
qlist-info.txt.xz
Comment 8 Toralf Förster gentoo-dev 2023-11-04 08:49:25 UTC
Created attachment 874017 [details]
temp.tar.xz
Comment 9 hololeap 2023-11-04 22:27:34 UTC
This has also been reported on the gentoo-haskell github issue tracker:

https://github.com/gentoo-haskell/gentoo-haskell/issues/1469
Comment 10 benoit.dufour 2025-02-18 14:32:27 UTC
Like for this comment on the GitHub issue tracker:
https://github.com/gentoo-haskell/gentoo-haskell/issues/1469#issuecomment-2551719624
It was solved for me by emerging dev-haskell/cabal-install first.
It's a nonsense bug fix but it the trick.
On another computer, I emerged directly all latest haskell packages from ::haskell, and dev-haskell/pandoc-lua-engine-0.4.1 got installed correctly without I had to first emerge dev-haskell/cabal-install.
Comment 11 Maxim P. Dementiev 2025-02-21 23:40:31 UTC
Created attachment 919653 [details]
emerge pandoc from scratch

Thanks @benoit.dufour, you saved me a lot of time!

I'm encountering the same issue. I'm trying to install Pandoc from scratch on my Gentoo system. I've attached two files: "pandoc-lua-engine-0.2.1.2-build.log" (build log) and "emerge -pv pandoc.txt" (emerge output).

As you suggested, manually installing dev-haskell/cabal-install resolved the problem.  This package is missing from the dependencies listed in the emerge -pv pandoc.txt output and should be added.
Comment 12 Maxim P. Dementiev 2025-02-21 23:42:34 UTC
Created attachment 919654 [details]
pandoc-lua-engine failed with "cannot satisfy -package-id pandoc"

<command line>: cannot satisfy -package-id pandoc-3.1.8-Iblz6E732uI1jCpqtnlIYL
    (use -v for more information)
Comment 13 Maxim P. Dementiev 2025-02-21 23:48:22 UTC
In fact, nothing depends on this package, 'equery d --all-packages dev-haskell/cabal-instal' gives zero list.
Comment 14 benoit.dufour 2025-02-21 23:59:33 UTC
> "In fact, nothing depends on this package, 'equery d --all-packages dev-haskell/cabal-instal' gives zero list."

Either 'dev-haskell/pandoc-lua-engine' should depend directly on 'dev-haskell/cabal-install', or should depend on one of the dependencies of 'dev-haskell/cabal-install'
So that missing dependency should be added as either a BDEPENP or DEPEND to the 'dev-haskell/pandoc-lua-engine' current ebuild.
Or another kind of nonsense edge-case bugfix is required.
Comment 15 Tom Gillespie 2025-04-04 22:32:05 UTC
Another solution that works for me in this context is to run emerge dev-haskell/pandoc again and after that emerge dev-haskell/pandoc-lua-engine succeeds. I have attached the old (broken) and new (working) gpkg files from dev-haskell/pandoc in case the difference between the two might reveal the underlying problem.
Comment 16 Tom Gillespie 2025-04-05 00:23:58 UTC
Ok. Here's the issue. ghc-pkg list -v produces the following warning when run in the state where the build fails:

WARNING: cache is out of date: /usr/lib/ghc-9.2.8/package.conf.d/package.cache
ghc will see an old view of this package db. Use 'ghc-pkg recache' to fix.

Running ghc-pkg recache fixes the issue and allows pandoc-lua-engine to build without the previously mentioned hack.

The question is why ghc-pkg recache is not running or not running in time. I guessing that it might be because somehow pandoc-lua-engine starts building before ghc-package_pkg_postinst is run for dev-haskell/pandoc.

Would adding dev-haskell/pandoc to BDEPEND for dev-haskell/pandoc-lua-engine avoid the issue?
Comment 17 Larry the Git Cow gentoo-dev 2025-05-15 07:11:00 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ae4c6d315b09451163b0f8fdc95b52ce1f1374c

commit 8ae4c6d315b09451163b0f8fdc95b52ce1f1374c
Author:     hololeap <hololeap@protonmail.com>
AuthorDate: 2025-04-12 17:41:40 +0000
Commit:     Arsen Arsenović <arsen@gentoo.org>
CommitDate: 2025-05-15 07:09:53 +0000

    haskell-cabal.eclass: Add early check for invalid GHC cache
    
    If the GHC cache is invalid, it can create a confusing error during
    src_compile. Add a check in haskell-cabal-pkg_setup that checks for
    and fixes an invalid cache.
    
    Closes: https://bugs.gentoo.org/916785
    Closes: https://bugs.gentoo.org/916971
    Closes: https://bugs.gentoo.org/920879
    Closes: https://github.com/gentoo-haskell/gentoo-haskell/issues/1469
    Thanks-to: Tom Gillespie <tgbugs@gmail.com>
    Signed-off-by: hololeap <hololeap@protonmail.com>
    Part-of: https://github.com/gentoo/gentoo/pull/41562
    Closes: https://github.com/gentoo/gentoo/pull/41562
    Signed-off-by: Arsen Arsenović <arsen@gentoo.org>

 eclass/haskell-cabal.eclass | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)