unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#34620: opam fails
@ 2019-02-22 20:56 Gabriel Hondet
  2019-02-22 21:41 ` Julien Lepiller
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Gabriel Hondet @ 2019-02-22 20:56 UTC (permalink / raw)
  To: 34620

[-- Attachment #1: Type: text/plain, Size: 1277 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#34620: opam fails
  2019-02-22 20:56 bug#34620: opam fails Gabriel Hondet
@ 2019-02-22 21:41 ` Julien Lepiller
       [not found] ` <handler.34620.B.155086902325807.ack@debbugs.gnu.org>
  2023-10-11  8:58 ` bug#34620: 'opam install menhir' fails Simon Tournier
  2 siblings, 0 replies; 6+ messages in thread
From: Julien Lepiller @ 2019-02-22 21:41 UTC (permalink / raw)
  To: Gabriel Hondet, 34620

Le 22 février 2019 21:56:21 GMT+01:00, Gabriel Hondet <gabrielhondet@gmail.com> a écrit :
>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?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#34620: Acknowledgement (opam fails)
       [not found] ` <handler.34620.B.155086902325807.ack@debbugs.gnu.org>
@ 2019-02-23 16:58   ` Gabriel Hondet
  2019-02-24  7:43     ` Gabriel Hondet
  0 siblings, 1 reply; 6+ messages in thread
From: Gabriel Hondet @ 2019-02-23 16:58 UTC (permalink / raw)
  To: 34620

[-- Attachment #1: Type: text/plain, Size: 196 bytes --]

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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#34620: Acknowledgement (opam fails)
  2019-02-23 16:58   ` bug#34620: Acknowledgement (opam fails) Gabriel Hondet
@ 2019-02-24  7:43     ` Gabriel Hondet
  2019-02-24 10:15       ` Julien Lepiller
  0 siblings, 1 reply; 6+ messages in thread
From: Gabriel Hondet @ 2019-02-24  7:43 UTC (permalink / raw)
  To: 34620

[-- Attachment #1: Type: text/plain, Size: 272 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#34620: Acknowledgement (opam fails)
  2019-02-24  7:43     ` Gabriel Hondet
@ 2019-02-24 10:15       ` Julien Lepiller
  0 siblings, 0 replies; 6+ messages in thread
From: Julien Lepiller @ 2019-02-24 10:15 UTC (permalink / raw)
  To: Gabriel Hondet, 34620

Le 24 février 2019 08:43:47 GMT+01:00, Gabriel Hondet <gabrielhondet@gmail.com> a écrit :
>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?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#34620: 'opam install menhir' fails
  2019-02-22 20:56 bug#34620: opam fails Gabriel Hondet
  2019-02-22 21:41 ` Julien Lepiller
       [not found] ` <handler.34620.B.155086902325807.ack@debbugs.gnu.org>
@ 2023-10-11  8:58 ` Simon Tournier
  2 siblings, 0 replies; 6+ messages in thread
From: Simon Tournier @ 2023-10-11  8:58 UTC (permalink / raw)
  To: Gabriel Hondet; +Cc: 34620

Hi,

Digging some old bugs about OCaml, I hit #34620:

    https://issues.guix.gnu.org/issue/34620

On Fri, 22 Feb 2019 at 21:56, Gabriel Hondet <gabrielhondet@gmail.com> wrote:

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

Today, using Guix 6113e05, I get:

--8<---------------cut here---------------start------------->8---
$ which opam
/home/simon/.config/guix/profiles/compiler/compiler/bin/opam

$ opam install menhir
The following actions will be performed:
  ↻ recompile ocamlfind         1.9.5    [upstream or system changes]
  ↻ recompile dune              3.6.1    [upstream or system changes]
  ∗ install   menhirSdk         20230608 [required by menhir]
  ∗ install   menhirLib         20230608 [required by menhir]
  ↻ recompile csexp             1.5.1    [uses dune]
  ↻ recompile cppo              1.6.9    [uses dune]
  ∗ install   menhir            20230608
  ↻ recompile merlin-lib        4.7-414  [uses dune]
  ↻ recompile yojson            2.0.2    [uses dune]
  ↻ recompile dot-merlin-reader 4.6      [upstream or system changes]
  ↻ recompile merlin            4.7-414  [uses dot-merlin-reader, dune]
===== ∗ 3   ↻ 8 =====
Do you want to continue? [Y/n] Y
Y

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved cppo.1.6.9  (cached)
⬇ retrieved csexp.1.5.1  (cached)
⬇ retrieved dot-merlin-reader.4.6  (cached)
⬇ retrieved dune.3.6.1  (cached)
⬇ retrieved menhir.20230608  (https://opam.ocaml.org/cache)
⬇ retrieved merlin.4.7-414  (cached)
⬇ retrieved merlin-lib.4.7-414  (cached)
⬇ retrieved ocamlfind.1.9.5  (cached)
⬇ retrieved yojson.2.0.2  (cached)
⬇ retrieved menhirLib.20230608  (https://opam.ocaml.org/cache)
[ERROR] The compilation of ocamlfind.1.9.5 failed at "make all".
⬇ retrieved menhirSdk.20230608  (https://opam.ocaml.org/cache)

#=== ERROR while compiling ocamlfind.1.9.5 ====================================#
# context     2.1.3 | linux/x86_64 | ocaml.4.14.0 | https://opam.ocaml.org#368128df
# path        ~/.opam/default/.opam-switch/build/ocamlfind.1.9.5
# command     ~/.opam/opam-init/hooks/sandbox.sh build make all
# exit-code   2
# env-file    ~/.opam/log/ocamlfind-218324-578149.env
# output-file ~/.opam/log/ocamlfind-218324-578149.out
### output ###
# [...]
# File "frontend.ml", line 859, characters 10-39:
# 859 |           Fl_package_base.package_users predicates1 packages1
#                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# Warning 6 [labels-omitted]: label preds was omitted in the application of this function.
# ocamlc -I +compiler-libs  -o ocamlfind -g findlib.cma unix.cma \
#            -I +unix -I +dynlink ocaml_args.cmo frontend.cmo
# File "_none_", line 1:
# Error: Error while linking /gnu/store/9pa7j2sdlzsvbxczbn1xmnycxaddzz0c-ocaml-5.0.0/lib/ocaml/unix/unix.cma(Unix):
#        The external function `caml_unix_waitpid' is not available
# make[1]: *** [Makefile:53: ocamlfind] Error 2
# make[1]: Leaving directory '/home/simon/.opam/default/.opam-switch/build/ocamlfind.1.9.5/src/findlib'
# make: *** [Makefile:14: all] Error 2


<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build ocamlfind 1.9.5
└─
╶─ No changes have been performed
# Run eval $(opam env) to update the current shell environment
--8<---------------cut here---------------end--------------->8---

Well, I think it is another kind of bug than the reported one.

Closing?

Cheers,
simon




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-10-11 10:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-22 20:56 bug#34620: opam fails Gabriel Hondet
2019-02-22 21:41 ` Julien Lepiller
     [not found] ` <handler.34620.B.155086902325807.ack@debbugs.gnu.org>
2019-02-23 16:58   ` bug#34620: Acknowledgement (opam fails) Gabriel Hondet
2019-02-24  7:43     ` Gabriel Hondet
2019-02-24 10:15       ` Julien Lepiller
2023-10-11  8:58 ` bug#34620: 'opam install menhir' fails Simon Tournier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).