opam fails

  • Open
  • quality assurance status badge
Details
2 participants
  • Gabriel Hondet
  • Julien Lepiller
Owner
unassigned
Submitted by
Gabriel Hondet
Severity
normal
G
G
Gabriel Hondet wrote on 22 Feb 2019 21:56
(address . bug-guix@gnu.org)
87ef7z1r0q.fsf@gmail.com
Hi,

When I try to use opam, it fails:

$ opam install menhir

#=== ERROR while compiling ocaml-system.4.07.1 ================================#
# context 2.0.1 | linux/x86_64 | | https://opam.ocaml.org#34f81c06
# path ~/.opam/default/.opam-switch/build/ocaml-system.4.07.1
# command ~/.opam/opam-init/hooks/sandbox.sh build ocaml gen_ocaml_config.ml
# exit-code 1
# env-file ~/.opam/log/ocaml-system-12254-60459a.env
# output-file ~/.opam/log/ocaml-system-12254-60459a.out
### output ###
# bwrap: execvp ocaml: No such file or directory

and if I do (in fish)
$ set -x OPAM_USER_PATH_RO /home/gabriel/.guix-profile/bin/

then I obtain the error:

$ opam install menhir

#=== ERROR while compiling ocaml-system.4.07.1 ================================#
# context 2.0.1 | linux/x86_64 | | https://opam.ocaml.org#34f81c06
# path ~/.opam/default/.opam-switch/build/ocaml-system.4.07.1
# command ~/.opam/opam-init/hooks/sandbox.sh build ocaml gen_ocaml_config.ml
# exit-code 1
# env-file ~/.opam/log/ocaml-system-13887-6cc03f.env
# output-file ~/.opam/log/ocaml-system-13887-6cc03f.out
### output ###
# bwrap: Can't mkdir parents for /home/gabriel/.guix-profile/bin/: No such file or directory

Any idea on how to fix this?

Thanks,
Gabriel
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE5ercJXBcjd3P1FcAMbyBBfZZ1CUFAlxwYfUACgkQMbyBBfZZ
1CXOzQ//UYZYEt3eSbYNH+PSFe5+pY7pfR3BTmoZJPTnGGZtSVZV5cSHZZH8l4AB
UOfA1zPX1hiyk1wqj8Y70avrdpRLuEMe2KUfkkuLsGvMpGw7GSwQj6mKPbMYACcD
+xZhU3RzlU565MHzZ590ycE2j+vyMvViXT9o78oYIPY/a0WRvFiaZTJw7h6UPSBc
aLAOWQn8ydsXocVGv92EjuyiZH+rZO22jeiBKebRSvaVbjBBD7pYqxscJjzcOTtH
PAH9bQbZP6dK9XMgI2IP3EYU+57MMjjCl4EoxxaJOCa36h/FvDFojlzfP4SjF8wI
Zshq4z+so9fgAOs87UH4oawKGlpLG8mBqsgpLel/MZsP/QvhzAD7gloMv/2BAnBS
rZnOB/ckAZrG7zBbhFsavpxICBibyRSj/7MNs2pAL80jehzzU3/WWhbw0ZYd9gbC
NF4g1QbZrT7Bac81fMa4uaUAZx7MJdtGSeUrg0jtYMv3CpdpqOgNcYPahkYMJRpn
K6iJdhDF6QAbmwtc2g/QvSDT07P4pFEgsFrXXg9W0hYwkws15MvfRwuHiwIAkXef
tJ/AqnXZElfAP5PF+X1zRV/kmZ26md5zNCmdtpuheA/qayiyyXG25bplIKDz73jW
t1ucGC1saTpYF6eIFNR/t14tnpn6Y/DsYNXlaS9QAziprdfn0GU=
=F3VW
-----END PGP SIGNATURE-----

J
J
Julien Lepiller wrote on 22 Feb 2019 22:41
338B07A5-8A13-4526-BC9F-B9A38E7C899E@lepiller.eu
Le 22 février 2019 21:56:21 GMT+01:00, Gabriel Hondet <gabrielhondet@gmail.com> a écrit :
Toggle quote (43 lines)
>Hi,
>
>When I try to use opam, it fails:
>
>$ opam install menhir
>
>#=== ERROR while compiling ocaml-system.4.07.1
>================================#
># context 2.0.1 | linux/x86_64 | | https://opam.ocaml.org#34f81c06
># path ~/.opam/default/.opam-switch/build/ocaml-system.4.07.1
># command ~/.opam/opam-init/hooks/sandbox.sh build ocaml
>gen_ocaml_config.ml
># exit-code 1
># env-file ~/.opam/log/ocaml-system-12254-60459a.env
># output-file ~/.opam/log/ocaml-system-12254-60459a.out
>### output ###
># bwrap: execvp ocaml: No such file or directory
>
>and if I do (in fish)
>$ set -x OPAM_USER_PATH_RO /home/gabriel/.guix-profile/bin/
>
>then I obtain the error:
>
>$ opam install menhir
>
>#=== ERROR while compiling ocaml-system.4.07.1
>================================#
># context 2.0.1 | linux/x86_64 | | https://opam.ocaml.org#34f81c06
># path ~/.opam/default/.opam-switch/build/ocaml-system.4.07.1
># command ~/.opam/opam-init/hooks/sandbox.sh build ocaml
>gen_ocaml_config.ml
># exit-code 1
># env-file ~/.opam/log/ocaml-system-13887-6cc03f.env
># output-file ~/.opam/log/ocaml-system-13887-6cc03f.out
>### output ###
># bwrap: Can't mkdir parents for /home/gabriel/.guix-profile/bin/: No
>such file or directory
>
>Any idea on how to fix this?
>
>Thanks,
>Gabriel

That's thc limit of opam here, it always tries to install ocaml package with the ocaml compiler. Don't you have a compiler in your switch already though? If so, I wonder why it's not found. Could you try to modify your $PATH to add it?
G
G
Gabriel Hondet wrote on 23 Feb 2019 17:58
Re: bug#34620: Acknowledgement (opam fails)
(address . 34620@debbugs.gnu.org)
87bm321lx2.fsf@gmail.com
Hi again,

After some experiments, and after looking at what did Nix, it seems that
wrapping opam does the trick (with a .opam-real and a opam). I'll try
this and make a patch.

Cheers,
Gabriel
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE5ercJXBcjd3P1FcAMbyBBfZZ1CUFAlxxe8oACgkQMbyBBfZZ
1CXcbA/+IjNqT4WbE2hC6bf7lLmcbphB8Cs+J38ugewrkodHOTVA7Q1hZBbMJw9M
1aAzIBuAwUbUEYHyU/5bx0iA5g8GHel5G1mJG16lSaJwuaNS4pSJTaoaXI1MYLvj
txzHp0aedfh5xiht6hRu4SNzRoKgnSlpAYFcg0OiyL1wjaxFh44bX3cDOwRtuAHU
fUjA8O44Po4mOIeM5LsJlIlsUgSrCnr6wl+Qtoqk3dAC5/X16zY6eDg0t25ozTEl
eAjQa45fLjxxSPzSLRp2XEHegraeRzlNOXa6RANPBlu2UcVFynnikU3i12E21gH5
IPqcN0ReXRADDhSZIf1gi3c7nyfvD6DMD+tE3CBVtg7l9T1TOxYD4ct6GKK9PRKk
UayT45sN7gqsfnoEBlP1FAQOrJzq238eT3/WJEA/dGjr1lWEnwEI6SbM9xxQDVpt
xsXkg7x49oJy6J4SHerfGFbQc03dfbSWzCDhDCCblyRWp42pSejsyTAP4P88Q8BD
HitEKHR7W8gOrro/4V1B/dIcYH4VHIu5tffPcrmlqOtBisJ4b0qxWrHG9DuJxxlB
PwJO/XYTIMbVhvXBZ9Kat62MuQAEnQHEGz/H/gdtIFz6Drl+b1L6GfrpTeMQZP2j
4eL7jw9rS/5FshMLorGpH2+9GYhOnXY/By0lBvWoZ4LufA25Ml8=
=vKDI
-----END PGP SIGNATURE-----

G
G
Gabriel Hondet wrote on 24 Feb 2019 08:43
(address . 34620@debbugs.gnu.org)
878sy51vik.fsf@gmail.com
Hello,

Wrapping works except that the binary can't find libraries, how can I
add the libraries of the profile (e.g. =asm/socket.h= or =crti.o=) in
the wrapper? The matter is to get the path of a profile (as if it was a
package in the ~inputs~ of the function).

Gabriel
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE5ercJXBcjd3P1FcAMbyBBfZZ1CUFAlxySzMACgkQMbyBBfZZ
1CXf3w/7BqAHbxxB0h9Iy5NzPP+of25DPpkVdBTBvFL1TkTPDYWXiDfzUVH1sakA
qR2/mXPw0dO8EJJXayVNN0PVIOu0LNeyBQVi2bFZfEbu//6wo2Xr9DbEf3vjBWVv
iOMXBtmmucQGanso32rnpA3POqKh4q8RCXiM1L8O+5X7Z78gTF5fwftPxURx3XIq
AlG0qxfy9dh1YiYPc0UaSXhhQskmg6dn3Yr7x/o6i3PGU/ANrCm3KawxSB8+0/zG
t6LrS6Dql8JObJsrdfKwaMHDwpnLacbMlq0NIfmpOIBMnbFwCW+zDi6E/+PQz4zX
jIyIIMDsfVn2AywRyEdBBKlsJ27kyeH+oBf5oiyhMIlgG88SKNANfb5XcyFT/VBt
Akb3okJXBgfQpcjVILC/4eMio7Qi1oMwg+T1OU0YSlgTslJsGhy/cCgmyKfbEmRD
0cwFpQshoxyqOTumFAEJUG8oGOYmOsSPGF5UhfMYD4usB242ADPSyOrci0X2ZVdY
eJQ+cdxiGnlQP6k/KJpanK4YOxdhgGt5PQVgriqjOUJWmoZ9zq8f190pI79AWa8A
FAl1EKOIENYaDR03hnbt2g7+oYdZCoxu5xCry5EhWKfMEt7ND83CmXOzIaACPunm
GoA0FIJkqEjy6H3l62ARuBa2WCPoEk/9NrCo3jfIhIdAuHEboOg=
=zq1W
-----END PGP SIGNATURE-----

J
J
Julien Lepiller wrote on 24 Feb 2019 11:15
1E11E517-AD19-4999-B775-9D17B081B36E@lepiller.eu
Le 24 février 2019 08:43:47 GMT+01:00, Gabriel Hondet <gabrielhondet@gmail.com> a écrit :
Toggle quote (10 lines)
>Hello,
>
>Wrapping works except that the binary can't find libraries, how can I
>add the libraries of the profile (e.g. =asm/socket.h= or =crti.o=) in
>the wrapper? The matter is to get the path of a profile (as if it was
>a
>package in the ~inputs~ of the function).
>
>Gabriel

Can you share whbt you've done so far?
?