As per the following bug report, sometimes erts/start_scripts will fail to compile because of a Makefile ordering issue. Apply the upstream patches to fix this. https://bugs.erlang.org/browse/ERL-241
stdenv.system
system