https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: dev-ml/ocaml-fileutils-0.6.4 fails to compile. Discovered on: amd64 (internal ref: ci)
Created attachment 839211 [details] build.log build log and emerge --info
No idea what's happening here, or how to reproduce it. From what I understand, "seq" is built-in to ocamlc versions > 4.07.
(In reply to Rafael Kitover from comment #2) > No idea what's happening here, or how to reproduce it. > > From what I understand, "seq" is built-in to ocamlc versions > 4.07. I think dev-ml/seq may be needed either way, but it's just a dummy on those versions. I think RDEPEND in latest Seq may therefore be wrong.
(In reply to Sam James from comment #3) > (In reply to Rafael Kitover from comment #2) > > No idea what's happening here, or how to reproduce it. > > > > From what I understand, "seq" is built-in to ocamlc versions > 4.07. > > I think dev-ml/seq may be needed either way, but it's just a dummy on those > versions. I think RDEPEND in latest Seq may therefore be wrong. (It's "needed" either way because these packages want compatibility with older OCaml and there's no way for them to properly declare a conditional dep.)
So why did he get this error and I don't? I have the same version of ocamlc etc..
(In reply to Rafael Kitover from comment #5) > So why did he get this error and I don't? I have the same version of ocamlc > etc.. Do you have dev-ml/seq?
If I try to install dev-ml/seq, it tries to downgrade my ocaml because of that depend expression in the ebuild, so I can't do that. It does not look like I have any old files laying around that would provide that extension. Agostino, can you please run this command and tell me if it fails the same way: curl -sL -o - 'https://github.com/gildor478/ocaml-fileutils/releases/download/v0.6.4/fileutils-0.6.4.tbz' | tar jxf - && cd fileutils-0.6.4 && dune build Is anyone else getting this build failure? So far I don't understand where it could come from or how to reproduce it.
Sam, some other thoughts I had from today's investigation: ounit2 is probably broken because it's using Seq instead of Stdlib.Seq or something like that, something there may need to be patched to check ocaml version. I should mention that I tried installing and uninstalling the seq dune package from that github repo and it made no difference for me in any way. We do need to update to a minor rev there, and probably remove that depend expression anyway, because it handles that itself. At least it does in the new minor rev 3.0.1, so I'll open a PR to update it and link back here. It could have something to do with the ocaml global module registry, do you have any idea where that is? Are we handling it properly?
maybe related to bug #882337 ?
It's related in that the test phase fails, and it fails for me as well. But the problem here is a failure in the build phase, which I cannot reproduce and which did not happen in the CI either. We need to address both of these problems. I'm guessing the build phase problem is not common, otherwise we would see more activity here. If you are getting it, please help us reproduce and debug.
Im getting this issue as well. Do let me know if you want something tested or checked. More then glad to help solve this as i cant really update my system due to this :)
Haxk20: Thanks, can you please run this command (in a temp directory) and tell me what the output is: curl -sL -o - 'https://github.com/gildor478/ocaml-fileutils/releases/download/v0.6.4/fileutils-0.6.4.tbz' | tar jxf - && cd fileutils-0.6.4 && dune build
Not Haxk20, but I'm experiencing the same issue and I get the following: fileutils_build curl -sL -o - 'https://github.com/gildor478/ocaml-fileutils/releases/download/v0.6.4/fileutils-0.6.4.tbz' | tar jxf - && cd fileutils-0.6.4 && dune build File "src/lib/fileutils/dune", line 33, characters 18-21: 33 | (libraries unix seq stdlib-shims)) ^^^ Error: Library "seq" not found. -> required by library "fileutils" in _build/default/src/lib/fileutils -> required by _build/default/META.fileutils -> required by _build/install/default/lib/fileutils/META -> required by _build/default/fileutils.install -> required by alias install -> required by alias default
Petronio: thank you very much, now can you run this command, also in a temp directory: curl -sLo - 'https://github.com/c-cube/seq/archive/refs/tags/v0.3.1.tar.gz' | tar zxf - && cd seq-0.3.1 && dune build && sudo dune install and then run the previous command again and see if you get the same error. To remove the module from your system again, run: sudo rm -rf /usr/lib64/ocaml/seq /usr/doc/seq
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10aac9c81db5f712cb6ed987de50e0f5bad50c6e commit 10aac9c81db5f712cb6ed987de50e0f5bad50c6e Author: Maciej Barć <xgqt@gentoo.org> AuthorDate: 2022-12-09 00:43:48 +0000 Commit: Maciej Barć <xgqt@gentoo.org> CommitDate: 2022-12-09 00:43:57 +0000 dev-ml/ocaml-fileutils: fix deps and dune build without seq Closes: https://bugs.gentoo.org/884127 Signed-off-by: Maciej Barć <xgqt@gentoo.org> .../files/ocaml-fileutils-0.6.4-dune.patch | 8 ++++++++ ...tils-0.6.4.ebuild => ocaml-fileutils-0.6.4-r1.ebuild} | 16 +++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-)
^ Im quite certain the latest version of ocaml-fileutils should work after this fix.
Maciej: thank you, I think this will do it. I still don't understand, however, why I did not get this failure. My theory was that there is some kind of global module registry, but I could not find anything like this.
(In reply to Rafael Kitover from comment #17) > Maciej: thank you, I think this will do it. > > I still don't understand, however, why I did not get this failure. > > My theory was that there is some kind of global module registry, but I could > not find anything like this. I think META files are responsible for this but there are merged with the packages... Yes, this in indeed very peculiar since this was a failure on the dune build definition level, not library link or something like that which means that dune had found seq somewhere. You cna run `ocamlfind list | grep -i seq` to check if you find seq via ocamlfind on your system.
I managed to reproduce this. I re-merged dev-ml/dune and now I get the same error, for some reason the version I already had installed did not complain about seq.
This is a problem I noticed we have in general with ocaml libraries, they do not get rebuilt for new compilers and for other reasons automatically and sometimes have to be manually rebuilt.
(In reply to Rafael Kitover from comment #20) > This is a problem I noticed we have in general with ocaml libraries, they do > not get rebuilt for new compilers and for other reasons automatically and > sometimes have to be manually rebuilt. That is not a general problem, this was maintainers fault for not adding subslot operators (:=) to packages a lib links against (actually every dev-ml in DEPEND).
The issue is that with +ocamlopt the binary for the module has to be rebuilt when dev-lang/ocaml is updated, do the subslot operators fix that? Or do we need some other solution? With things like perl there is perl-clean etc..
(In reply to Rafael Kitover from comment #22) > The issue is that with +ocamlopt the binary for the module has to be rebuilt > when dev-lang/ocaml is updated, do the subslot operators fix that? Or do we > need some other solution? With things like perl there is perl-clean etc.. The USE=ocamlopt on libs and compiler cause libs to be rebuilt (and built with that USE on/off too) when you wish to flip ocamlopt on compiler on or off. := causes a package to be puller for rebuild if the dependency with specified := is updated, see: https://wiki.gentoo.org/wiki/Sub-slots_and_Slot-Operators