Created attachment 558296 [details] 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" ) )
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?
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.
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 ...
(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.
(In reply to comment #4) And building that tarball does produce pa_deriving.cma
(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.
(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
This message is a reminder that Fedora 16 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 16. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '16'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 16's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 16 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged to click on "Clone This Bug" and open it against that version of Fedora. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
I've no real idea how to fix this. However feel free to test it again on a more recent Fedora to see if it's still a problem, and to suggest fixes to the META file.
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed.