arpan

arpan

Hi everyone, I had built a tool that I distribute using elixir releases however recently my colleague faced an issue while running it

The release for the tool 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`

From what I understand…

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

Also, I read

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.

I 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(I don’t have any experience with this).

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

The tool here is an umbrella application with 2 apps - one a plain elixir app, the other is a phoenix app and there are no NIFs used.

  • Any ideas on which approach seems more viable? Is there any other way to deal with this problem?

  • What targets should I think about supporting if I want to add support for Linux, Mac, and windows?

  • Any help regarding a sample docker file to build releases for different targets would be very helpful.(I am currently just planning to edit this docker file to support building for multiple targets)?

  • Any help on using buritto which uses bakeware?

  • In the future, I want to be able to test the app in Github actions for different targets, any idea on this?

(Side note: I had previously asked this question here but had given up since I did not face any complaints due to this until now.)

Thanks for reading till the end, this forum’s always been a life savior for me :pray:

Showing Posts 1 to 3

cmo

cmo

Burrito doesn’t use bakeware. They’re two similar but completely separate projects. Burrito handles cross compilation where bakeware does not. Burrito docs are great so you shouldn’t need much else to get started there.

You can look at bakeware’s GitHub actions to see how they test multiple OSes.

Recently, Burrito was modified to accept a custom build pipeline, which I use to build releases instead of a single binary. You can see my WIP here.

You might want to build for different operating systems in your CI/CD pipeline.

arpan

arpan OP

Thanks a lot for replying.

Burrito doesn’t use bakeware.

Yup, thanks for clarifying.

look at bakeware’s GitHub actions

This is very useful thanks.

You might want to build for different operating systems in your CI/CD pipeline

I have some confusion regarding this, I tried using burrito and it worked however I still had the error error while loading shared libraries: libtinfo.so.6: cannot open shared object file when running on ubuntu-18.04.

From what I understand buritto helps us to build a release for different environments like Linux, macOS and windows however I still need to build to release for different Linux distributions and versions, for example, I have to build the release for both ubuntu 20.4 and ubuntu 18.04 since they are using different shared libraries like libtinfo.so.6 is not available for ubuntu-18.04.

So, this means I will probably have to write a separate docker script that does a mix release for every Linux distribution and version I want to support like a separate docker file to build release for ubuntu 20.04, ubuntu 18.0, etc.

So buritto only helps me to build releases for macOS or windows from a Linux machine but it does not help if the shared libraries are different.

If the above understanding is correct, then this looks like a difficult task to accomplish since I am not sure how many releases I need to build, and which distributions I need to support.

Do you know of any resources which can help me get started on this?

arpan

arpan OP

UPDATE:

I tried to build the release inside a docker container running Ubuntu 18.0.
After copying the releases to my host machine running Ubuntu 20.04 it still seemed to work fine.

So it looks like a release built on ubuntu 20.04 will fail when to run on ubuntu 18.04 due to the shared library issue however trying the opposite works fine.

— All posts loaded —

Where Next? Top

Trending in Questions Top

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews