elixir-lang/elixir

Test failing in elixir when building from source

Closed this issue · 3 comments

Elixir and Erlang/OTP versions

elixir: v1.14.01
erlang: OTP-25.3.2.7

Operating system

macOS 15.2

Current behavior

I'm following following steps:

  • built Erlang from source for version OTP-25.3.2.7. Followed steps in the README.md. link
  • pointed asdf to the newer built source.
  • make clean test which leads to eventually make test_elixir running leads to below error
  1) test Unix cmd/3 with absolute and relative paths (SystemTest)
     test/elixir/system_test.exs:178
     match (=) failed
     code:  assert {"hello\n", 0} = System.cmd(Path.join(File.cwd!(), @echo), ["hello"], arg0: "echo")
     left:  {"hello\n", 0}
     right: {"", 137}
     stacktrace:
       test/elixir/system_test.exs:191: anonymous fn/0 in SystemTest."test Unix cmd/3 with absolute and relative paths"/1
       (elixir 1.14.0) lib/file.ex:1607: File.cd!/2
       test/elixir/system_test.exs:183: (test)

...................................................................................................................................................................................................................................................................................................................
18:17:55.167 [error] beam/beam_load.c(180): Error loading module 'Elixir.Io':
  module name in object code is 'Elixir.IO'



18:17:55.167 [error] Loading of /Users/pranavdubey/wp/sources/elixir/bin/../lib/elixir/ebin/Elixir.Io.beam failed: :badfile

...............................................................................................................................................................................................................................
Finished in 11.7 seconds (5.2s on load, 2.9s async, 3.5s sync)
1887 doctests, 4118 tests, 1 failure, 13 excluded

I even tried to rely not he default Erlang installation which was done via binaries and facing the same issue.

Expected behavior

The tests should succeed.

Tests are passing on CI and locally, so I believe you have missing dependencies in your system or something locally. In particular, this test relies on the echo executable. Please make sure it is working properly on your machine, for example, by calling echo hello-world in your terminal.

> echo hello-world
hello-world

This actually runs fine. I'll give it a retry.

Closing this! If the issue persists, please let us know.