Created attachment 778406 [details] emerge --info The interesting part is: ``` Building library for skylighting-core-0.12.3.. ghc: panic! (the 'impossible' happened) (GHC version 9.0.2: ModOrigin: hidden module redefined Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug ``` I think it's related to: https://gitlab.haskell.org/ghc/ghc/-/issues/21097
Created attachment 778409 [details] build log Sorry, forgot the build log.
Well, since nobody else confirmed this, I tried to unmerge and re-emerge the packages rather than just run `haskell-update`. This time, I got everything compiled.
I have the same troubles since some weeks. Lets say, the whole haskell stack is a mess leaving me with unbuildable git-annex but this is another problem. This problem prevent a normal rebuild. I did not find any way to rebuild except of unmerging all haskell stack and remerged it. This is a big wast of recources.
Same here, I can't rebuild skylighting-core-0.12.3. I'll keep my old build around for a bit in case there is any testing that can be done.
(In reply to Khumba from comment #4) > Same here, I can't rebuild skylighting-core-0.12.3. I'll keep my old build > around for a bit in case there is any testing that can be done. Just unmerge relevant packages and run haskell-updater. If that ends up error, do that again. Eventually, you'll get there. My record is 3 times. I put everything Haskell related in a set, and if the list of the crying packages is too long, I'll just unmerge the whole haskell tree and merge the set.
Yesterday, skylighting compiled successfull and today I have the very same Trouble with hslua: Preprocessing library for hslua-core-2.2.0.. Building library for hslua-core-2.2.0.. ghc: panic! (the 'impossible' happened) (GHC version 9.0.2: ModOrigin: hidden module redefined So that seems to be a heavy bug in haskell itself!
(In reply to Klaus Ethgen from comment #6) > Yesterday, skylighting compiled successfull and today I have the very same > Trouble with hslua: > > Preprocessing library for hslua-core-2.2.0.. > Building library for hslua-core-2.2.0.. > ghc: panic! (the 'impossible' happened) > (GHC version 9.0.2: > ModOrigin: hidden module redefined > > So that seems to be a heavy bug in haskell itself! Is this happening with the latest ghc in ::gentoo? It is a known upstream ghc bug, but we should be carrying patches for this in the ghc-9.0.2 ebuild.
(In reply to Zhichu Chen from comment #5) > (In reply to Khumba from comment #4) > > Same here, I can't rebuild skylighting-core-0.12.3. I'll keep my old build > > around for a bit in case there is any testing that can be done. > > Just unmerge relevant packages and run haskell-updater. If that ends up > error, do that again. Eventually, you'll get there. My record is 3 times. Thanks, I'm sure that will fix it. In the mean time, I'm happy to keep the broken hslua packages around for debugging if that'll help. (In reply to Jack Todaro from comment #7) > Is this happening with the latest ghc in ::gentoo? It is a known upstream > ghc bug, but we should be carrying patches for this in the ghc-9.0.2 ebuild. I'm experiencing it with ghc-9.0.2-r1::haskell, which I assume is ahead of ghc::gentoo in terms of patches. Would that make a difference? (I've got a mostly stable amd64 system with ~amd64 for dev-haskell/*::gentoo and */*::haskell.)
(In reply to Khumba from comment #8) > I'm experiencing it with ghc-9.0.2-r1::haskell, which I assume is ahead of > ghc::gentoo in terms of patches. Would that make a difference? > > (I've got a mostly stable amd64 system with ~amd64 for dev-haskell/*::gentoo > and */*::haskell.) They should be identical: the patch in question is `ghc-9.0.2-modorigin-semigroup.patch` which was provided by ghc upstream. Just to be clear: you've done `emaint sync -r haskell` or equivalent recently and you're still getting this modorigin error? If so we may need to get in touch with upstream again, if we've exhausted other possible causes. It's odd as I have not run into this problem (nor the other ::haskell maintainers) since we applied that patch. The version of skylighting-core being merged should be 0.12.3.1.
(In reply to Jack Todaro from comment #9) > (In reply to Khumba from comment #8) > > I'm experiencing it with ghc-9.0.2-r1::haskell, which I assume is ahead of > > ghc::gentoo in terms of patches. Would that make a difference? > > > > (I've got a mostly stable amd64 system with ~amd64 for dev-haskell/*::gentoo > > and */*::haskell.) > > They should be identical: the patch in question is > `ghc-9.0.2-modorigin-semigroup.patch` which was provided by ghc upstream. > Just to be clear: you've done `emaint sync -r haskell` or equivalent > recently and you're still getting this modorigin error? If so we may need to > get in touch with upstream again, if we've exhausted other possible causes. > > It's odd as I have not run into this problem (nor the other ::haskell > maintainers) since we applied that patch. > > The version of skylighting-core being merged should be 0.12.3.1. Yes, I have an up-to-date haskell repo: /var/db/repos/haskell # git log | head -3 commit 05f92d39c7b9ad0d193cbd8ad7a93b1215e0860f Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Thu Jul 28 09:01:37 2022 +0000 Would it matter that I have USE=binary set on ghc? haskell-updater hasn't made it to updating any skylighting packages yet for me. I got this error on hslua-core, fixed it by unmerging then remerging hslua-core, and now I get the same error on hslua-classes (updating to 2.2.0::haskell from 2.1.0::haskell). haskell-updater fails immediately on hslua-classes, then it aborts. In case the order of merges is relevant: # qlop -mutv ghc hslua-core hslua-classes 2021-09-05T20:12:01 >>> dev-lang/ghc-8.10.6: 2′39″ 2022-01-31T12:09:28 >>> dev-haskell/hslua-core-2.0.0.2: 16s 2022-01-31T12:28:23 >>> dev-haskell/hslua-classes-2.0.0: 14s 2022-02-25T23:33:40 <<< dev-haskell/hslua-core-2.0.0.2: 3s 2022-02-25T23:36:25 <<< dev-haskell/hslua-classes-2.0.0: 3s 2022-02-26T00:40:28 >>> dev-lang/ghc-9.0.2-r1: 1′53″ 2022-02-26T10:43:36 >>> dev-haskell/hslua-core-2.0.0.2: 29s 2022-02-26T10:55:02 >>> dev-haskell/hslua-classes-2.0.0: 21s 2022-04-19T21:40:34 <<< dev-haskell/hslua-core-2.0.0.2: 5s 2022-04-19T21:41:14 >>> dev-haskell/hslua-core-2.1.0: 17s 2022-04-19T21:42:07 <<< dev-haskell/hslua-classes-2.0.0: 4s 2022-04-19T22:04:15 >>> dev-haskell/hslua-classes-2.1.0: 15s 2022-07-18T22:55:16 >>> dev-lang/ghc-9.0.2-r1: 1′55″ 2022-07-23T10:42:15 <<< dev-haskell/hslua-core-2.1.0: 3s 2022-07-23T10:42:30 >>> dev-haskell/hslua-core-2.2.0: 15s (Whenever GHC itself updates I purge dev-haskell/* since I've found that necessary in the past, so all of my Haskell packages have been built with the latest GHC.)
Please share: 1. emerge --info 2. the full build.log of the latest failure.
Created attachment 795934 [details] build log hslua-classes-2.2.0:20220731-042419.log
Created attachment 795937 [details] emerge --info hslua-classes
(In reply to Khumba from comment #10) > Would it matter that I have USE=binary set on ghc? That would be the issue - but it is not your fault. ghc-9.0.2 was released upstream with a bug causing the panic you are getting. When we were generating the ghc-9.0.2 bootstrap binaries (which can be directly installed with USE=binary), the upstream bug wasn't found yet. We ended up running into the issue later on, reporting upstream, receiving a patch and applying it to ghc-9.0.2 - but the binary was not rebuilt to carry the patch as we had not run into the issue when building ghc-9.0.2 without USE=binary. Until I can regenerate the binaries you may need to disable USE=binary. But I shouldn't be long if you are okay to wait. Newer versions of ghc fix this problem upstream, so this shouldn't be an issue again in the future. Thanks for reporting!
Ah, yes disabling USE=binary on ghc fixes it for me, thanks. (Not sure if this is Zhichu Chen's problem?)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd0927e086d7352675d44ff37500805143f3d380 commit dd0927e086d7352675d44ff37500805143f3d380 Author: Jack Todaro <solpeth@posteo.org> AuthorDate: 2022-10-01 23:44:43 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-10-15 00:56:53 +0000 dev-lang/ghc: update bootstrap binary Updated bootstrap binary has been built with the upstream ModOrigin patch applied, as is applied when building ghc using default USE flags. This should resolve compilation issues for USE=binary users. Closes: https://bugs.gentoo.org/843968 Signed-off-by: Jack Todaro <solpeth@posteo.org> Closes: https://github.com/gentoo/gentoo/pull/27565 Signed-off-by: Sam James <sam@gentoo.org> dev-lang/ghc/Manifest | 2 +- dev-lang/ghc/ghc-9.0.2.ebuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
It seems this bug returned from the dead with =dev-lang/ghc-9.2.7 and "dev-haskell/skylighting-core-0.13.2. This is what the zombie looks like on my system: Preprocessing library for skylighting-core-0.13.2.. Building library for skylighting-core-0.13.2.. ghc: panic! (the 'impossible' happened) (GHC version 9.2.7: ModOrigin: hidden module redefined x: unusable module y: unusable module Call stack: CallStack (from HasCallStack): callStackDoc, called at compiler/GHC/Utils/Panic.hs:181:37 in ghc:GHC.Utils.Panic pprPanic, called at compiler/GHC/Unit/State.hs:238:14 in ghc:GHC.Unit.State emerge --info and build log following.
Created attachment 858835 [details] emerge --info
Created attachment 858837 [details] build log
Uninstalling then reinstalling dev-haskell/skylighting-core solved the problem for me.
(In reply to Timo Ollech from comment #20) > Uninstalling then reinstalling dev-haskell/skylighting-core solved the > problem for me. Thanks a lot, it works for me.