Created attachment 613834 [details] emerge --info emerge -pqv '=net-misc/unison-2.48.4-r1::gentoo' [ebuild N ] net-misc/unison-2.48.4-r1 USE="gtk ocamlopt -debug -doc -static -test -threads"
Created attachment 613836 [details] build.log
"This expression has type bytes but an expression was expected of type string" Please test and report, if 2.51.2 works for you. Can you see, if it was reported/fixed upstream already? https://github.com/bcpierce00/unison
Created attachment 614014 [details] unison-2.51.2 build log (In reply to Jonas Stein from comment #2) > "This expression has type bytes but an expression was expected of type > string" > > Please test and report, if 2.51.2 works for you. See build.log attached > Can you see, if it was reported/fixed upstream already? > https://github.com/bcpierce00/unison »Error: This expression has type string but an expression was expected of type bytes« is mentioned two years ago in https://github.com/bcpierce00/unison/issues/128#issuecomment-359622046
See https://bugs.gentoo.org/704910#c7
Similar was fixed for app-misc/geneweb with https://bugs.gentoo.org/707312#c7
Please change dependency to DEPEND="<dev-lang/ocaml-4.09[ocamlopt?]
(In reply to charles17 from comment #6) > Please change dependency to > DEPEND="<dev-lang/ocaml-4.09[ocamlopt?] I can confirm masking dev-lang/ocaml-4.09.0 allows net-misc/unison-2.48.4-r1 to be built.
Confirming here too, Debian has a patch.
Created attachment 620918 [details, diff] Patch for unison-2.48 https://salsa.debian.org/ocaml-team/unison/commit/46a011f5628e0ecd9beb2794ccdb0ae3b9906817
Created attachment 620920 [details, diff] Patch for unison-2.51
(In reply to Petr Zima from comment #10) > Created attachment 620920 [details, diff] [details, diff] > Patch for unison-2.51 Without this patch unison-2.51.2 with ocaml-4.09.0 fails with this error: File "/var/tmp/portage/net-misc/unison-2.51.2/work/src/system.ml", line 1: Error: The implementation /var/tmp/portage/net-misc/unison-2.51.2/work/src/system.ml does not match the interface system.cmi: Values do not match: val link : ?follow:bool -> string -> string -> unit is not included in val link : fspath -> fspath -> unit File "/var/tmp/portage/net-misc/unison-2.51.2/work/src/system/system_intf.ml", line 70, characters 0-35: Expected declaration File "/var/tmp/portage/net-misc/unison-2.51.2/work/src/system/system_generic.ml", line 50, characters 4-8: Actual declaration make: *** [Makefile.OCaml:423: system.cmx] Error 2 make: *** Waiting for unfinished jobs.... This patch fixes this for me.
With the patch for unison-2.48 applied, I am able to build unison with ocaml-4.09. However, the resulting program is not interoperable with the same version built with ocaml-4.04: Failed: Server: Fatal error during unmarshaling (input_value: ill-formed message), possibly because client and server have been compiled with different versions of the OCaml compiler. I do not know enough about OCaml to know what might have changed with the compiler. It does not appear that the patch should have caused this, unless possibly it has an effect on the sort order. Since the unison build for Ubuntu (and presumably others) has been built with the older OCaml compiler, this seems to makes interoperability impossible.
(In reply to Bruce Guenter from comment #12) > ... However, the resulting program is not interoperable with the > same version built with ocaml-4.04 ... That's completely normal with unison, you need to have both endpoints compiled with the same version of ocaml. Maybe it's even written somewhere in the unison docs. I guess it's because unison uses some language-level serialization which is very dependent on the compiler. Some close versions may be compatible but generally they are not.
(In reply to Bruce Guenter from comment #12) > ... Since the unison build for > Ubuntu (and presumably others) has been built with the older OCaml compiler, > this seems to makes interoperability impossible. I was struggling with Gentoo <-> Debian in the past. At the moment Debian uses ocaml-4.08 which is luckily compatible with Gentoo's ocaml-4.09. You have two options, either compile fresh versions of ocaml and unison manually on Ubuntu (that's what I formerly did on Debian) or downgrade ocaml on Gentoo, 4.04 is still available. Slotting ocaml would help in this regard, but I am not sure if it's worth the effort otherwise.
I'm hit by this as well (and I'm pretty sure unison is the only ocaml program here) Could the dependancy be fixed in the unison ebuild ?
(In reply to Thomas Capricelli from comment #15) > I'm hit by this as well (and I'm pretty sure unison is the only ocaml > program here) > > Could the dependancy be fixed in the unison ebuild ? Yeah, I managed to modify the ebuild to apply a compatibility patch for OCaml 4.08 and it works fine. Though, I'm brand new to gentoo, so I'm currently looking into proposing the changes.
(In reply to Calvin Jay Ross from comment #16) > Yeah, I managed to modify the ebuild to apply a compatibility patch for > OCaml 4.08 and it works fine. Though, I'm brand new to gentoo, so I'm > currently looking into proposing the changes. That looks like what "proxy maintainer" aims to facilitate... Did you contact gentoo dev ? (on irc for exemple)
(In reply to Calvin Jay Ross from comment #16) > Yeah, I managed to modify the ebuild to apply a compatibility patch for > OCaml 4.08 and it works fine. Though, I'm brand new to gentoo, so I'm > currently looking into proposing the changes. You can share the patch here and/or via a Github PR without taking on responsibility for the package.
The 2.48 branch was probably never enabled for ocaml-4.09. See the »Compatibility with OCaml 4.08« commit on https://github.com/bcpierce00/unison/commits/unison-2.48 Maybe better restrict to ocaml-4.08
*** Bug 733720 has been marked as a duplicate of this bug. ***
*** Bug 739426 has been marked as a duplicate of this bug. ***
*** Bug 704910 has been marked as a duplicate of this bug. ***
*** Bug 749348 has been marked as a duplicate of this bug. ***
The patches here will fix compatibility with 4.09.0, but not 4.10.0. Worth looking at because 4.09.0 is in stable now. I suspect the latest release (rc right now) will work with 4.10.0, but that will only be for the latest slot.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71df67d36b63cbe65b3eb9a8b91c07ccb2ac9071 commit 71df67d36b63cbe65b3eb9a8b91c07ccb2ac9071 Author: Volkmar W. Pogatzki <gentoo@pogatzki.net> AuthorDate: 2020-10-14 14:43:39 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2020-10-17 08:32:04 +0000 net-misc/unison: build with ocaml-4.09.0 Patches from https://bugs.gentoo.org/709646 applied Restricting to <=dev-lang/ocaml-4.09:= Does not build with ocaml-4.10.0 Closes: https://bugs.gentoo.org/709646 Bug: https://bugs.gentoo.org/739426 Bug: https://bugs.gentoo.org/733720 Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Signed-off-by: Sam James <sam@gentoo.org> .../unison/files/unison-2.48.4-ocaml-4.08.patch | 79 +++++++++++++++++++ .../unison/files/unison-2.51.2-ocaml-4.08.patch | 50 ++++++++++++ net-misc/unison/unison-2.48.4-r2.ebuild | 90 ++++++++++++++++++++++ net-misc/unison/unison-2.51.2-r1.ebuild | 86 +++++++++++++++++++++ 4 files changed, 305 insertions(+) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2759ca74611a5aebdc14a873670a26f66a899107 commit 2759ca74611a5aebdc14a873670a26f66a899107 Author: Sam James <sam@gentoo.org> AuthorDate: 2020-10-17 08:31:56 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2020-10-17 08:32:05 +0000 net-misc/unison: bump to 2.51.3_rc2 Bug: https://bugs.gentoo.org/709646 Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Sam James <sam@gentoo.org> net-misc/unison/Manifest | 1 + net-misc/unison/unison-2.51.3_rc2.ebuild | 84 ++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+)
why is this marked as resolve while the current stable (2.48.4-r1) still fails to build? I think revision 2 should be stabilized as well.