Created attachment 646896 [details] build log Elixir fails to merge for me /usr/bin/install: cannot stat 'lib/eex/ebin/*': No such file or directory /usr/bin/install: cannot stat 'lib/ex_unit/ebin/*': No such file or directory /usr/bin/install: cannot stat 'lib/iex/ebin/*': No such file or directory /usr/bin/install: cannot stat 'lib/logger/ebin/*': No such file or directory /usr/bin/install: cannot stat 'lib/mix/ebin/*': No such file or directory make: *** [Makefile:117: install] Error 1
Created attachment 646996 [details] system info emerge --info
'install' phase looks quite a different from by system. I suspect it's a result of non-bash shell: > sh mksh 57-r2 elixir might need to be adapted to it (or force SHELL=/bin/bash). Will set up a chroot with mksh locally and experiment.
Switched my shell to bash as Sergei (slyfox) suggested on IRC. Elixir merged successfully.
The problem is at least in the shell wrappers that run elixir. This is suppsoed to run a compiler for a while: """ sf /var/tmp/portage/dev-lang/elixir-1.10.3/work/elixir-1.10.3 # time bin/elixirc --verbose --ignore-module-conflict lib/elixir/unicode/unicode.ex -o lib/elixir/ebin real 0m0,008s user 0m0,004s sys 0m0,005s """ Instead it returns instantly and does nothing.
Going deeper: compare mksh and bash environments: """ sf /var/tmp/portage/dev-lang/elixir-1.10.3/work/elixir-1.10.3 # time mksh -x bin/elixirc --verbose --ignore-module-conflict lib/elixir/unicode/unicode.ex -o lib/elixir/ebin + mksh -x bin/elixirc --verbose --ignore-module-conflict lib/elixir/unicode/unicode.ex -o lib/elixir/ebin + set -e + '[' 5 -eq 0 ']' + '[' --verbose '=' --help ']' + '[' --verbose '=' -h ']' + readlink_f bin/elixirc + dirname bin/elixirc + >/dev/null + cd bin + basename bin/elixirc + filename=elixirc + '[' -h elixirc ']' + pwd -P + echo /var/tmp/portage/dev-lang/elixir-1.10.3/work/elixir-1.10.3/bin/elixirc + SELF=/var/tmp/portage/dev-lang/elixir-1.10.3/work/elixir-1.10.3/bin/elixirc + dirname /var/tmp/portage/dev-lang/elixir-1.10.3/work/elixir-1.10.3/bin/elixirc + SCRIPT_PATH=/var/tmp/portage/dev-lang/elixir-1.10.3/work/elixir-1.10.3/bin + /var/tmp/portage/dev-lang/elixir-1.10.3/work/elixir-1.10.3/bin/elixir +elixirc --verbose --ignore-module-conflict lib/elixir/unicode/unicode.ex -o lib/elixir/ebin real 0m0,012s user 0m0,006s sys 0m0,006s """ """ time bash -x bin/elixirc --verbose --ignore-module-conflict lib/elixir/unicode/unicode.ex -o lib/elixir/ebin + set -e + '[' 5 -eq 0 ']' + '[' --verbose = --help ']' + '[' --verbose = -h ']' ++ readlink_f bin/elixirc +++ dirname bin/elixirc ++ cd bin +++ basename bin/elixirc ++ filename=elixirc ++ '[' -h elixirc ']' +++ pwd -P ++ echo /tmp/portage/dev-lang/elixir-1.10.3/work/elixir-1.10.3/bin/elixirc + SELF=/tmp/portage/dev-lang/elixir-1.10.3/work/elixir-1.10.3/bin/elixirc ++ dirname /tmp/portage/dev-lang/elixir-1.10.3/work/elixir-1.10.3/bin/elixirc + SCRIPT_PATH=/tmp/portage/dev-lang/elixir-1.10.3/work/elixir-1.10.3/bin + exec /tmp/portage/dev-lang/elixir-1.10.3/work/elixir-1.10.3/bin/elixir +elixirc --verbose --ignore-module-conflict lib/elixir/unicode/unicode.ex -o lib/elixir/ebin Compiling /tmp/portage/dev-lang/elixir-1.10.3/work/elixir-1.10.3/lib/elixir/unicode/unicode.ex (it's taking more than 15s) real 0m21,590s user 0m20,916s sys 0m2,010s """
I found the reason why, it lies in bin/elixir. `erl` (from Erlang) is overridden by a shell function: - `exec erl` seems interpreted by bash as "launch the executable erl" - `exec erl` seems interpreted by mksh as "launch the erl command, which resolves to the erl function" I messaged the mksh IRC channel about it, it seems like both are misbehaving according to POSIX: "If command is found, but it is not an executable utility, the exit status shall be 126."
(In reply to Haelwenn Monnier from comment #6) > I found the reason why, it lies in bin/elixir. > > `erl` (from Erlang) is overridden by a shell function: > - `exec erl` seems interpreted by bash as "launch the executable erl" > - `exec erl` seems interpreted by mksh as "launch the erl command, which > resolves to the erl function" > > I messaged the mksh IRC channel about it, it seems like both are misbehaving > according to POSIX: "If command is found, but it is not an executable > utility, the exit status shall be 126." I submitted https://github.com/elixir-lang/elixir/pull/10557 as a fix for it, should I do a PR/git-send-email for the ebuild when it is accepted from elixir?
Thanks for tracking it down and fixing upstream! I'll pull the patch in once basic test passes. Next time feel free to send a patch any way you see most convenient for you.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b417be714a45559a9c29eec3c13c600cedff0f2 commit 8b417be714a45559a9c29eec3c13c600cedff0f2 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-12-13 12:52:32 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-12-13 13:00:44 +0000 dev-lang/elixir: backport mksh fix Reported-by: Maciej Barć Fixed-by: Haelwenn Monnier Closes: https://bugs.gentoo.org/729964 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> dev-lang/elixir/elixir-1.11.2.ebuild | 1 + dev-lang/elixir/files/elixir-1.11.2-mksh.patch | 81 ++++++++++++++++++++++++++ 2 files changed, 82 insertions(+)