Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unison fails t build, citing 'Unbound value Gpointer.region_of_string' (nixOs 19.03) #61867

Closed
sixears opened this issue May 22, 2019 · 10 comments · Fixed by #82619
Closed

unison fails t build, citing 'Unbound value Gpointer.region_of_string' (nixOs 19.03) #61867

sixears opened this issue May 22, 2019 · 10 comments · Fixed by #82619

Comments

@sixears
Copy link

sixears commented May 22, 2019

Issue description

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

Steps to reproduce

nix-env -i unison

Technical details

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`
@sixears
Copy link
Author

sixears commented May 22, 2019

For the record, I tested with lilyball's fix (commit 1931086) from #61505; I get the same result.

@vcunat
Copy link
Member

vcunat commented Jun 9, 2019

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.

@kfiz
Copy link

kfiz commented Sep 22, 2019

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?

@vcunat
Copy link
Member

vcunat commented Sep 22, 2019

@kfiz
Copy link

kfiz commented Sep 23, 2019

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.

@kfiz
Copy link

kfiz commented Sep 23, 2019

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"

@vcunat
Copy link
Member

vcunat commented Sep 23, 2019

Well, on your commit 0c09547

$ 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.

@alf
Copy link

alf commented Nov 26, 2019

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`

@alf
Copy link

alf commented Nov 26, 2019

I got around this by setting enableX11 to false, since I don't need this functionality.

@samuel
Copy link

samuel commented Feb 13, 2020

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.

winterdeaf added a commit to winterdeaf/nixpkgs that referenced this issue Mar 14, 2020
Fixes NixOS#61867 and NixOS#61505, bumps the ocaml version unison is built
against to 4.09. The patches included here appear in the trunk version
of unison, but were not backported to 2.51.2.
vbgl pushed a commit that referenced this issue Mar 16, 2020
Fixes #61867 and #61505, bumps the ocaml version unison is built
against to 4.08. The patches included here appear in the trunk version
of unison, but were not backported to 2.51.2.
vbgl pushed a commit to vbgl/nixpkgs that referenced this issue Mar 16, 2020
Fixes NixOS#61867 and NixOS#61505, bumps the ocaml version unison is built
against to 4.08. The patches included here appear in the trunk version
of unison, but were not backported to 2.51.2.

(cherry picked from commit 3355e8d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants