Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 271160

Summary: dev-ml/extlib-1.5 ebuild puts files in wrong directory
Product: Gentoo Linux Reporter: Noah Ready-Campbell <noah.readcamp>
Component: [OLD] DevelopmentAssignee: Gentoo Team for the ML programming language family <ml>
Status: RESOLVED INVALID    
Severity: normal CC: noah.readcamp
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Noah Ready-Campbell 2009-05-25 04:06:03 UTC
I emerged extlib, but found it unusable initially.  For example:

# open Std;;
Unbound module Std

I was able to get the "Std" module to work by copying the std.cmi and std.mli files from /usr/lib/ocaml/site-packages/extlib (where they were by default) to /usr/lib/ocaml.


I am new to OCaml, so I may be doing something wrong, but it was a bit of a hurdle.

Reproducible: Always

Steps to Reproduce:
1. emerge dev-ml/extlib
2. try to use it (e.g. open Std;;)

Actual Results:  
I get an error stating that OCaml can't find the module in extlib.

Expected Results:  
It should have found the module properly, and I should have been able to use it.
Comment 1 Noah Ready-Campbell 2009-05-25 05:02:09 UTC
Actually, moving the .mli and .cmi files didn't fix the problem.  After the copy, "open" works fine, but you can't actually use the contents of the modules.  I just get "Reference to undefined global `Std'".

I think I must be doing something wrong, but it would be pleasant if emerging extlib resulted in a workable library, or maybe further instructions on using it properly.
Comment 2 Noah Ready-Campbell 2009-05-27 06:03:55 UTC
(In reply to comment #1)
> Actually, moving the .mli and .cmi files didn't fix the problem.  After the
> copy, "open" works fine, but you can't actually use the contents of the
> modules.  I just get "Reference to undefined global `Std'".
> 
> I think I must be doing something wrong, but it would be pleasant if emerging
> extlib resulted in a workable library, or maybe further instructions on using
> it properly.
> 

Well, in case anyone finds this, you can get extlib to work properly in the top loop like this:

ocaml -I `ocamlfind query extlib` extLib.cma

You can can get it it work properly with ocamlbuild like this:

ocamlbuild -cflags -I,/usr/lib/ocaml/site-packages/extlib/ -lflags -I,/usr/lib/ocaml/site-packages/extlib/ -lib extLib target

where target might be something like "test.native", and your working directory for the command has "test.ml" in it.
Comment 3 Alexis Ballier gentoo-dev 2009-06-17 07:44:19 UTC
(In reply to comment #2)
> ocaml -I `ocamlfind query extlib` extLib.cma

yes; thats the point of installing it there, so that ocamlfind (findlib) helps finding it.