zeromq / erlzmq2

Erlang binding for 0MQ (v2)
http://zeromq.org/
MIT License
164 stars 63 forks source link

Problem compiling in Alpine Linux #75

Open cprieto opened 6 years ago

cprieto commented 6 years ago

When trying to compile in Alpine Linux I am getting a compile error.

How to reproduce the issue?

Create an Alpine Linux base image for compilation, use this Dockerfile

FROM alpine:edge
ENV MIX_HOME=/opt/mix PATH=/opt/mix:${PATH}

RUN apk upgrade && apk upgrade \
  && apk --no-cache add git curl build-base \
  && apk --no-cache add zeromq-dev erlang-dev elixir erlang-crypto \
  && git clone https://github.com/zeromq/erlzmq2.git /opt/erlzmq2 \
  && mix local.rebar --force \
  && cd /opt/erlzmq2 \
  && make

Build the image with:

docker build -t test/zmq .

What I am getting

make[1]: Leaving directory '/opt/erlzmq2/c_src'
ERROR: compile failed while processing /opt/erlzmq2: {'EXIT',{undef,[{erl_syntax,type,[{attribute,2,module,erlzmq_nif}],[]},
                {rebar_erlc_compiler,parse_attrs,2,
                                     [{file,"src/rebar_erlc_compiler.erl"},
                                      {line,619}]},
                {rebar_erlc_compiler,modify_erlcinfo,4,
                                     [{file,"src/rebar_erlc_compiler.erl"},
                                      {line,451}]},
                {rebar_erlc_compiler,'-update_erlcinfo_fun/2-fun-0-',4,
                                     [{file,"src/rebar_erlc_compiler.erl"},
                                      {line,401}]},
                {lists,foldl,3,[{file,"lists.erl"},{line,1263}]},
                {rebar_erlc_compiler,init_erlcinfo,2,
                                     [{file,"src/rebar_erlc_compiler.erl"},
                                      {line,391}]},
                {rebar_erlc_compiler,doterl_compile,4,
                                     [{file,"src/rebar_erlc_compiler.erl"},
                                      {line,302}]},
                {rebar_core,run_modules,4,
                            [{file,"src/rebar_core.erl"},{line,493}]}]}}
make: *** [Makefile:6: compile] Error 1

I will expect it to compile, maybe a dependency is not present? I cannot see what library is looking for.

bryanhuntesl commented 5 years ago

Doesn't seem to be maintained - my fork works fine on Alpine - verified by this - https://github.com/esl/erlzmq/blob/master/verification/Dockerfile.alpine - published to hex.pm as erlzmq