terenceponce

terenceponce

Having trouble compiling Telemetry 0.4.0 under Elixir Alpine

I’m using Phoenix 1.4.8 and I’m trying to use Distillery to compile the app inside Alpine (elixir:1.8.2-alpine). Do I need to install some library to make the compilation work? I’m using Gitlab CI to compile the app:

distillery:
  stage: build
  image: elixir:1.8.2-alpine
  cache:
    paths:
      - _build
      - deps
  before_script:
    - apk --no-cache add git
    - mix local.rebar --force
    - mix local.hex --force
    - mix deps.get
    - mix deps.compile
  script:
    - MIX_ENV=prod mix release --verbose
$ mix deps.compile
==> inflex
Compiling 6 files (.ex)
Generated inflex app
==> base64url (compile)
Compiled src/base64url.erl
==> gettext
Compiling 1 file (.erl)
Compiling 20 files (.ex)
==> jose
Compiling 90 files (.erl)
Compiling 8 files (.ex)
warning: function Poison.EncodeError.exception/1 is undefined (module Poison.EncodeError is not available)
  lib/jose/poison/lexical_encoder.ex:8

Generated jose app
===> Compiling ranch
===> Compiling telemetry
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
===> When submitting a bug report, please include the output of `rebar3 report "your command"`
==> rarex
** (Mix) Could not compile dependency :telemetry, "/root/.mix/rebar3 bare compile --paths "/builds/rarex/core/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile telemetry", update it with "mix deps.update telemetry" or clean it with "mix deps.clean telemetry"

Most Liked

hlalvesbr

hlalvesbr

I had the same problem. It’s not telemetry, it’s old cached files. Delete “_build” and “deps” folders and run “mix deps.get” and “mix deps.compile”. Everything ok now.

mhs

mhs

I’m seeing this (occasional :telemetry compile fails) too. I’m not sure how to repro it as it seems to happen randomly once and awhile. I’ve seen it on my local OSX machine as well as on a circleci/elixir:1.9.1-node container.

The relevent part from my CircleCI config looks like this:

elixir_tests:
    docker:
      - image: circleci/elixir:1.9.1-node
    working_directory: ~/repo/api/my_app
    steps:
      - checkout:
          path: ~/repo

      - restore_cache:
          keys:
            - ex-deps-{{ checksum "mix.exs" }}-{{ checksum "mix.lock" }}
            - ex-deps-

      - run:
          name: Install hex and rebar3
          command: mix local.hex --force && mix local.rebar --force

      - run:
          name: App Dependencies
          command: MIX_ENV=test mix do deps.get --only test, deps.compile, compile

      - save_cache:
          paths:
            - deps
          key: ex-deps-{{ checksum "mix.exs" }}-{{ checksum "mix.lock" }}

      - run:
          name: ExUnit Tests
          command: mix test --cover

      - store_artifacts:
          path: cover
          destination: cover

mix deps.clean telemetry fixes it up if I SSH in and try to interactively manipulate the build.

NobbZ

NobbZ

That might actually be an issue, mix local.rebar installs versions it is known to work with, you should not use a different rebar when compiling mix projects.

Where Next?

Popular in Questions Top

_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
Kurisu
For example for a current url like http://localhost:4000/cosmetic/products?_utf8=✓&query=perfume&page=2, I would like to get: ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
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
yawaramin
In the Dialyzer docs ( dialyzer — OTP 29.0.2 (dialyzer 6.0.1) ), there is a way to turn off a specific warning for a function: -dialyzer...
New

Other popular topics Top

malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
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
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
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
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New

We're in Beta

About us Mission Statement