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.1.0 #16637

Merged
merged 4 commits into from
Jun 26, 2020
Merged

Package binaryen.0.1.0 #16637

merged 4 commits into from
Jun 26, 2020

Conversation

ospencer
Copy link
Contributor

binaryen.0.1.0

OCaml bindings for Binaryen



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

@camelus
Copy link
Contributor

camelus commented Jun 14, 2020

Commit: 3b47d31

Hello @ospencer! I believe this is your first contribution here. Please be nice, reviewers!

☀️ All lint checks passed 3b47d31
  • These packages passed lint tests: binaryen.0.1.0

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

@ospencer
Copy link
Contributor Author

It looks like the CI is failing because a git submodule isn't being cloned with the repo on install. Is there a standard way to handle git submodules?

@ospencer
Copy link
Contributor Author

(or rather, the submodule isn't included in the git archive.)

@ospencer
Copy link
Contributor Author

I updated the archive to include the submodules, and it looks like things are building. Travis timed out once since one of the build commands took more than ten minutes, and it seems that the ocaml-repo-ci workers don't include cmake to build the C library. I don't know if this is a problem, but let me know.

@kit-ty-kate
Copy link
Member

Sorry for the time it took to take care of this PR.

cmake was a required dependency (we pull it by requiring the conf-cmake package, via opam's depexts system).
Also there two other issues:

Could you return the fixes in the opam file in the source/upstream repository? (no need to retag or do anything regarding the release though, I've fixed what was needed here)

@ospencer
Copy link
Contributor Author

No worries at all! I patched this upstream at grain-lang/binaryen.ml#4.

Thanks so much for your help!

@kit-ty-kate
Copy link
Member

mmh there seems to be still a few dependencies missing:


#=== ERROR while compiling binaryen.0.1.0 =====================================#
# context              2.0.7 | linux/x86_64 | ocaml-base-compiler.4.09.1 | pinned(https://github.com/grain-lang/binaryen.ml/releases/download/v0.1.0/binaryen-archive-v0.1.0.tar.gz)
# path                 ~/.opam/4.09/.opam-switch/build/binaryen.0.1.0
# command              ~/.opam/4.09/bin/dune build -p binaryen -j 72
# exit-code            1
# env-file             ~/.opam/log/binaryen-23-2e72e2.env
# output-file          ~/.opam/log/binaryen-23-2e72e2.out
### output ###
#       ocamlc src/ocaml_helpers.o
# ocaml_helpers.c:9:33: warning: 'binaryen_ops' defined but not used [-Wunused-variable]
#  static struct custom_operations binaryen_ops = {
#                                  ^~~~~~~~~~~~
#       ocamlc src/binaryen_stubs_function_tables.o
# In file included from binaryen_stubs_function_tables.c:7:
# ocaml_helpers.h:11:33: warning: 'binaryen_ops' defined but not used [-Wunused-variable]
#  static struct custom_operations binaryen_ops;
#                                  ^~~~~~~~~~~~
#       ocamlc src/binaryen_stubs_memory.o
# In file included from binaryen_stubs_memory.c:7:
# ocaml_helpers.h:11:33: warning: 'binaryen_ops' defined but not used [-Wunused-variable]
#  static struct custom_operations binaryen_ops;
#                                  ^~~~~~~~~~~~
#       ocamlc src/binaryen_stubs_imports.o
# In file included from binaryen_stubs_imports.c:7:
# ocaml_helpers.h:11:33: warning: 'binaryen_ops' defined but not used [-Wunused-variable]
#  static struct custom_operations binaryen_ops;
#                                  ^~~~~~~~~~~~
#        cmake src/dllbinaryen.so,src/libbinaryen.a (exit 1)
# (cd _build/default/src/binaryen && /usr/bin/cmake -D BUILD_STATIC_LIB=ON .)
# -- The C compiler identification is GNU 8.3.0
# -- The CXX compiler identification is GNU 8.3.0
# -- Check for working C compiler: /usr/bin/cc
# -- Check for working C compiler: /usr/bin/cc -- works
# -- Detecting C compiler ABI info
# -- Detecting C compiler ABI info - done
# -- Detecting C compile features
# -- Detecting C compile features - done
# -- Check for working CXX compiler: /usr/bin/c++
# -- Check for working CXX compiler: /usr/bin/c++ -- works
# -- Detecting CXX compiler ABI info
# -- Detecting CXX compiler ABI info - done
# -- Detecting CXX compile features
# -- Detecting CXX compile features - done
# -- No build type selected, default to Release
# -- Building with -DBUILD_LLVM_DWARF
# -- Looking for pthread.h
# -- Looking for pthread.h - found
# -- Looking for pthread_create
# -- Looking for pthread_create - not found
# -- Check if compiler accepts -pthread
# -- Check if compiler accepts -pthread - yes
# -- Found Threads: TRUE  
# -- Building with -std=c++14
# -- Building with -Wall
# -- Building with -Werror
# -- Building with -Wextra
# -- Building with -Wno-unused-parameter
# -- Building with -fno-omit-frame-pointer
# -- Building with -Wno-implicit-int-float-conversion
# -- Building with -Wno-unknown-warning-option
# -- Building with -Wswitch
# -- Building with -fPIC
# -- Building with -O2
# -- Building with -UNDEBUG
# CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
#   Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at
#   least version "3.5")
# Call Stack (most recent call first):
#   /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
#   /usr/share/cmake-3.13/Modules/FindPythonInterp.cmake:159 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
#   src/passes/CMakeLists.txt:2 (find_package)
# 
# 
# -- Configuring incomplete, errors occurred!
# See also "/home/opam/.opam/4.09/.opam-switch/build/binaryen.0.1.0/_build/default/src/binaryen/CMakeFiles/CMakeOutput.log".
# See also "/home/opam/.opam/4.09/.opam-switch/build/binaryen.0.1.0/_build/default/src/binaryen/CMakeFiles/CMakeError.log".

Adding conf-python-3 should take care of this, but do you know what this packages requires?

@ospencer
Copy link
Contributor Author

I'm not completely certain what all of the system dependencies are, but I think it's just cmake and python3.

@kit-ty-kate
Copy link
Member

Mmh the MacOS check is the only one to fail now:

+ /Users/travis/.opam/opam-init/hooks/sandbox.sh "build" "dune" "build" "-p" "binaryen" "-j" "1" (CWD=/Users/travis/.opam/ocaml-system/.opam-switch/build/binaryen.0.1.0)
-        cmake src/dllbinaryen.so,src/libbinaryen.a
- -- The C compiler identification is AppleClang 11.0.0.11000033
- -- The CXX compiler identification is AppleClang 11.0.0.11000033
- -- Check for working C compiler: /Applications/Xcode-11.3.1.app/Contents/Developer/usr/bin/gcc
- -- Check for working C compiler: /Applications/Xcode-11.3.1.app/Contents/Developer/usr/bin/gcc - works
- -- Detecting C compiler ABI info
- -- Detecting C compiler ABI info - done
- -- Detecting C compile features
- -- Detecting C compile features - done
- -- Check for working CXX compiler: /Applications/Xcode-11.3.1.app/Contents/Developer/usr/bin/g++
- -- Check for working CXX compiler: /Applications/Xcode-11.3.1.app/Contents/Developer/usr/bin/g++ - works
- -- Detecting CXX compiler ABI info
- -- Detecting CXX compiler ABI info - done
- -- Detecting CXX compile features
- -- Detecting CXX compile features - done
- -- No build type selected, default to Release
- -- Building with -DBUILD_LLVM_DWARF
- -- Looking for pthread.h
- -- Looking for pthread.h - found
- -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
- -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
- -- Found Threads: TRUE  
- -- Building with -std=c++14
- -- Building with -Wall
- -- Building with -Werror
- -- Building with -Wextra
- -- Building with -Wno-unused-parameter
- -- Building with -fno-omit-frame-pointer
- -- Building with -Wno-implicit-int-float-conversion
- -- Building with -Wno-unknown-warning-option
- -- Building with -Wswitch
- -- Building with -fPIC
- -- Building with -O2
- -- Building with -UNDEBUG
- -- Found PythonInterp: /usr/local/bin/python3 (found suitable version "3.7.7", minimum required is "3.5") 
- -- Building libbinaryen as statically linked library.
- -- Configuring done
- -- Generating done
- -- Build files have been written to: /Users/travis/.opam/ocaml-system/.opam-switch/build/binaryen.0.1.0/_build/default/src/binaryen

No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.

It seems to be stalling for a long time without giving any inputs. Is that expected? Otherwise I think this PR should be good to be merged?

@ospencer
Copy link
Contributor Author

Yeah, it takes ~15 minutes or so to compile all of the C code, and dune suppresses the output of that command until it's finished. Doesn't matter in practice, but we could probably add --no-buffer to the dune build command and it shouldn't hang.

@kit-ty-kate
Copy link
Member

Thanks a lot! Sorry again for the delay in handling this PR.

@kit-ty-kate kit-ty-kate merged commit 873cadc into ocaml:master Jun 26, 2020
@ospencer
Copy link
Contributor Author

I appreciate all your help!

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.

3 participants