Indeed, it works now, thank for your time! On Sat, Aug 8, 2015 at 10:13 AM, Gabriel Scherer wrote: > Attached to this email is the patch I tried. It's exactly your proposed > change, with necessary dummy changes to make it compile. The following > process works reliably on my trunk: > > - make world > - apply the patch > - make bootstrap > - make world > > On Sat, Aug 8, 2015 at 1:28 PM, Bob Zhang wrote: > >> Before I changed Lambda.lambda, and it works, it might be that we >> serialized structured_constant somewhere in the bootstrapping process? >> >> On Sat, Aug 8, 2015 at 7:25 AM, Bob Zhang wrote: >> >>> It does not work for me. Since it fails to compile, I pushed it to >>> another branch https://github.com/bobzhang/ocaml/tree/fails (sorry for >>> the misinformation) >>> >>> I did `git clean -fxd` and try configure, make world, it failed in the >>> same place. >>> Thank you for your time! >>> >>> On Sat, Aug 8, 2015 at 3:37 AM, Gabriel Scherer < >>> gabriel.scherer@gmail.com> wrote: >>> >>>> You need to run "make bootstrap" to avoid having part of the definition >>>> compiled against the stale definition of lambda.cmi. (I just checked that >>>> it works on your change: after a bootrsap, "make world", "make opt", "make >>>> opt.opt" work.) >>>> >>>> On Sat, Aug 8, 2015 at 5:50 AM, Bob Zhang >>>> wrote: >>>> >>>>> >>>>> Dear caml develpers, >>>>> >>>>> I am working on an experimental branch to pass more information >>>>> from typedtree to lambda to enable ocaml generate user readable javascript >>>>> code(https://github.com/bobzhang/ocaml/tree/master) (online-demo: >>>>> http://zhanghongbo.me/js-demo/) >>>>> >>>>> Here I get a segfault, after I change const_block: >>>>> Below is my minimal change: >>>>> >>>>> ``` >>>>> type pointer_info = >>>>> | NullConstructor of string >>>>> | NullVariant of string >>>>> | NAPointer >>>>> >>>>> type tag_info = >>>>> | Constructor of string >>>>> | Tuple >>>>> | Variant of string >>>>> | Record >>>>> | NA >>>>> >>>>> type structured_constant = >>>>> Const_base of constant >>>>> | Const_pointer of int * pointer_info >>>>> | Const_block of int * tag_info * structured_constant list >>>>> | Const_float_array of string list >>>>> | Const_immstring of string >>>>> ``` >>>>> Note that the enriched info is not used in ``emitcode``, now I get a >>>>> segfault in make world: >>>>> >>>>> ``` >>>>> ../../boot/ocamlrun ../../ocamlc -nostdlib -I ../../stdlib -c -w >>>>> +33..39 -warn-error A -bin-annot -g -safe-string -I ../../stdlib -I >>>>> ../../utils -I ../../typing -I ../../bytecomp -I ../../asmcomp >>>>> extract_crc.ml >>>>> ../../boot/ocamlrun ../../ocamlc -nostdlib -I ../../stdlib -o >>>>> extract_crc dynlink.cma extract_crc.cmo >>>>> make[3]: *** [extract_crc] Segmentation fault: 11 >>>>> make[3]: *** Deleting file `extract_crc' >>>>> make[2]: *** [otherlibraries] Error 2 >>>>> make[1]: *** [all] Error 2 >>>>> ``` >>>>> >>>>> Any help is appreciated : ) >>>>> >>>>> -- >>>>> Regards >>>>> -- Hongbo Zhang >>>>> >>>> >>>> >>> >>> >>> -- >>> Regards >>> -- Hongbo Zhang >>> >> >> >> >> -- >> Regards >> -- Hongbo Zhang >> > > -- Regards -- Hongbo Zhang