Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 884127 - dev-ml/ocaml-fileutils-0.6.4 fails to compile: Error: Library "seq" not found
Summary: dev-ml/ocaml-fileutils-0.6.4 fails to compile: Error: Library "seq" not found
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Rafael Kitover
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-03 09:01 UTC by Agostino Sarubbo
Modified: 2022-12-09 23:49 UTC (History)
6 users (show)

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


Attachments
build.log (build.log,48.92 KB, text/plain)
2022-12-03 09:01 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-12-03 09:01:00 UTC
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)
Comment 1 Agostino Sarubbo gentoo-dev 2022-12-03 09:01:02 UTC
Created attachment 839211 [details]
build.log

build log and emerge --info
Comment 2 Rafael Kitover 2022-12-03 12:06:29 UTC
No idea what's happening here, or how to reproduce it.

From what I understand, "seq" is built-in to ocamlc versions > 4.07.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-03 12:07:44 UTC
(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.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-03 12:08:00 UTC
(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.)
Comment 5 Rafael Kitover 2022-12-03 23:44:50 UTC
So why did he get this error and I don't? I have the same version of ocamlc etc..
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-04 03:48:11 UTC
(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?
Comment 7 Rafael Kitover 2022-12-04 12:37:13 UTC
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.
Comment 8 Rafael Kitover 2022-12-04 14:17:32 UTC
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?
Comment 9 Christian Bricart 2022-12-05 10:03:31 UTC
maybe related to bug #882337 ?
Comment 10 Rafael Kitover 2022-12-07 18:16:51 UTC
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.
Comment 11 Haxk20 2022-12-08 21:23:28 UTC
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 :)
Comment 12 Rafael Kitover 2022-12-08 21:28:57 UTC
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
Comment 13 Petronio Coelho 2022-12-08 22:13:49 UTC
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
Comment 14 Rafael Kitover 2022-12-08 23:07:44 UTC
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
Comment 15 Larry the Git Cow gentoo-dev 2022-12-09 00:45:26 UTC
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(-)
Comment 16 Maciej Barć gentoo-dev 2022-12-09 00:46:24 UTC
^ Im quite certain the latest version of ocaml-fileutils should work after this fix.
Comment 17 Rafael Kitover 2022-12-09 02:04:33 UTC
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.
Comment 18 Maciej Barć gentoo-dev 2022-12-09 02:08:47 UTC
(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.
Comment 19 Rafael Kitover 2022-12-09 23:36:13 UTC
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.
Comment 20 Rafael Kitover 2022-12-09 23:36:55 UTC
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.
Comment 21 Maciej Barć gentoo-dev 2022-12-09 23:39:13 UTC
(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).
Comment 22 Rafael Kitover 2022-12-09 23:46:04 UTC
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..
Comment 23 Maciej Barć gentoo-dev 2022-12-09 23:49:02 UTC
(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