linusdm

linusdm

Adding `ex_cldr_collation` fails in docker release (debian runner image)

I’m trying to add ex_cldr_collation as a dependency to a standard phoenix application. I’m having an issue with the docker build.

I understood that the libicu-dev package is required for building, which got me one step further (at first compilation failed, but now the application at least compiles).

When the image starts the phoenix application, I get this error:

  crasher:
    initial call: application_master:init/4
    pid: <0.2044.0>
    registered_name: []
    exception exit: {{shutdown,
                      {failed_to_start_child,kernel_safe_sup,
                       {on_load_function_failed,'Elixir.Cldr.Collation',
                        {{badmatch,
                          {error,
                           {load_failed,
                            "Failed to load NIF library: '/app/lib/ex_cldr_collation-0.7.0/priv/ucol.so: undefined symbol: ucol_strcollIter_67'"}}},
                         [{'Elixir.Cldr.Collation',init,0,
                           [{file,"lib/cldr_collation.ex"},{line,20}]},
                          {init,'-run_on_load_handlers/2-fun-0-',1,[]}]}}}},
                     {kernel,start,[normal,[]]}}
      in function  application_master:init/4 (application_master.erl, line 142)
  ...

As far as I understand, the runner image also has to have an icu dependency although that’s not mentioned explicitly in the documentation of ex_cldr_collation. But I’m failing to understand which packages exactly would provide these undefined symbols (ucol_strcollIter_67). I’ve tried adding libicu-dev, just like in the builder image, but that didn’t work. The package libicu67 also didn’t resolve the problem.

There was some recent activity on the issue tracker of ex_cldr_collation, but that seems to be more related to ubuntu and alpine images. Moreover, there is no mention of packages required at runtime in the docs, only a mention of what’s required to build, which confuses me a bit.

Suggestions appreciated!

First Post!

kip

kip

ex_cldr Core Team

@linusdm, sorry for you not having much fun with this. The documentation definitely needs improvement in this area - my lack of knowledge of the various Linux denominations if the primary fault. I hope others more experienced than I am (probably everyone!) can chime in.

My reading suggests that installing the package icu should bring in the right versions of libicu-dev and libicu for whatever version of Debian you are on.

BTW, I’ve only recently become aware that while Ubuntu and MacOS come with libicu installed (the runtime requirement), Debian and Alpine do not. Which is why runtime requirements haven’t been mentioned - I will fix that now I have some more knowledge (albeit not enough!).

Please do open an issue so we can get to the bottom of this ASAP.

Where Next?

Popular in Questions Top

ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
Phillipp
Hey, I have a NanoPi-M3 and try to install Elixir on their Ubuntu image. I followed the Raspberry Pi installation instructions from the ...
New
Codball
Mix format works fine if run from the cmd. I’ve followed this to facilitate the implementation into VSC which involves downloading an ext...
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

We're in Beta

About us Mission Statement