Skip to content

Cross platform elixir releases #16

@Arp-G

Description

@Arp-G

The release for csv2sql is currently built on ubuntu 20.4, when a user attempted to use it on ubuntu 18.0 it gave an error like

../csv2sqk_web/erts-12.0.3/bin/beam.smp: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory`

It seems the shared library libtinfo.so.6 might not be available on ubuntu-18.0.

More insights

Elixir release won’t just depend on your OS flavor. Instead, an Elixir release depends on your processor architecture and C library version (glibc package). This is because there are still system dependencies in place even though Erlang bytecode is platform-independent.

Ideally, we want to support different operating systems like Linux, windows, and mac and the release should run independently of the user's processor architecture.

Till now I have found two ways to achieve this:

  1. Use docker to build the release for different platforms and operating systems - We can have a docker setup that builds the release for all the different operating systems that we want to target, however, I am not sure if this can bypass the Target architecture limitation, also I am not sure how it will work out for windows-based docker containers.

  2. The second approach is using something like buritto which uses bakeware

Some Helpful References I have found:

Mix release docs about release requirements
This discussion on elixirforum
This blog

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions