rabbitmq / discussions

Please use RabbitMQ mailing list for questions. Issues that are questions, discussions or lack details necessary to investigate them are moved to this repository.
3 stars 4 forks source link

can't find include lib "eunit/include/eunit.hrl" when building delayed message exchange from source #146

Closed yuklia closed 4 years ago

yuklia commented 4 years ago

Hello! I try to build this plugin from image: rabbitmq:3.8-management-alpine

here is part of Dockerfile:

FROM rabbitmq:3.8-management-alpine

ENV PLUGIN_DELAYED_VERSION 3.8.0
ENV PLUGIN_DEDUPLICATION_VERSION 3.8.x
ENV PLUGIN_DEDUPLICATION_FULL_VERSION v${PLUGIN_DEDUPLICATION_VERSION}_0.4.5

RUN apk add --no-cache --update wget make git curl python3 && \
    ln -sf python3 /usr/bin/python && \
    wget https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/archive/v${PLUGIN_DELAYED_VERSION}.zip -O plugin-delayed-message-exchange.zip && \
    unzip -q plugin-delayed-message-exchange.zip && \
    rm -rf plugin-delayed-message-exchange.zip && \
    ls -la && \
    cd rabbitmq-delayed-message-exchange-${PLUGIN_DELAYED_VERSION} && \
    make

I got errors during make

st.erl rabbit_prelaunch_early_logging.erl rabbit_prelaunch_erlang_compat.erl rabbit_prelaunch_errors.erl rabbit_prelaunch_sighandler.erl rabbit_prelaunch_sup.erl
src/rabbit_boot_state.erl:11: can't find include lib "eunit/include/eunit.hrl"
src/rabbit_boot_state.erl:30: undefined macro 'assert/1'
src/rabbit_boot_state.erl:13: function set/1 undefined
src/rabbit_boot_state.erl:27: spec for undefined function set/1
src/rabbit_boot_state.erl:61: Warning: function is_valid/1 is unused
make[3]: *** [../../erlang.mk:5442: ebin/rabbitmq_prelaunch.app] Error 1
make[2]: *** [../../erlang.mk:5184: app] Error 2
make[2]: Leaving directory '/rabbitmq-delayed-message-exchange-3.8.0/deps/rabbit/apps/rabbitmq_prelaunch'
make[1]: Leaving directory '/rabbitmq-delayed-message-exchange-3.8.0/deps/rabbit'
make[1]: *** [erlang.mk:4465: apps] Error 2
make: *** [erlang.mk:4433: deps] Error 2

Error 1 and Error 2 pretty verbose with no doubts 🙂 but could you be so kind to shed the light 🧙🏽

michaelklishin commented 4 years ago

Your installation does not include Erlang header files such as eunit.hrl. On Debian-based system, they are in a separate package that must be installed. I know nothing about Alpine.

yuklia commented 4 years ago

Thanks, @michaelklishin for a response but on debian/ ubuntu the same issue https://github.com/rabbitmq/discussions/issues/147