Trying to install unison (2.51.2) on nixos 19.03 fails thusly:
ocamlopt -I /nix/store/mk7a5hkrhi24yhzi903cd88m9jjcjzmc-lablgtk-2.18.6/lib/ocaml/4.06.1/site-lib/lablgtk2 -g -unsafe-string -I lwt -I ubase -I system -I fsmonitor -I fsmonitor/linux -I fsmonitor/windows -I system/generic -I lwt/generic -I +lablgtk2 -c /build/source/src/uigtk2.ml
File "/build/source/src/uigtk2.ml", line 26, characters 24-41:
Warning 3: deprecated: String.capitalize
Use String.capitalize_ascii instead.
File "/build/source/src/uigtk2.ml", line 97, characters 5-30:
Error: Unbound value Gpointer.region_of_string
nix-env -i unison
Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.
$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 4.19.41, NixOS, 19.09.git.f29d398 (Loris)`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.2.2`
- nixpkgs: `/nix/var/nixpkgs/release-19.03.f29d398/default.nix`
For the record, I tested with lilyball's fix (commit 1931086) from #61505; I get the same result.
It seems fine on Hydra: https://hydra.nixos.org/job/nixos/release-19.03/nixpkgs.unison.x86_64-linux – I have no idea why your results differ, as you do claim to have sandboxing enabled.
Works on linux for me as well. But unfortunately fails on osx with the same error message.
My guess is both version are being compiled with different versions of the ocaml compiler (linux: ocaml-4.0.5, osx: ocaml-4.0.6). What's the best way to align this?
It seems fine on Hydra for darwin as well: https://hydra.nixos.org/job/nixpkgs/trunk/unison.x86_64-darwin https://hydra.nixos.org/job/nixpkgs/nixpkgs-19.03-darwin/unison.x86_64-darwin
Fair enough. Just saw that I'm on 19.09:
- system: `"x86_64-darwin"`
- host os: `Darwin 18.7.0, macOS 10.14.6`
- multi-user?: `no`
- sandbox: `no`
- version: `nix-env (Nix) 2.2.1`
- channels(louis): `"nixpkgs-19.09pre174594.0c0954781e2"`
- nixpkgs: `/Users/louis/.nix-defexpr/channels/nixpkgs`
Still, that is what I observed and I fixed it by using ocaml-4.0.5 instead of camp-4.0.6.
The last sentence of the previous post should have been:
"Still, that is what I observed and I fixed it by using ocaml-4.0.5 instead of ocaml-4.0.6"
Well, on your commit 0c095478
$ nix-instantiate -A unison --argstr system x86_64-darwin
/nix/store/yrb0hyd3nb6w6n10kp055hadm6vf7snn-unison-2.51.2.drv
and that one only depends on ocaml 4.0.5. I don't know how you "switched" it, but I expect this is about purity problems – and perhaps it would be worked around by using sandboxing.
Fails for me with same message on:
- system: `"x86_64-linux"`
- host os: `Linux 5.3.11, NixOS, 19.09.1300.08e503bac6d (Loris)`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.3`
- channels(root): `"nixos-hardware, nixos-19.09.1300.08e503bac6d, unstable-20.03pre202088.e89b21504f3"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
I got around this by setting enableX11 to false, since I don't need this functionality.
Changing to region_of_string to region_of_bytes makes the build succeed. This issue has been fixed in latest master of unison 2 years ago, but there hasn't been a version released since then.
Most helpful comment
Changing to region_of_string to region_of_bytes makes the build succeed. This issue has been fixed in latest master of unison 2 years ago, but there hasn't been a version released since then.