Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yuzibo opened this issue Sep 14, 2024 · 1 comment

Comments

@yuzibo
Copy link

yuzibo commented Sep 14, 2024

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 referenced this issue in ocaml/opam-repository Sep 16, 2024
Fails with
```
#=== ERROR while compiling lem.2022-12-10 =====================================#
# context              2.3.0~alpha~dev | linux/arm32 | ocaml-base-compiler.5.2.0 | file:///home/opam/opam-repository
# path                 ~/.opam/5.2/.opam-switch/build/lem.2022-12-10
# command              ~/.opam/opam-init/hooks/sandbox.sh build make INSTALL_DIR=/home/opam/.opam/5.2
# exit-code            2
# env-file             ~/.opam/log/lem-7-84bb26.env
# output-file          ~/.opam/log/lem-7-84bb26.out
### output ###
# echo "(* Generated file -- do not edit. *)" > src/version.ml
# echo 'let v="2022-12-10"' >> src/version.ml
# echo "(* Generated file -- do not edit. *)" > src/share_directory.ml
# echo let d=\"/home/opam/.opam/5.2/share/lem\" >> src/share_directory.ml
# make -C src all
# make[1]: Entering directory '/home/opam/.opam/5.2/.opam-switch/build/lem.2022-12-10/src'
# ocamlbuild -use-ocamlfind -cflags -g main.native
# + ocamlfind ocamldep -package zarith -modules main.ml > main.ml.depends
# + ocamlfind ocamldep -package zarith -modules main.mli > main.mli.depends
# + ocamlfind ocamlc -c -g -annot -package zarith -I ulib -o main.cmi main.mli
# + 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[1]: *** [Makefile:2: all] Error 10
# make[1]: Leaving directory '/home/opam/.opam/5.2/.opam-switch/build/lem.2022-12-10/src'
# make: *** [Makefile:180: build-lem] Error 2
```
@yuzibo
Copy link
Author

yuzibo commented Oct 15, 2024

Update:

Thanks to my sponsor's([email protected]) 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant