ocaml / dune

A composable build system for OCaml.
https://dune.build/
MIT License
1.64k stars 409 forks source link

building main.exe with bytecode-only fails #2777

Closed olafhering closed 5 years ago

olafhering commented 5 years ago

While trying to build the master branch, instead of 1.11, with a bytecode-only configuration fails:

[   39s] + /usr/bin/mkdir /home/abuild/rpmbuild/BUILDROOT/ocaml-dune-2.0-60.obc_406.1.x86_64
[   39s] + cd ocaml-dune-2.0
[   39s] ++ ocamlc -where
[   39s] + ocaml configure.ml --libdir=/usr/lib64/ocaml
[   39s] + /usr/bin/make -O -j8
[   73s] ocaml bootstrap.ml
[   73s] cp src/ocaml-syntax-shims/pp.real.ml src/ocaml-syntax-shims/pp.ml
[   73s] cp src/ocaml-syntax-shims/shims.406.ml src/ocaml-syntax-shims/shims.ml
[   73s] '/usr/bin/ocamllex' -q src/ocaml-syntax-shims/let_trail.mll
[   73s] '/usr/bin/ocamldep' -modules src/ocaml-syntax-shims/let_trail.mli src/ocaml-syntax-shims/let_trail.ml src/ocaml-syntax-shims/pp.ml src/ocaml-syntax-shims/shims.ml > boot-depends.txt
[   73s] '/usr/bin/ocamlc' -g -w -40 -o boot-pp.exe -I +compiler-libs ocamlcommon.cma boot_pp.ml
[   73s] '/usr/bin/ocamllex' -q src/dune/findlib/meta_lexer.mll
[   73s] '/usr/bin/ocamllex' -q src/dune/dune_lexer.mll
[   73s] '/usr/bin/ocamllex' -q src/dune_lang/versioned_file_first_line.mll
[   73s] '/usr/bin/ocamllex' -q src/dune_lang/lexer.mll
[   74s] '/usr/bin/ocamldep' -modules -pp './boot-pp.exe -dump-ast' src/dune/action.mli src/dune/action.ml src/dune/action_ast.ml src/dune/action_dune_lang.mli src/dune/action_dune_lang.ml src/dune/action_exec.mli src/dune/action_exec.ml src/dune/action_intf.ml src/dune/action_mapper.mli src/dune/action_mapper.ml src/dune/action_to_sh.mli src/dune/action_to_sh.boot.ml src/dune/action_unexpanded.mli src/dune/action_unexpanded.ml src/dune/alias.mli src/dune/alias.ml src/dune/artifact_substitution.mli src/dune/artifact_substitution.ml src/dune/artifacts.mli src/dune/artifacts.ml src/dune/binary_kind.mli src/dune/binary_kind.ml src/dune/bindings.mli src/dune/bindings.ml src/dune/blang.mli src/dune/blang.ml src/dune/bootstrap.mli src/dune/bootstrap.boot.ml src/dune/bootstrap_info.mli src/dune/bootstrap_info.ml src/dune/build.mli src/dune/build.ml otherlibs/build-info/src/build_info.mli otherlibs/build-info/src/build_info.ml otherlibs/build-info/src/build_info_data.mli otherlibs/build-info/src/build_info_data.boot.ml src/dune/build_system.mli src/dune/build_system.ml src/dune/cached_digest.mli src/dune/cached_digest.ml src/dune/case_lang.mli src/dune/case_lang.ml src/dune/check_rules.mli src/dune/check_rules.ml src/dune/cinaps.mli src/dune/cinaps.boot.ml src/dune/clflags.mli src/dune/clflags.ml src/dune/cm_files.mli src/dune/cm_files.ml src/dune/cm_kind.mli src/dune/cm_kind.ml src/dune/colors.mli src/dune/colors.ml src/dune/command.mli src/dune/command.ml src/dune/compilation_context.mli src/dune/compilation_context.ml src/dune/config.mli src/dune/config.ml src/dune/context.mli src/dune/context.ml src/dune/coq_module.mli src/dune/coq_module.ml src/dune/coq_rules.mli src/dune/coq_rules.boot.ml src/dune/dep.mli src/dune/dep.ml src/dune/dep_conf.mli src/dune/dep_conf.ml src/dune/dep_graph.mli src/dune/dep_graph.ml src/dune/dep_path.mli src/dune/dep_path.ml src/dune/dep_rules.mli src/dune/dep_rules.ml src/dune/dialect.mli src/dune/dialect.ml src/dune/diff.mli src/dune/diff.ml src/dune/dir_contents.mli src/dune/dir_contents.ml src/dune/dir_set.mli src/dune/dir_set.ml src/dune/dir_status.mli src/dune/dir_status.ml src/dune/dir_with_dune.mli src/dune/dir_with_dune.ml src/dune/dpath.mli src/dune/dpath.ml vendor/boot/dune_action_plugin.ml src/dune/dune_env.mli src/dune/dune_env.ml src/dune/dune_file.mli src/dune/dune_file.ml vendor/boot/dune_glob.ml src/dune/dune_init.mli src/dune/dune_init.ml src/dune/dune_lexer.mli src/dune/dune_lexer.ml src/dune/dune_load.mli src/dune/dune_load.ml vendor/boot/dune_manager.ml vendor/boot/dune_memory.ml src/dune/dune_package.mli src/dune/dune_package.ml src/dune/dune_project.mli src/dune/dune_project.ml vendor/boot/dune_re.ml src/dune/dynlink_supported.mli src/dune/dynlink_supported.ml src/dune/env_node.mli src/dune/env_node.ml src/dune/exe.mli src/dune/exe.ml src/dune/exe_rules.mli src/dune/exe_rules.ml src/dune/expander.mli src/dune/expander.ml src/dune/file_binding.mli src/dune/file_binding.ml src/dune/file_selector.mli src/dune/file_selector.ml src/dune/file_tree.mli src/dune/file_tree.ml src/dune/findlib/findlib.mli src/dune/findlib/findlib.ml src/dune/foreign.mli src/dune/foreign.ml src/dune/foreign_rules.mli src/dune/foreign_rules.ml src/dune/foreign_sources.mli src/dune/foreign_sources.ml src/dune/format_config.mli src/dune/format_config.ml src/dune/format_dune_lang.mli src/dune/format_dune_lang.ml src/dune/format_rules.mli src/dune/format_rules.boot.ml src/dune/gen_meta.mli src/dune/gen_meta.ml src/dune/gen_rules.mli src/dune/gen_rules.ml src/dune/glob.mli src/dune/glob.ml src/dune/glob_lexer.boot.ml src/dune/hooks.mli src/dune/hooks.ml src/dune/import.ml src/dune/inline_tests.mli src/dune/inline_tests.boot.ml src/dune/install.mli src/dune/install.ml src/dune/install_rules.mli src/dune/install_rules.ml src/dune/js_of_ocaml_rules.mli src/dune/js_of_ocaml_rules.boot.ml src/dune/lib.mli src/dune/lib.ml src/dune/lib_archives.mli src/dune/lib_archives.ml src/dune/lib_config.mli src/dune/lib_config.ml src/dune/lib_dep.mli src/dune/lib_dep.ml src/dune/lib_deps_info.mli src/dune/lib_deps_info.ml src/dune/lib_file_deps.mli src/dune/lib_file_deps.ml src/dune/lib_info.mli src/dune/lib_info.ml src/dune/lib_kind.mli src/dune/lib_kind.ml src/dune/lib_name.mli src/dune/lib_name.ml src/dune/lib_rules.mli src/dune/lib_rules.ml src/dune/link_time_code_gen.mli src/dune/link_time_code_gen.ml src/dune/main.mli src/dune/main.ml src/dune/menhir.mli src/dune/menhir.boot.ml src/dune/merlin.mli src/dune/merlin.ml src/dune/findlib/meta.mli src/dune/findlib/meta.ml src/dune/findlib/meta_lexer.mli src/dune/findlib/meta_lexer.ml src/dune/ml_kind.mli src/dune/ml_kind.ml src/dune/mode.mli src/dune/mode.ml src/dune/module.mli src/dune/module.ml src/dune/module_compilation.mli src/dune/module_compilation.ml src/dune/module_name.mli src/dune/module_name.ml src/dune/modules.mli src/dune/modules.ml src/dune/modules_field_evaluator.mli src/dune/modules_field_evaluator.ml src/dune/obj_dir.mli src/dune/obj_dir.ml src/dune/ocaml_flags.mli src/dune/ocaml_flags.ml src/dune/ocaml_stdlib.mli src/dune/ocaml_stdlib.ml src/dune/ocaml_version.mli src/dune/ocaml_version.ml src/dune/ocamldep.mli src/dune/ocamldep.ml src/dune/ocamlobjinfo.mli src/dune/ocamlobjinfo.boot.ml src/dune/odoc.mli src/dune/odoc.boot.ml vendor/boot/opamBaseParser.ml vendor/boot/opamLexer.ml vendor/boot/opamParserTypes.ml vendor/boot/opamPrinter.ml src/dune/opam_create.mli src/dune/opam_create.boot.ml src/dune/opam_file.mli src/dune/opam_file.ml src/dune/ordered_set_lang.mli src/dune/ordered_set_lang.ml src/dune/ordered_set_lang_intf.ml src/dune/package.mli src/dune/package.ml src/dune/packages.mli src/dune/packages.ml src/dune/per_item.mli src/dune/per_item.ml src/dune/persistent.mli src/dune/persistent.ml src/dune/pform.mli src/dune/pform.ml src/dune/predicate.mli src/dune/predicate.ml src/dune/predicate_lang.mli src/dune/predicate_lang.ml src/dune/preprocessing.mli src/dune/preprocessing.ml src/dune/print_diff.mli src/dune/print_diff.ml src/dune/process.mli src/dune/process.ml src/dune/profile.mli src/dune/profile.ml src/dune/promotion.mli src/dune/promotion.ml src/dune/report_error.mli src/dune/report_error.ml src/dune/response_file.mli src/dune/response_file.ml src/dune/rule.mli src/dune/rule.ml src/dune/rules.mli src/dune/rules.ml src/dune/sandbox_config.mli src/dune/sandbox_config.ml src/dune/sandbox_mode.mli src/dune/sandbox_mode.ml src/dune/scheduler.mli src/dune/scheduler.ml src/dune/scheme.mli src/dune/scheme.ml src/dune/scope.mli src/dune/scope.ml src/dune/setup.mli src/dune/setup.boot.ml src/dune/simple_rules.mli src/dune/simple_rules.ml src/dune/spawn.mli src/dune/spawn.ml src/dune/stanza.mli src/dune/stanza.ml src/dune/static_deps.mli src/dune/static_deps.ml src/dune/stats.mli src/dune/stats.boot.ml src/dune/string_with_vars.mli src/dune/string_with_vars.ml src/dune/sub_dirs.mli src/dune/sub_dirs.ml src/dune/sub_system.mli src/dune/sub_system.ml src/dune/sub_system_info.mli src/dune/sub_system_info.ml src/dune/sub_system_intf.ml src/dune/sub_system_name.mli src/dune/sub_system_name.ml src/dune/super_context.mli src/dune/super_context.ml src/dune/test_rules.mli src/dune/test_rules.boot.ml src/dune/top_closure.mli src/dune/top_closure.ml src/dune/toplevel.mli src/dune/toplevel.ml src/dune/upgrader.mli src/dune/upgrader.boot.ml src/dune/utils.mli src/dune/utils.ml src/dune/utop.mli src/dune/utop.boot.ml src/dune/value.mli src/dune/value.ml src/dune/variant.mli src/dune/variant.ml src/dune/vcs.mli src/dune/vcs.ml src[   65.052058] serial8250: too much work for irq4
[   74s] /dune/vimpl.mli src/dune/vimpl.ml src/dune/virtual_rules.mli src/dune/virtual_rules.boot.ml src/dune/visibility.mli src/dune/visibility.ml src/dune/watermarks.mli src/dune/watermarks.ml src/dune/workspace.mli src/dune/workspace.ml src/dune/wrapped.mli src/dune/wrapped.ml > boot-depends.txt
[   74s] '/usr/bin/ocamldep' -modules -pp './boot-pp.exe -dump-ast' src/dag/dag.mli src/dag/dag.ml src/dag/dag_intf.ml > boot-depends.txt
[   74s] '/usr/bin/ocamldep' -modules -pp './boot-pp.exe -dump-ast' src/stdune/caml/dune_caml.ml > boot-depends.txt
[   74s] '/usr/bin/ocamldep' -modules -pp './boot-pp.exe -dump-ast' src/dune_lang/dune_lang.ml src/dune_lang/ast.mli src/dune_lang/ast.ml src/dune_lang/atom.mli src/dune_lang/atom.ml src/dune_lang/combinators.ml src/dune_lang/conv.mli src/dune_lang/conv.ml src/dune_lang/cst.mli src/dune_lang/cst.ml src/dune_lang/decoder.mli src/dune_lang/decoder.ml src/dune_lang/encoder.mli src/dune_lang/encoder.ml src/dune_lang/escape.mli src/dune_lang/escape.ml src/dune_lang/jbuild_lexer.boot.ml src/dune_lang/lexer.mli src/dune_lang/lexer.ml src/dune_lang/parser.mli src/dune_lang/parser.ml src/dune_lang/syntax.mli src/dune_lang/syntax.ml src/dune_lang/t.mli src/dune_lang/t.ml src/dune_lang/template.mli src/dune_lang/template.ml src/dune_lang/versioned_file.mli src/dune_lang/versioned_file.ml src/dune_lang/versioned_file_first_line.mli src/dune_lang/versioned_file_first_line.ml > boot-depends.txt
[   74s] '/usr/bin/ocamldep' -modules -pp './boot-pp.exe -dump-ast' src/fiber/fiber.mli src/fiber/fiber.ml > boot-depends.txt
[   74s] '/usr/bin/ocamldep' -modules -pp './boot-pp.exe -dump-ast' vendor/incremental-cycles/src/incremental_cycles.mli vendor/incremental-cycles/src/incremental_cycles.ml vendor/incremental-cycles/src/incremental_cycles_intf.ml > boot-depends.txt
[   74s] '/usr/bin/ocamldep' -modules -pp './boot-pp.exe -dump-ast' src/memo/memo.mli src/memo/memo.ml src/memo/implicit_output.mli src/memo/implicit_output.ml > boot-depends.txt
[   74s] '/usr/bin/ocamldep' -modules -pp './boot-pp.exe -dump-ast' src/ocaml-config/ocaml_config.mli src/ocaml-config/ocaml_config.ml > boot-depends.txt
[   74s] '/usr/bin/ocamldep' -modules -pp './boot-pp.exe -dump-ast' src/stdune/stdune.ml src/stdune/ansi_color.mli src/stdune/ansi_color.ml src/stdune/appendable_list.mli src/stdune/appendable_list.ml src/stdune/array.ml src/stdune/bin.mli src/stdune/bin.ml src/stdune/bool.mli src/stdune/bool.ml src/stdune/bytes.mli src/stdune/bytes.ml src/stdune/char.ml src/stdune/code_error.mli src/stdune/code_error.ml src/stdune/common.ml src/stdune/comparable.mli src/stdune/comparable.ml src/stdune/comparable_intf.ml src/stdune/comparator.mli src/stdune/comparator.ml src/stdune/console.mli src/stdune/console.ml src/stdune/csexp.mli src/stdune/csexp.ml src/stdune/daemonize.mli src/stdune/daemonize.ml src/stdune/digest.mli src/stdune/digest.ml src/stdune/dyn.mli src/stdune/dyn.ml src/stdune/either.mli src/stdune/either.ml src/stdune/env.mli src/stdune/env.ml src/stdune/escape.mli src/stdune/escape.ml src/stdune/exn.mli src/stdune/exn.ml src/stdune/exn_with_backtrace.mli src/stdune/exn_with_backtrace.ml src/stdune/fcntl.mli src/stdune/fcntl.boot.ml src/stdune/fdecl.mli src/stdune/fdecl.ml src/stdune/filename.mli src/stdune/filename.ml src/stdune/float.mli src/stdune/float.ml src/stdune/fmt.mli src/stdune/fmt.ml src/stdune/fn.mli src/stdune/fn.ml src/stdune/hashable.ml src/stdune/hashtbl.mli src/stdune/hashtbl.ml src/stdune/hashtbl_intf.ml src/stdune/id.mli src/stdune/id.ml src/stdune/int.mli src/stdune/int.ml src/stdune/interned.mli src/stdune/interned.ml src/stdune/io.mli src/stdune/io.ml src/stdune/lexbuf.mli src/stdune/lexbuf.ml src/stdune/list.mli src/stdune/list.ml src/stdune/loc.mli src/stdune/loc.ml src/stdune/loc0.ml src/stdune/lock_file.mli src/stdune/lock_file.ml src/stdune/log.mli src/stdune/log.ml src/stdune/map.mli src/stdune/map.ml src/stdune/map_intf.ml src/stdune/monad.mli src/stdune/monad.ml src/stdune/nothing.mli src/stdune/nothing.ml src/stdune/option.mli src/stdune/option.ml src/stdune/or_exn.mli src/stdune/or_exn.ml src/stdune/ordered.mli src/stdune/ordered.ml src/stdune/ordering.mli src/stdune/ordering.ml src/stdune/path.mli src/stdune/path.ml src/stdune/path_intf.ml src/stdune/poly.mli src/stdune/poly.ml src/stdune/pp.mli src/stdune/pp.ml src/stdune/proc.mli src/stdune/proc.ml src/stdune/result.mli src/stdune/result.ml src/stdune/set.mli src/stdune/set.ml src/stdune/set_intf.ml src/stdune/sexp.mli src/stdune/sexp.ml src/stdune/signal.mli src/stdune/signal.ml src/stdune/staged.mli src/stdune/staged.ml src/stdune/string.mli src/stdune/string.ml src/stdune/string_split.mli src/stdune/string_split.ml src/stdune/table.mli src/stdune/table.ml src/stdune/tuple.mli src/stdune/tuple.ml src/stdune/type_eq.mli src/stdune/type_eq.ml src/stdune/unit.mli src/stdune/unit.ml src/stdune/univ_map.mli src/stdune/univ_map.ml src/stdune/user_error.mli src/stdune/user_error.ml src/stdune/user_message.mli src/stdune/user_message.ml src/stdune/user_warning.mli src/stdune/user_warning.ml > boot-depends.txt
[   74s] '/usr/bin/ocamldep' -modules -pp './boot-pp.exe -dump-ast' src/xdg/xdg.mli src/xdg/xdg.ml > boot-depends.txt
[   74s] '/usr/bin/ocamlc' -g -w -40 -o boot.exe -pp './boot-pp.exe -dump-ast' -I +threads -custom unix.cma threads.cma boot.ml
[   91s] ./boot.exe
[   91s] File "bin/dune", line 2, characters 7-11:
[   91s] 2 |  (name main)
[   91s]            ^^^^
[   91s] Error: No rule found for bin/.main.eobjs/native/build_info__Build_info_data.o
[   91s] -> required by bin/.main.eobjs/native/build_info__Build_info_data.o
[   91s] -> required by bin/main.exe
[   91s] -> required by install bin/dune
[   91s] -> required by dune.install
[   91s] make: *** [Makefile:10: default] Error 1
[   91s] error: Bad exit status from /var/tmp/rpm-tmp.qd8rBb (%build)
rgrinberg commented 5 years ago

@snowleopard mind having a look at this one? we have some tests show how to replicate a bytecode only environment. So we should at least be able to make a test case to reproduce this

snowleopard commented 5 years ago

We managed to reproduce, will try to fix soon.