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

Package binaryen.0.4.0 #17699

Merged
merged 1 commit into from Dec 3, 2020
Merged

Conversation

grainbot
Copy link
Contributor

binaryen.0.4.0

OCaml bindings for Binaryen



Changes in this Release

  • Upgrade Binaryen to v95
  • Add Windows support
  • Vendor prebuilt Binaryen for Windows, MacOS, and Linux

🐫 Pull-request generated by opam-publish v2.0.2

@camelus
Copy link
Contributor

camelus commented Nov 25, 2020

Commit: dea0f3e

@grainbot has posted 2 contributions.

☀️ All lint checks passed dea0f3e
  • These packages passed lint tests: binaryen.0.4.0

☀️ Installability check (+1)
  • new installable packages (1): binaryen.0.4.0

@kit-ty-kate
Copy link
Member

This fails on ARM64, PPC64, ARM32 and X86_32 with an error similar to:


#=== ERROR while compiling binaryen.0.4.0 =====================================#
# context              2.0.7 | linux/arm64 | ocaml-base-compiler.4.11.1 | pinned(https://github.com/grain-lang/binaryen.ml/releases/download/v0.4.0/binaryen-archive-v0.4.0.tar.gz)
# path                 ~/.opam/4.11/.opam-switch/build/binaryen.0.4.0
# command              ~/.opam/4.11/bin/dune build -p binaryen -j 31
# exit-code            1
# env-file             ~/.opam/log/binaryen-1-8e2121.env
# output-file          ~/.opam/log/binaryen-1-8e2121.out
### output ###
#          gcc src/binaryen_stubs_features.o
# In file included from binaryen_stubs_features.c:7:
# ocaml_helpers.h:13:33: warning: 'binaryen_ops' defined but not used [-Wunused-variable]
#  static struct custom_operations binaryen_ops = {
#                                  ^~~~~~~~~~~~
#          gcc src/binaryen_stubs_function_tables.o
# In file included from binaryen_stubs_function_tables.c:7:
# ocaml_helpers.h:13:33: warning: 'binaryen_ops' defined but not used [-Wunused-variable]
#  static struct custom_operations binaryen_ops = {
#                                  ^~~~~~~~~~~~
#          gcc src/ocaml_helpers.o
# In file included from ocaml_helpers.c:7:
# ocaml_helpers.h:13:33: warning: 'binaryen_ops' defined but not used [-Wunused-variable]
#  static struct custom_operations binaryen_ops = {
#                                  ^~~~~~~~~~~~
#          gcc src/binaryen_stubs_memory.o
# In file included from binaryen_stubs_memory.c:7:
# ocaml_helpers.h:13:33: warning: 'binaryen_ops' defined but not used [-Wunused-variable]
#  static struct custom_operations binaryen_ops = {
#                                  ^~~~~~~~~~~~
#          gcc src/binaryen_stubs_imports.o
# In file included from binaryen_stubs_imports.c:7:
# ocaml_helpers.h:13:33: warning: 'binaryen_ops' defined but not used [-Wunused-variable]
#  static struct custom_operations binaryen_ops = {
#                                  ^~~~~~~~~~~~
#     ocamlopt src/binaryen_native.cmxs (exit 2)
# (cd _build/default && /home/opam/.opam/4.11/bin/ocamlopt.opt -w -40 -g -shared -linkall -I src -I src -o src/binaryen_native.cmxs src/binaryen_native.cmxa)
# /usr/bin/ld: skipping incompatible src/libbinaryen.a when searching for -lbinaryen
# /usr/bin/ld: skipping incompatible src/libbinaryen.a when searching for -lbinaryen
# /usr/bin/ld: cannot find -lbinaryen
# collect2: error: ld returned 1 exit status
# File "caml_startup", line 1:
# Error: Error during linking (exit code 1)

@phated
Copy link
Contributor

phated commented Nov 25, 2020

This is by design currently. Binaryen won't support MinGW until their next release, so we needed to patch their code at the v95 tag and ship archives with this release. We only have access to Windows, Linux and Mac 64-bit through GitHub Actions to create these, so that's all we can support with v0.4.0.

We have a tracking issue at grain-lang/binaryen.ml#38

@mseri
Copy link
Member

mseri commented Dec 3, 2020

I am going to merge. If we decide to mark it as unavailable on those archs we can update the metadata in a separate PR

@mseri mseri merged commit 087a6cc into ocaml:master Dec 3, 2020
@phated
Copy link
Contributor

phated commented Dec 3, 2020

Thanks! I actually don't know how to specify the platforms in the metadata. Is it somewhere in the docs?

@mseri
Copy link
Member

mseri commented Dec 3, 2020

Yes, one could do something like

available:
arch = "arm" | arch = "x86_32" | arch = "x86_64" | arch = "x86_64" |
arch = "arm64"
(with !=)
(see also https://opam.ocaml.org/doc/Manual.html#opamvar-arch )

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

Successfully merging this pull request may close these issues.

None yet

5 participants