rems-project / lem

Lem semantic definition language
Other
131 stars 15 forks source link

Incompatibility with ocaml-option-bytecode-only: Build fails on non-native-code architectures(eg, armel,i386) #36

Open yuzibo opened 2 months ago

yuzibo commented 2 months ago

With many people's help, lem was uploaded to Debian official.

But to my surprise, it build failed on many architectures, like arm{el,hf}, i386, misp64el with following log.

+ ocamlfind ocamldep -package zarith -modules ast.ml > ast.ml.depends
+ ocamlfind ocamldep -package zarith -modules ulib/ulib.ml > ulib/ulib.ml.depends
+ ocamlfind ocamldep -package zarith -modules ulib/batText.mli > ulib/batText.mli.depends
+ ocamlfind ocamldep -package zarith -modules ulib/batUChar.mli > ulib/batUChar.mli.depends
+ ocamlfind ocamlc -c -g -annot -package zarith -I ulib -o ulib/batUChar.cmi ulib/batUChar.mli
+ ocamlfind ocamldep -package zarith -modules ulib/batUTF8.mli > ulib/batUTF8.mli.depends
+ ocamlfind ocamlc -c -g -annot -package zarith -I ulib -o ulib/batText.cmi ulib/batText.mli
+ ocamlfind ocamlc -c -g -annot -package zarith -I ulib -o ulib/batUTF8.cmi ulib/batUTF8.mli
+ ocamlfind ocamlc -c -g -annot -package zarith -I ulib -o ulib/ulib.cmo ulib/ulib.ml
+ ocamlfind ocamlc -c -g -annot -package zarith -I ulib -o ast.cmo ast.ml
+ ocamlfind ocamldep -package zarith -modules ulib/batText.ml > ulib/batText.ml.depends
+ ocamlfind ocamldep -package zarith -modules ulib/batReturn.ml > ulib/batReturn.ml.depends
+ ocamlfind ocamldep -package zarith -modules ulib/batReturn.mli > ulib/batReturn.mli.depends
+ ocamlfind ocamlc -c -g -annot -package zarith -I ulib -o ulib/batReturn.cmi ulib/batReturn.mli
+ ocamlfind ocamldep -package zarith -modules ulib/batUChar.ml > ulib/batUChar.ml.depends
+ ocamlfind ocamldep -package zarith -modules ulib/batUTF8.ml > ulib/batUTF8.ml.depends
+ ocamlfind ocamlopt -c -g -annot -package zarith -I ulib -o ulib/batUChar.cmx ulib/batUChar.ml
+ ocamlfind ocamlopt -c -g -annot -package zarith -I ulib -o ulib/batUChar.cmx ulib/batUChar.ml
ocamlfind: Not supported in your configuration: ocamlopt
Command exited with code 2.
make[3]: *** [Makefile:2: all] Error 10
make[3]: Leaving directory '/<<PKGBUILDDIR>>/src'
make[2]: *** [Makefile:181: build-lem] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: *** [debian/rules:13: override_dh_auto_build] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:10: binary-arch] Error 2
dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit status 2

After more searching, I noticed there is one commit to stop building on bytecode support only from opam-repository. So could you help me to confirm that is right?

If so, I can only enable build support on architectures with native code supported like x86, arm64, riscv64 and s390x from the buildd page. TIA.

yuzibo commented 1 month ago

Update:

Thanks to my sponsor's(glondu@debian.org) help, now there is one patch to support bytecode compiler build.

Would you like to add support for bytecode compiler? If so, I can open one PR to forward glondu's patch. thansks.