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

Many broken things since recent upgrade (ocamlrun, sexplib, camlp4) #1870

Closed
p4bl0- opened this issue Nov 19, 2014 · 4 comments
Closed

Many broken things since recent upgrade (ocamlrun, sexplib, camlp4) #1870

p4bl0- opened this issue Nov 19, 2014 · 4 comments

Comments

@p4bl0-
Copy link

p4bl0- commented Nov 19, 2014

Hello,

First, sorry for that issue title, but I don't know how to give a specific name to all the issues I'm having right now.

Here is what happened:

I updated my Debian, which installed the a new version of Opam. Hoping it would fix all the problems I had (see issue #1671), I moved my ~/.opam to somewhere else and restarted from scratch.
I ran opam init, then opam switch 4.02.1, then opam install batteries menhir merlin sexplib utop which are the vital minimum for me. Everything went fine until the very end of the installation, which is already an improvement.

However, I can't start utop as it immediatly fails with this message:

*** Error in `/home/p4bl0/.opam/4.02.1/bin/ocamlrun': double free or corruption (out): 0x000000000238a640 ***

I also can't compile my code which worked before as ocamlbuild segfaults while running external preprocessor on a file which depends on sexplib:

+ ocamlfind ocamldep -syntax camlp4o -package batteries -package sexplib.syntax -modules computation.ml > computation.ml.depends
Segmentation fault
File "computation.ml", line 1:
Error: Error while running external preprocessor
Command line: camlp4 '-I' '/home/p4bl0/.opam/4.02.1/lib/ocaml/camlp4' '-I' '/home/p4bl0/.opam/4.02.1/lib/type_conv' '-I' '/home/p4bl0/.opam/4.02.1/lib/ocaml' '-I' '/home/p4bl0/.opam/4.02.1/lib/ocaml' '-I' '/home/p4bl0/.opam/4.02.1/lib/sexplib' '-I' '/home/p4bl0/.opam/4.02.1/lib/sexplib' '-parser' 'o' '-parser' 'op' '-printer' 'p' 'pa_type_conv.cma' 'unix.cma' 'bigarray.cma' 'sexplib.cma' 'pa_sexp_conv.cma'  'computation.ml' > /tmp/ocamlpp26cacc

And indeed, if I start the toplevel and enter #require "sexplib.syntax", it segfaults.

I don't really know where to submit these bug: sexplib? ocamlbuild? here? My guess was that here at least people could send the issue upstream if necessary.

Also, I know it's very personnal but I may not be the only one in this situation: I'm attending the The Joint EasyCrypt-F*-CryptoVerif School 2014 next week and I really need my OCaml installation to be working by then as I will need it to install and run the required software.

@p4bl0- p4bl0- changed the title Many broken things since recent upgrade Many broken things since recent upgrade (ocamlrun, sexplib, camlp4) Nov 19, 2014
@p4bl0-
Copy link
Author

p4bl0- commented Nov 20, 2014

FWIW, everything seems to be fine with Opam 1.2 and OCaml 4.01.0 :).

@AltGr
Copy link
Member

AltGr commented Nov 21, 2014

Glad to hear it. It seems that your installation mixed stuff from different versions of OCaml (probably within and outside OPAM); I would check the PATH variable, and check where the different tools come from: which ocaml, which utop, which camlp4o, which ocamlrun, which ocamlfind etc.

Make sure you've run eval $(opam config env) too, or that your startup scripts have been properly updated (depending on your shell, opam may not have found the right file or place to add its hook. See #533)

@p4bl0-
Copy link
Author

p4bl0- commented Nov 21, 2014

Thanks for your answer :).
I don't think the problem is mixed stuff. I already checked before posting here that the PATH was right and it was. Here is the output of the which commands you list for instance:

[p4bl0@carotte:~] - 10:44:36 
λ which ocaml
/home/p4bl0/.opam/4.02.1/bin/ocaml
[p4bl0@carotte:~] - 10:44:46 
λ which utop
/home/p4bl0/.opam/4.02.1/bin/utop
[p4bl0@carotte:~] - 10:44:49 
λ which camlp4o
/home/p4bl0/.opam/4.02.1/bin/camlp4o
[p4bl0@carotte:~] - 10:44:54 
λ which ocamlrun
/home/p4bl0/.opam/4.02.1/bin/ocamlrun
[p4bl0@carotte:~] - 10:45:01 
λ which ocamlfind
/home/p4bl0/.opam/4.02.1/bin/ocamlfind

@AltGr AltGr added this to the 1.3 milestone Jan 29, 2015
@AltGr
Copy link
Member

AltGr commented Jan 29, 2015

Closing as I couldn't reproduce and this seems an isolated issue. Stuff regarding environment variables setup and switching has been fixed since 1.2 so that may be it.
Feel free to reopen, of course, if anything similar happens again.

@AltGr AltGr closed this as completed Jan 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants