Closed ewildgoose closed 1 year ago
Actually, I rolled back to the previous version I was using (1.20.0) and see the same error.
I suspect that the actual change is that I have upgraded to Erlang OTP25, elixir 1.14.0 and possibly updated rebar. Unclear which is causing this issue?
OK, sorry, this is looking like an issue on my system. Mac OSX M1, and it seems like homebrew might have put a mixed arch version of erlang/elixir into place.
Running with DEBUG=1 I see:
DEBUG=1 mix deps.compile erlexec
===> Compile (apps)
===> Expanded command sequence to be run: []
===> Running provider: do
===> Expanded command sequence to be run: [app_discovery,{bare,compile}]
===> Running provider: app_discovery
===> Found top-level apps: [erlexec]
using config: [{src_dirs,["src"]},{lib_dirs,["apps/*","lib/*","."]}]
===> Compile (apps)
===> Not adding provider pc compile from module pc_prv_compile because it already exists from module pc_prv_compile
===> Not adding provider pc clean from module pc_prv_clean because it already exists from module pc_prv_clean
===> Running provider: {bare,compile}
===> Compile (untagged)
===> Running hooks for compile in app erlexec (/Users/edward/Documents/src/elixir/tpb_sys/deps/erlexec) with configuration:
===> {provider_hooks, [{pre, [{pc,compile}]}]}.
===> Running provider: {pc,compile}
===> Running hooks for {pc,compile} with configuration:
===> {provider_hooks, []}.
===> {pre_hooks, []}.
===> Linking /Users/edward/Documents/src/elixir/tpb_sys/deps/erlexec/priv/aarch64-apple-darwin21.5.0/exec-port
===> sh(g++ c_src/ei++.o c_src/exec.o c_src/exec_impl.o -L"/opt/homebrew/Cellar/erlang/25.0.4/lib/erlang/lib/erl_interface-5.3/lib" -lei -o /Users/edward/Documents/src/elixir/tpb_sys/deps/erlexec/priv/aarch64-apple-darwin21.5.0/exec-port)
failed with return code 1 and the following output:
ld: warning: ignoring file /opt/homebrew/Cellar/erlang/25.0.4/lib/erlang/lib/erl_interface-5.3/lib/libei.a, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
I guess if anyone has solutions for this then I'm interested, but closing this as it's clearly not an erlexec issue
Could not reproduce it on the Mac, and the CI/CD builds fine on MacOS as well.
Thanks for investigating further. I can confirm that it was a mixed amd64/arm build issue.
For the benefit of anyone else who arrives here through google: It seems as though homebrew and visual studio have gradually migrated from running under rosetta to being native. At various points things seem to be tending to switch to native, but upgrades seem to sometimes leave you on an old channel. etc. Seems like you can get further problems running through shells started from a native app as the shell is then running under rosetta emulation, so wrong builds could get pulled in, etc, etc
In my case I must have had something switch either to native, or back to amd64. I resolved this with a simple:
brew uninstall erlang elixir; brew install erlang elixir
And checked that it referenced native arm builds being pulled in. All is now well
Sorry for the noise
Hi, I've bumped to version 1.21.0, inside an elixir project. Trying to compile with
mix deps.compile erlexec
leads to error messages:However, I don't see that the "exec-port" directory has been created:
I concede I'm a bit lost in the flow of what should be happening to know how to give better debug info. I suspect a pathing issue?