From a33d8b3d5fc38deabd4823eb3aabc0fddca95e33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 28 May 2015 12:21:16 +0200 Subject: Makefile: Eliminate crash when building with native libs When building with --enable-native-libs and allowing 'make' to use multiple threads, the compiler would crash because the erl_syntax module was missing. Here is the recipe for making it crash on my computer: git clean -dxfq MAKEFLAGS='-j10' ./otp_build setup -a --enable-native-libs What would happen is that when merl_transform was used to compile itself, it would call 'merl' which in turn would call erl_syntax and erl_syntax_lib. Since those modules were not listed as dependencies, there was no guarantee that they had actually been compiled. In fact, erl_syntax is a large module so a compilation it with +native would usually not finish before it was needed for compiling merl_transform. To ensure that the erl_syntax and erl_syntax_lib modules are available when needed, they must be explicitly listed as dependencies. --- lib/syntax_tools/src/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/syntax_tools/src/Makefile b/lib/syntax_tools/src/Makefile index 2c565cee7f..2e91adf8af 100644 --- a/lib/syntax_tools/src/Makefile +++ b/lib/syntax_tools/src/Makefile @@ -75,7 +75,8 @@ $(EBIN)/%.$(EMULATOR):%.erl # special rules and dependencies to apply the transform to itself $(EBIN)/merl_transform.beam: $(EBIN)/merl.beam ./merl_transform.beam \ - ../include/merl.hrl + ../include/merl.hrl \ + $(EBIN)/erl_syntax.beam $(EBIN)/erl_syntax_lib.beam ./merl_transform.beam: ./merl_transform.erl $(EBIN)/merl.beam \ ../include/merl.hrl $(V_ERLC) -DMERL_NO_TRANSFORM $(ERL_COMPILE_FLAGS) -o ./ $< -- cgit v1.2.3 From b41830f01e38273a3fd39fd05b87cd3345d75d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 28 May 2015 15:05:24 +0200 Subject: syntax_tools app file: Update dependencies The compiler application is now a dependency. --- lib/syntax_tools/src/syntax_tools.app.src | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/syntax_tools/src/syntax_tools.app.src b/lib/syntax_tools/src/syntax_tools.app.src index e207901def..dd4ac46055 100644 --- a/lib/syntax_tools/src/syntax_tools.app.src +++ b/lib/syntax_tools/src/syntax_tools.app.src @@ -17,4 +17,5 @@ {registered,[]}, {applications, [stdlib]}, {env, []}, - {runtime_dependencies, ["stdlib-2.5","kernel-3.0","erts-6.0"]}]}. + {runtime_dependencies, + ["compiler-6.0","erts-6.0","kernel-3.0","stdlib-2.5"]}]}. -- cgit v1.2.3