$ cat foo.ml let _ = Printf.printf "hello world\n";; $ ocamlc -custom foo.ml $ ./a.out hello world $ debugedit a.out $ ./a.out No bytecode file specified. ocamlc -custom uses a nasty trick to have runnable executables withtout needing an interpreter, some packages use it (see ocamlc manpage for details). It embeds an interpreter and the bytecode in one file. I knew stripping them removed the bytecode, but running debugedit on them also does. See [1] for a probably better reference. As a result, some ocaml packages are broken if one has installsources in its features: FEATURES="installsources" emerge ocsigen $ ocsigen No bytecode file specified. If I remove installsources from my features, its working fine. I'm assigning this bug to dev-portage as it seems the sanest thing to do would be to restrict the installsources feature but it doesnt seem to be possible as of now. [1] http://caml.inria.fr/pub/ml-archives/caml-list/2002/08/492887df149fb58b1c21ffa89e6fee66.en.html
The real solution is for the ocaml crap to use a proper elf section... But if they're not going to do that, then I guess the second best solution is to add a RESTRICT=installsources That said, from a Gentoo PoV, isnt it better to install the bytecode separately from the installer, so as not to have multiple copies of the installer, some possibly outdated?
(In reply to comment #1) > That said, from a Gentoo PoV, isnt it better to install the bytecode separately > from the installer, so as not to have multiple copies of the installer, some > possibly outdated? well, ocaml upstream provides this (a "little bit" broken) way of doing things, some ocaml packages upstream use it, I dont think it would be a good idea to differ from them. Moreover, it'll need a wrapper if you want an executable in */bin I dont know the ocaml bytecode internals, but I suspect they are also incompatible from one ocaml version to another as if you try to mix different packages compiled with different ocaml versions eveything will break. And anyway , the possibility to have an old interpreter is a non issue because of that need to rebuild all ocaml packages when upgrading the ocaml compiler.
This has been released in 2.1.4.