rdicosmo / parmap

Parmap is a minimalistic library allowing to exploit multicore architecture for OCaml programs with minimal modifications.
http://rdicosmo.github.io/parmap/
Other
94 stars 20 forks source link

linking fails on 4.03.0 where 4.02.3 builds fine #44

Closed nilsbecker closed 8 years ago

nilsbecker commented 8 years ago

one project of mine compiles fine with 4.02.3 but when i opam switch to 4.03.0+flambda or to 4.03.0, (and eval $(opam config env)) i get this:

+ ocamlfind ocamlopt -c -g -bin-annot -principal -w A -package 'containers, sequence, parmap, csv, gsl' -I facs -o facs_run.cmx facs_run.ml
File "_none_", line 1:
Warning 58: no cmx file was found in path for module Parmap, and its interface was not compiled with -opaque
+ ocamlfind ocamlopt -linkpkg -g -package 'containers, sequence, parmap, csv, gsl' facs/ad.cmx rng.cmx langevin.cmx facs/pars.cmx linalg.cmx facs/fields.cmx facs/run_pars.cmx facs/motion.cmx facs_run.cmx -o facs_run.native
File "_none_", line 1:
Error: No implementations provided for the following modules:
         Setcore referenced from /Users/nbecker/.opam/4.03.0+flambda/lib/parmap/parmap.cmxa(Parmap)

this is on os x, using ocamlbuild to build.

nilsbecker commented 8 years ago

what other information would be useful?

parmap:

installed-versions: 1.0-rc7 [4.02.3], 1.0-rc7.1 [4.03.0+flambda 4.03.0]

ocamlbuild:

installed-versions: 0 [4.02.3], 0.9.2 [4.03.0+flambda 4.03.0]
rdicosmo commented 8 years ago

Hi Nils there is an issue open on this and we are looking into it

Le vendredi 6 mai 2016, nilsbecker notifications@github.com a écrit :

what other information would be useful?

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/rdicosmo/parmap/issues/44#issuecomment-217496903

Roberto Di Cosmo


Professeur (on leave at/detache a INRIA Roquencourt) IRIF email : roberto@dicosmo.org Universite Paris Diderot web : http://www.dicosmo.org Case 7014 Twitter : http://twitter.com/rdicosmo 5, Rue Thomas Mann

F-75205 Paris Cedex 13 FRANCE

Office location:

Paris Diderot INRIA

Bureau 3020 (3rd floor) Bureau C123 Batiment Sophie Germain Batiment C 8 place Aurélie Nemours 2, Rue Simone Iff Tel: +33 1 57 27 92 20 Tel: +33 1 80 49 44 42

Metro Bibliotheque F. Mitterrand Ligne 6: Dugommier

ligne 14/RER C Ligne 14/RER A: Gare de Lyon

GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3

nilsbecker commented 8 years ago

ok, thanks! (i checked before but was not able to identify an open issue on this)

rdicosmo commented 8 years ago

The latest pushed version of the source contains a temporary fix for the native code of parmap, thanks to Pietro Abate: it adds explicitly setcore.cmx to the list of units compiled into parmap.cmxa, even if the content of this module is empty (all the code is in the C library). This was not needed until 4.03.0, and we still do not understand what's going on, but at least you will be able to compile. Notice that the issue is still open for bytecode...

rdicosmo commented 8 years ago

The series of patches from ea5f9179ff5d1126fd01bc04888dcc54 to 7598fb94d59178d65bd8d2892c19356290f5d4e3 definitely fix the linking/compilation problem introduced by the fact that 4.03 is now much more stricter in checking the presence of a module in a library, even if this module is just composed of stubs. A new version of the opam package has been submitted corresponding to commit 7598fb94d59178d65bd8d2892c19356290f5d4e3. Notice that there are still warnings coming from 4.02/4.03 deprecations, but we have not found yet a simple way to handle them in a way that does not disrupt compilation on earlier compilers.

nilsbecker commented 8 years ago

i can confirm that the linking problem is fixed for me on 4.03.0 thanks!