Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 733720

Summary: net-misc/unison-2.48.4-r1: failed build (This expression has type bytes but an expression was expected of type string)
Product: Gentoo Linux Reporter: Christophe PEREZ <chris>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED DUPLICATE    
Severity: normal CC: gentoo, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=704102
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge log
emerge info

Description Christophe PEREZ 2020-07-23 23:47:52 UTC
On a very fresh install, I can't emerge unison

I don't know where is the problem, so I don't know if it is a bug duplicate.

ocamlopt -g -I lwt -I ubase -I system -I fsmonitor -I fsmonitor/linux -I fsmonitor/windows -I system/generic -I lwt/generic -c /var/tmp/portage/net-misc/unison-2.48.4-r1/work/src/bytearray.ml
File "/var/tmp/portage/net-misc/unison-2.48.4-r1/work/src/unicode.ml", line 25, characters 16-33:
25 | let set s i v = String.unsafe_set s i (Char.unsafe_chr v)
                     ^^^^^^^^^^^^^^^^^
Alert deprecated: Stdlib.String.unsafe_set
File "/var/tmp/portage/net-misc/unison-2.48.4-r1/work/src/bytearray.ml", lines 38-39, characters 0-42:
38 | external unsafe_blit_from_string : string -> int -> t -> int -> int -> unit
39 |   = "ml_blit_string_to_bigarray" "noalloc"
Alert deprecated: [@@noalloc] should be used instead of "noalloc"
File "/var/tmp/portage/net-misc/unison-2.48.4-r1/work/src/bytearray.ml", lines 41-42, characters 0-42:
41 | external unsafe_blit_to_string : t -> int -> string -> int -> int -> unit
42 |   = "ml_blit_bigarray_to_string" "noalloc"
Alert deprecated: [@@noalloc] should be used instead of "noalloc"
File "/var/tmp/portage/net-misc/unison-2.48.4-r1/work/src/bytearray.ml", line 47, characters 10-23:
47 |   let s = String.create l in
               ^^^^^^^^^^^^^
Alert deprecated: Stdlib.String.create
Use Bytes.create instead.
File "/var/tmp/portage/net-misc/unison-2.48.4-r1/work/src/bytearray.ml", line 48, characters 28-29:
48 |   unsafe_blit_to_string a 0 s 0 l;
                                 ^
Error: This expression has type bytes but an expression was expected of type
         string
make: *** [Makefile.OCaml:436: bytearray.cmx] Error 2
make: *** Waiting for unfinished jobs....
File "/var/tmp/portage/net-misc/unison-2.48.4-r1/work/src/unicode.ml", line 822, characters 20-21:
822 |     String.blit s k s (k + d) (i - k);
                          ^
Error: This expression has type string but an expression was expected of type
         bytes
make: *** [Makefile.OCaml:436: unicode.cmx] Error 2
 * ERROR: net-misc/unison-2.48.4-r1::gentoo failed (compile phase):
 *   emake failed
Comment 1 Christophe PEREZ 2020-07-23 23:50:13 UTC
Impossible to join log and emerge info :

I always have this error when I submit :
Software error:
Malformed multipart POST: data truncated
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-07-25 14:42:50 UTC
(In reply to Christophe PEREZ from comment #1)
> Impossible to join log and emerge info :
> 
> I always have this error when I submit :
> Software error:
> Malformed multipart POST: data truncated

Please upload a compressed version.
Comment 3 Christophe PEREZ 2020-07-25 14:50:40 UTC
Created attachment 650714 [details]
emerge log
Comment 4 Christophe PEREZ 2020-07-25 14:51:09 UTC
Created attachment 650716 [details]
emerge info
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-07-25 14:53:43 UTC
(In reply to Christophe PEREZ from comment #4)
> Created attachment 650716 [details]
> emerge info

Thanks!
Comment 6 Christophe PEREZ 2020-07-30 06:09:23 UTC
I could compile unison with patch suggested in #709646
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-10-17 01:28:07 UTC

*** This bug has been marked as a duplicate of bug 709646 ***
Comment 8 Larry the Git Cow gentoo-dev 2020-10-17 08:32:11 UTC
The bug has been referenced in 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(+)