[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#868938: FTBFS with ocaml 4.05.0



tags 868938 + patch
thanks

On 19/07/2017 18:54, Stéphane Glondu wrote:
polygen FTBFS with ocaml 4.05.0. Relevant log:
[...]
ocamlc -c -unsafe check.ml -o check.cmo
File "check.ml", line 40, characters 59-62:
Error: This expression has type elt -> Prelude.Prelude.symbol
        but an expression was expected of type elt -> elt
        Type Prelude.Prelude.symbol = string is not compatible with type
          elt = Prelude.Prelude.symbol * Err.loc option
makefile:55: recipe for target 'check.cmo' failed
make[1]: *** [check.cmo] Error 2
make[1]: Leaving directory '/tmp/polygen-1.0.6.ds2/src'
/usr/share/cdbs/1/class/makefile.mk:77: recipe for target 'debian/stamp-makefile-build' failed
make: *** [debian/stamp-makefile-build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

This is due to OCaml 4.05.0 introducing the function "map" in Set.S.

There is another issue, which is fixed in the attached patch (to be dropped in debian/patches). It should be compatible with the ocaml currently in unstable. Please upload as soon as possible, to ease the future OCaml transition.

Cheers,

--
Stéphane
diff -ur polygen-1.0.6.ds2-old/src/check.ml polygen-1.0.6.ds2-working/src/check.ml
--- polygen-1.0.6.ds2-old/src/check.ml	2005-11-21 19:21:00.000000000 +0000
+++ polygen-1.0.6.ds2-working/src/check.ml	2017-07-20 14:41:56.678598320 +0000
@@ -37,7 +37,7 @@
 
 	  	let of_labels labels = List.fold_left (fun lbs lb -> add (lb, None) lbs) empty labels
 	  	let occurs lb lbs = mem (lb, None) lbs
-        let pretty lbs = "{ " ^ (flatten_strings ", " (map fst (elements lbs))) ^ " }"
+        let pretty lbs = "{ " ^ (flatten_strings ", " (List.map fst (elements lbs))) ^ " }"
 	  end
 
 
diff -ur polygen-1.0.6.ds2-old/src/makefile polygen-1.0.6.ds2-working/src/makefile
--- polygen-1.0.6.ds2-old/src/makefile	2017-07-20 14:40:51.493038027 +0000
+++ polygen-1.0.6.ds2-working/src/makefile	2017-07-20 14:41:44.134298057 +0000
@@ -37,7 +37,7 @@
 OBJS		:= $(SRCS:.ml=.cmx)
 endif
 
-MLDEP	    = ocamldep -native
+MLDEP	    = ocamldep
 MLLEX		= ocamllex
 MLYACC		= ocamlyacc
 

Reply to: