lau / calendar

date-time and time zone handling in Elixir
MIT License
466 stars 35 forks source link

Error loading function 'Elixir.Calendar.ISO' #57

Closed denegny closed 5 years ago

denegny commented 5 years ago

system


Erlang/OTP 22 [erts-10.4.1] [source] [smp:1:1] [ds:1:1:10] [async-threads:1] [hipe]

Interactive Elixir (1.8.2) - press Ctrl+C to exit (type h() ENTER for help)


> error
```elixir
module Calendar.ISO is not available

output


Compiling lib/phoenix/router/console_formatter.ex (it's taking more than 15s)

03:56:03.153 [error] Loading of /home/art/.asdf/installs/elixir/1.8.2/bin/../lib/elixir/ebin/Elixir.Calendar.ISO.beam failed: :badfile

03:56:03.153 [error] beam/beam_load.c(2314): Error loading function 'Elixir.Calendar.ISO':from_unix/2: op i_plus q x p x: no specific operation found

Compiling lib/phoenix/token.ex (it's taking more than 15s) Compiling lib/phoenix/template/exs_engine.ex (it's taking more than 15s) Compiling lib/phoenix/controller.ex (it's taking more than 15s) Compiling lib/mix/tasks/phx.gen.schema.ex (it's taking more than 15s) Compiling lib/phoenix/channel.ex (it's taking more than 15s)

03:56:13.007 [error] Loading of /home/art/.asdf/installs/elixir/1.8.2/bin/../lib/elixir/ebin/Elixir.Calendar.ISO.beam failed: :badfile

03:56:13.008 [error] beam/beam_load.c(2314): Error loading function 'Elixir.Calendar.ISO':from_unix/2: op i_plus q x p x: no specific operation found

== Compilation error in file lib/mix/phoenix/schema.ex == ** (UndefinedFunctionError) function Calendar.ISO.parse_microsecond/1 is undefined (module Calendar.ISO is not available) (elixir) Calendar.ISO.parse_microsecond("") (elixir) lib/calendar/naive_datetime.ex:578: NaiveDateTime.raw_from_iso8601/2 (elixir) lib/calendar/naive_datetime.ex:609: NaiveDateTime.from_iso8601!/2 (elixir) expanding macro: Kernel.sigil_N/2 lib/mix/phoenix/schema.ex:216: Mix.Phoenix.Schema.type_to_default/3 could not compile dependency :phoenix, "mix compile" failed. You can recompile this dependency with "mix deps.compile phoenix", update it with "mix deps.update phoenix" or clean it with "mix deps.clean phoenix"

lau commented 5 years ago

Hi. I believe this is not directly related to this calendar library. Rather it is about Elixir itself. The Calendar part of the Elixir standard library.

This library and the standard library "share" the Calendar namespace because when this library was released there was no Calendar module in the Elixir standard library.

eksperimental commented 5 years ago

Are you running it on a 32 or 64bit architecture?

denegny commented 5 years ago

Are you running it on a 32 or 64bit architecture?

Im use 32bit BEAM, some error

eksperimental commented 5 years ago

I have the feeling that is iy related to OTP 22 ON 32BITS have a look at my report in he phoebix framework https://github.com/phoenixframework/phoenix/issues/3478 Where José mentions he had seen reports on other 32bit architecture platforms

samof76 commented 4 years ago

Looks like i have the same issue on an atom processor machine? Any ways to work around this?

eksperimental commented 4 years ago

Looks like i have the same issue on an atom processor machine? Any ways to work around this?

@samof76 erlang 22.1.3 with elixir 1.9.0 doesn't give me that issue anymore

denegny commented 4 years ago

@lau this problem was solved with OTP22 https://github.com/phoenixframework/phoenix/issues/3478