Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
Summary: Incomplete packaging
https://bugzilla.redhat.com/show_bug.cgi?id=785680
Summary: Incomplete packaging Product: Fedora Version: 16 Platform: x86_64 OS/Version: Linux Status: NEW Severity: high Priority: unspecified Component: ocaml-deriving AssignedTo: rjones@redhat.com ReportedBy: 5764c029b688c1c0d24a2e97cd764f@gmail.com QAContact: extras-qa@fedoraproject.org CC: rjones@redhat.com, fedora-ocaml-list@redhat.com Classification: Fedora Story Points: --- Type: --- Regression: --- Mount Type: --- Documentation: ---
Created attachment 558296 --> https://bugzilla.redhat.com/attachment.cgi?id=558296 two files ... "Makefile" and "Main.ml"
Description of problem:
I cannot link libraries provided by "ocaml-deriving-devel" package.
Which Version-Release number of selected component (if applicable):
Fedora release 16 (Verne)
How reproducible:
always
Steps to Reproduce: 1. sudo yum install ocaml-deriving-devel 2. tar xvzf deriving.tar.gz 2. cd deriving 3. make && ./main
Actual results:
ocamlc -c -pp "camlp4of -I /usr/lib64/ocaml/deriving pa_deriving.cma" -I /usr/lib64/ocaml/deriving nums.cma Main.ml Camlp4: Uncaught exception: DynLoader.Error ("pa_deriving.cma", "file not found in path")
File "Main.ml", line 1, characters 0-1: Error: Preprocessor error make: *** [Main.cmo] Error 2
Expected results:
ocamlc -c -pp "camlp4of -I ~/lib/godi/lib/ocaml/pkg-lib/deriving-ocsigen pa_deriving.cma" -I ~/lib/godi/lib/ocaml/pkg-lib/deriving-ocsigen nums.cma Main.ml
ocamlc -o main -I ~/lib/godi/lib/ocaml/pkg-lib/deriving-ocsigen nums.cma deriving.cma Main.cmo
len(s) = 15; s = test s' = {a = 30; b = "test"}
Additional info:
The following (relevant) file:
/usr/lib64/ocaml/deriving/META
has suspicious contents.
name="deriving" version="0.1.1a" requires="%{camlp4}" description="%{description}" # need a syntax here XXX
Compare it with analogous file
/home/mkosik/lib/godi/lib/ocaml/pkg-lib/deriving-ocsigen/META
provided by GODI:
version = "0.2-ocsigen" description = "Deriving (patched for the Ocsigen project)" requires = "num" archive(byte) = "deriving.cma" archive(native) = "deriving.cmxa"
package "syntax" ( requires(syntax) = "camlp4,unix" requires(syntax,toploop) += "deriving-ocsigen" archive(preprocessor,syntax) = "pa_deriving.cma" archive(syntax,toploop) = "pa_deriving.cma"
package "base" ( requires(syntax) = "camlp4" archive(preprocessor,syntax) = "pa_deriving_common.cmo pa_deriving.cmo" archive(syntax,toploop) = "pa_deriving_common.cmo pa_deriving.cmo" ) )
package "syntax_tc" ( exists_if = "pa_deriving_tc.cma" requires(syntax) = "camlp4,unix,type-conv" requires(syntax,toploop) += "deriving-ocsigen" archive(preprocessor,syntax) = "pa_deriving_tc.cma" archive(syntax,toploop) = "pa_deriving_tc.cma"
package "base" ( requires(syntax) = "camlp4" archive(preprocessor,syntax) = "pa_deriving_common.cmo pa_deriving_tc.cmo" archive(syntax,toploop) = "pa_deriving_common.cmo pa_deriving_tc.cmo" ) )
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=785680
Richard W.M. Jones rjones@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Incomplete packaging |META file is wrong in | |ocaml-deriving package
--- Comment #1 from Richard W.M. Jones rjones@redhat.com 2012-02-01 06:06:00 EST --- I have pushed essentially the META file from ocsigen into the Rawhide package: http://koji.fedoraproject.org/koji/taskinfo?taskID=3751528
However I have no idea if this is correct nor how to test it. What is 'deriving.tar.gz' in your example?
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=785680
Richard W.M. Jones rjones@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Flag| |needinfo?(5764c029b688c1c0d | |24a2e97cd764f@gmail.com)
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=785680
Matej Košík 5764c029b688c1c0d24a2e97cd764f@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flag|needinfo?(5764c029b688c1c0d | |24a2e97cd764f@gmail.com) |
--- Comment #2 from Matej Košík 5764c029b688c1c0d24a2e97cd764f@gmail.com 2012-02-01 06:34:30 EST --- Hi,
The 'deriving.tar.gz' tar-ball (attached above) contains a valid Ocaml code that tries to use the syntactic sugar provided by the "deriving.cma" library (it is like a simple shallow test-case).
If the "deriving.cma" library is installed on the system and usable, the test case will be compilable and runnable and it will print (roughly) the above string on the standard output.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=785680
--- Comment #3 from Richard W.M. Jones rjones@redhat.com 2012-02-01 08:33:49 EST --- This still fails:
Camlp4: Uncaught exception: DynLoader.Error ("pa_deriving.cma", "file not found in path")
However there is no pa_deriving.cma file built by the upstream source, nor any pa_deriving.ml file that I can see. So we must be building from a different upstream source from whatever GODI is using and/or deriving has been forked.
Debian are packaging this as a separate package: https://github.com/jaked/deriving but even this doesn't have pa_deriving ...
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=785680
Scott Tsai scottt.tw@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |scottt.tw@gmail.com
--- Comment #4 from Scott Tsai scottt.tw@gmail.com 2012-02-01 09:22:14 EST --- (In reply to comment #3)
However there is no pa_deriving.cma file built by the upstream source, nor any pa_deriving.ml file that I can see. So we must be building from a different upstream source from whatever GODI is using and/or deriving has been forked.
Richard, GODI is packaging http://ocsigen.org/download/deriving-ocsigen-0.2.tar.gz as "godi-deriving-ocsigen". There's also an update, http://ocsigen.org/download/deriving-ocsigen-0.3c.tar.gz , from the same directory.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=785680
--- Comment #5 from Scott Tsai scottt.tw@gmail.com 2012-02-01 09:24:53 EST --- (In reply to comment #4) And building that tarball does produce pa_deriving.cma
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=785680
--- Comment #6 from Matej Košík 5764c029b688c1c0d24a2e97cd764f@gmail.com 2012-02-01 09:31:00 EST --- (In reply to comment #3)
This still fails:
Camlp4: Uncaught exception: DynLoader.Error ("pa_deriving.cma", "file not found in path")
However there is no pa_deriving.cma file built by the upstream source, nor any pa_deriving.ml file that I can see. So we must be building from a different upstream source from whatever GODI is using and/or deriving has been forked.
Debian are packaging this as a separate package: https://github.com/jaked/deriving but even this doesn't have pa_deriving ...
deriving.tar.gz is not supposed to provide pa_deriving.cma. It only tests whether it exists on the system and if yes, it tries to link it.
(I am sorry for the confusion. I should have chosen different name for the tarball.)
I think that *deriving* packages (published in Fedora repositories) do not actually provide all the files that are needed.
There might be a good reason to split things into two packages: - ocaml-deriving (e.g.install this if you need to run programs whose implementation takes advantage of the "deriving" syntactic sugar) - ocaml-deriving-devel (e.g. install this if you want to create your own program that takes advantage of the "deriving" syntactic sugar) but I do not understand why "deriving.cma" is in one package and "derving.cmxa" is in the other. Which one should be chosen depends on the fact whether programmer prefers "ocamlc" or "ocamlcopt".
Even if I install both---ocaml-deriving as well as ocaml-deriving-devel---I still miss the "pa_deriving.cma". I guess (I am not sure) this is the file that tells camlp4 how to convert deriving-related syntactic sugar to basic Ocaml constructs.
GODI provides this file.
Please do not reply directly to this email. All additional comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=785680
--- Comment #7 from Richard W.M. Jones rjones@redhat.com 2012-02-09 08:58:04 EST --- (In reply to comment #6)
but I do not understand why "deriving.cma" is in one package and "derving.cmxa" is in the other. Which one should be chosen depends on the fact whether programmer prefers "ocamlc" or "ocamlcopt".
This specific question is answered in the packaging guidelines: https://fedoraproject.org/wiki/Packaging:OCaml#Packaging_libraries
ocaml-devel@lists.fedoraproject.org