Bug 1374247

Summary: inconsistent packaging of ocamlgraph
Product: [Fedora] Fedora Reporter: Aleksy Schubert <alx>
Component: ocaml-ocamlgraphAssignee: Alan Dunn <amdunn>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: amdunn, dwheeler, loganjerry
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 15:31:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Aleksy Schubert 2016-09-08 10:16:52 UTC
Description of problem:
The ocaml-ocamlgraph-1.8.7-1.fc24.x86_64 package seems to be packaged
inconsistently. The package contains the file

/usr/lib64/ocaml/ocamlgraph/META

which refers to "graph.cmxa", but the file graph.cmxa is available only in

ocaml-ocamlgraph-devel-1.8.7-1.fc24.x86_64

as a result some ocaml tools that rely on this information may be wrongly
instructed that the file exists. In particular the linking process for
bytecode programs will succeed while the one for the native code will fail.

Version-Release number of selected component (if applicable):

ocaml-ocamlgraph-1.8.7-1.fc24.x86_64
ocaml-ocamlgraph-devel-1.8.7-1.fc24.x86_64

How reproducible:


Steps to Reproduce:
1. Make sure ocaml-ocamlgraph-devel.x86_64 is not present in the system
2. Download example ocamlgraph code, e.g. http://ocamlgraph.lri.fr/sudoku.ml
3. Compile 
     ocamlc -I `ocamlfind query ocamlgraph`  graph.cma sudoku.ml
   (this works)
4. Compile
     ocamlopt -I `ocamlfind query ocamlgraph`  graph.cmxa sudoku.ml 
 
     

Actual results:
This issues error

File "sudoku.ml", line 1:
Error: Cannot find file graph.cmxa


Expected results:
while it should compile in both cases the same way.

Additional info:

Comment 1 Jerry James 2016-11-04 15:31:02 UTC
The bug is that you are trying to build against a library without having its -devel package installed.  That won't ever work.

META files are included in the ocaml packages so that findlib can find those packages for any reason; see:

https://fedoraproject.org/wiki/Packaging:OCaml#Main_package

If you are finding the package in order to build against it, then you have to have the -devel package installed for that to succeed.

Comment 2 Aleksy Schubert 2016-11-04 16:00:07 UTC
I'm not stupid. I know that I'm building against a library without having its -devel package installed and I expect it won't work. What surprises me is that it works in step 3 and it doesn't in 4, which is inconsistent with the common expectation among ocaml developers (that either both work or both do not work).