janestreet / re2

OCaml bindings for RE2
MIT License
43 stars 19 forks source link

114.20+69 fails to build due to parallelism #17

Closed bogdan2412 closed 7 years ago

bogdan2412 commented 7 years ago

Seems like there's some dependency that's not tracked properly by the build system. opam install re2 --jobs 1 works fine.

Regular opam install re2 fails with the error below. Running make twice in the build directory also results in a successful full build.

Running: /home/bogdan2412/.opam/4.03.0/bin/ocamlc.opt -config > /tmp/jbuildd136b5.output
Running: /home/bogdan2412/.opam/4.03.0/bin/ocamlfind printconf path > /tmp/jbuild5a383b.output
Running: /usr/local/bin/opam config var lib > /tmp/jbuildb44c9d.output
Running: (cd _build/default/src && /usr/lib64/ccache/gcc -I /home/bogdan2412/.opam/4.03.0/lib/ocaml -I re2_c/libre2 -O2 -fno-strict-aliasing -fwrapv -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -fPIC -I /home/bogdan2412/.opam/4.03.0/lib/core_kernel -I /home/bogdan2412/.opam/4.03.0/lib/jane-street-headers -g -o stubs.o -c stubs.cpp)
Running: (cd _build/default && /home/bogdan2412/.opam/4.03.0/bin/ocamlopt.opt -o .ppx/ppx_jane/ppx.exe -I /home/bogdan2412/.opam/4.03.0/lib/base -I /home/bogdan2412/.opam/4.03.0/lib/ocaml -I /home/bogdan2412/.opam/4.03.0/lib/ocaml/compiler-libs -I /home/bogdan2412/.opam/4.03.0/lib/octavius -I /home/bogdan2412/.opam/4.03.0/lib/ppx_assert -I /home/bogdan2412/.opam/4.03.0/lib/ppx_base -I /home/bogdan2412/.opam/4.03.0/lib/ppx_bench -I /home/bogdan2412/.opam/4.03.0/lib/ppx_bin_prot -I /home/bogdan2412/.opam/4.03.0/lib/ppx_compare -I /home/bogdan2412/.opam/4.03.0/lib/ppx_core -I /home/bogdan2412/.opam/4.03.0/lib/ppx_custom_printf -I /home/bogdan2412/.opam/4.03.0/lib/ppx_deriving -I /home/bogdan2412/.opam/4.03.0/lib/ppx_driver -I /home/bogdan2412/.opam/4.03.0/lib/ppx_enumerate -I /home/bogdan2412/.opam/4.03.0/lib/ppx_expect -I /home/bogdan2412/.opam/4.03.0/lib/ppx_fail -I /home/bogdan2412/.opam/4.03.0/lib/ppx_fields_conv -I /home/bogdan2412/.opam/4.03.0/lib/ppx_hash -I /home/bogdan2412/.opam/4.03.0/lib/ppx_here -I /home/bogdan2412/.opam/4.03.0/lib/ppx_inline_test -I /home/bogdan2412/.opam/4.03.0/lib/ppx_jane -I /home/bogdan2412/.opam/4.03.0/lib/ppx_js_style -I /home/bogdan2412/.opam/4.03.0/lib/ppx_let -I /home/bogdan2412/.opam/4.03.0/lib/ppx_optcomp -I /home/bogdan2412/.opam/4.03.0/lib/ppx_optional -I /home/bogdan2412/.opam/4.03.0/lib/ppx_pipebang -I /home/bogdan2412/.opam/4.03.0/lib/ppx_sexp_conv -I /home/bogdan2412/.opam/4.03.0/lib/ppx_sexp_message -I /home/bogdan2412/.opam/4.03.0/lib/ppx_sexp_value -I /home/bogdan2412/.opam/4.03.0/lib/ppx_tools -I /home/bogdan2412/.opam/4.03.0/lib/ppx_type_conv -I /home/bogdan2412/.opam/4.03.0/lib/ppx_typerep_conv -I /home/bogdan2412/.opam/4.03.0/lib/ppx_variants_conv -I /home/bogdan2412/.opam/4.03.0/lib/result -I /home/bogdan2412/.opam/4.03.0/lib/sexplib ocamlcommon.cmxa ppx_core.cmxa print_diff.cmxa resrap.cmxa ppx_optcomp.cmxa caml.cmxa shadow_stdlib.cmxa unix.cmxa ppx_driver.cmxa ppx_compare_expander.cmxa ppx_here_expander.cmxa ppx_sexp_conv_expander.cmxa dynlink.cmxa ppx_tools.cmxa result.cmxa ppx_deriving.cmxa ppx_type_conv.cmxa ppx_hash_expander_lib.cmxa octavius.cmxa ppx_compare.cmxa ppx_enumerate.cmxa ppx_hash.cmxa ppx_js_style.cmxa ppx_sexp_conv.cmxa ppx_inline_test_libname.cmxa bin_shape_expand.cmxa ppx_format_lifter.cmxa base.cmxa bigarray.cmxa sexplib.cmxa expect_test_common.cmxa ppx_expect_payload.cmxa ppx_inline_test.cmxa ppx_assert.cmxa ppx_base.cmxa ppx_bench.cmxa ppx_bin_prot.cmxa ppx_custom_printf.cmxa ppx_fail.cmxa ppx_fields_conv.cmxa ppx_here.cmxa ppx_let.cmxa ppx_optional.cmxa ppx_pipebang.cmxa ppx_sexp_message.cmxa ppx_sexp_value.cmxa ppx_typerep_conv.cmxa ppx_variants_conv.cmxa ppx_expect.cmxa ppx_jane_kernel.cmxa ppx_jane.cmxa ppx_driver_runner.cmxa)
Running: (cd _build/default/src && /bin/bash -e -u -o pipefail -c 'cpp options.mlp > options.ml')
Running: (cd _build/default && /home/bogdan2412/.opam/4.03.0/bin/ocamlc.opt -w -49 -w -40 -g -bin-annot -no-alias-deps -I src -o src/re2.cmo -c -impl src/re2.ml-gen)
Running: (cd _build/default/src/re2_c && /bin/bash -e -u -o pipefail -c '
/usr/bin/gmake -s -C libre2 clean
/usr/bin/gmake -s -C libre2 CXX="/usr/lib64/ccache/gcc -O2 -fno-strict-aliasing -fwrapv -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -fPIC" CXXFLAGS="-Wall -Wno-uninitialized -O3 -g -pthread -fPIC" obj/libre2.a obj/so/libre2.so
cp libre2/obj/libre2.a libre2_c_stubs.a
cp libre2/obj/so/libre2.so dllre2_c_stubs.so
')
Running: (cd _build/default && /home/bogdan2412/.opam/4.03.0/bin/ocamldep.opt -modules -impl src/re2_c/re2_c.ml-gen > /tmp/jbuildde2898.output)
Running: (cd _build/default && /home/bogdan2412/.opam/4.03.0/bin/ocamlc.opt -w -49 -w -40 -g -bin-annot -no-alias-deps -I src/re2_c -o src/re2_c/re2_c.cmo -c -impl src/re2_c/re2_c.ml-gen)
Running: (cd _build/default && /home/bogdan2412/.opam/4.03.0/bin/ocamlopt.opt -w -49 -w -40 -g -intf-suffix .ml-gen -no-alias-deps -I src -o src/re2.cmx -c -impl src/re2.ml-gen)
Running: (cd _build/default && /home/bogdan2412/.opam/4.03.0/bin/ocamlopt.opt -w -49 -w -40 -g -intf-suffix .ml-gen -no-alias-deps -I src/re2_c -o src/re2_c/re2_c.cmx -c -impl src/re2_c/re2_c.ml-gen)
Running: (cd _build/default && /home/bogdan2412/.opam/4.03.0/bin/ocamlc.opt -w -40 -g -a -o src/re2_c/re2_c.cma -dllib -lre2_c_stubs -cclib -lre2_c_stubs src/re2_c/re2_c.cmo)
Running: (cd _build/default && /home/bogdan2412/.opam/4.03.0/bin/ocamlopt.opt -w -40 -g -a -o src/re2_c/re2_c.cmxa -cclib -lre2_c_stubs src/re2_c/re2_c.cmx)
Running: (cd _build/default && /home/bogdan2412/.opam/4.03.0/bin/ocamlopt.opt -w -40 -g -shared -linkall -I src/re2_c -o src/re2_c/re2_c.cmxs src/re2_c/re2_c.cmxa)
/usr/bin/ld: cannot find -lre2_c_stubs
collect2: error: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking
Command exited with code 2: (cd _build/default && /home/bogdan2412/.opam/4.03.0/bin/ocamlopt.opt -w -40 -g -shared -linkall -I src/re2_c -o src/re2_c/re2_c.cmxs src/re2_c/re2_c.cmxa)
ghost commented 7 years ago

I think that this is fixed by4c346e5ffbfa3e58ab52214aba01a75770632dfa, can you try again?

bogdan2412 commented 7 years ago

It didn't fix it unfortunately. I should mention that this was on a Fedora 25 install and the default parallelism under which I see this failing is -j4.

ghost commented 7 years ago

Ok, there might a dependency missing when building the cmxs, looking into it

ghost commented 7 years ago

I believe this is fixed now

bogdan2412 commented 7 years ago

Agree, thanks.