Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error #61

Open
Ziggizag opened this issue Dec 6, 2023 · 9 comments · May be fixed by #62
Open

Compilation error #61

Ziggizag opened this issue Dec 6, 2023 · 9 comments · May be fixed by #62
Assignees
Labels
Milestone

Comments

@Ziggizag
Copy link

Ziggizag commented Dec 6, 2023

Hi,

"make" command results in the following error:

Writing file src/smtp_rfc5322_scan.erl, /usr/lib/erlang/lib/parsetools-2.5/include/leexinc.hrl: no such file or directory

Any idea?

@lukebakken
Copy link
Collaborator

I don't, because you haven't provided enough information.

  • What operating system?
  • What version of Erlang?
  • What version of make?
  • Provide a complete transcription of what you are doing, starting with cloning this repository. ATTACH the output as a file. I will delete the comment if it is a giant wall of text.

@Ziggizag
Copy link
Author

Ziggizag commented Dec 6, 2023

OK - so now it seems it was because I had Erlang but no "dev" version. I have installed erlang-dev and now:

Error: No Makefile to build dependency .../rabbitmq-email/deps/thoas.

I use Ubuntu 22.04 LTS - I am not a compilation expert, sorry. Everything possible is updated to most recent version.

@Ziggizag
Copy link
Author

Ziggizag commented Dec 6, 2023

And indeed, the output is a giant wall of text...

But it starts with:

output
Evaluating config script "/home/ziggi/varia/rabbitmq-email/.erlang.mk/rebar3/_build/default/lib/rebar/src/rebar.app.src.script"
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling cf
===> Compiling cth_readable
===> Compiling certifi
===> Compiling eunit_formatters
===> Compiling vendor/eunit_formatters/src/eunit_progress.erl failed
vendor/eunit_formatters/src/eunit_progress.erl:none: undefined parse transform 'eunit_striptests'

escript: exception throw: rebar_abort
  in function  rebar_utils:abort/0 (apps/rebar/src/rebar_utils.erl, line 718)
  in call from rebar_parallel:parallel_dispatch/4 (apps/rebar/src/rebar_parallel.erl, line 39)
  in call from rebar_compiler:run/4 (apps/rebar/src/rebar_compiler.erl, line 253)
  in call from lists:foreach_1/2 (lists.erl, line 1686)
  in call from rebar_prv_compile:'-build_rebar3_apps/3-lc$^0/1-0-'/3 (apps/rebar/src/rebar_prv_compile.erl, line 374)
  in call from rebar_prv_compile:build_rebar3_apps/3 (apps/rebar/src/rebar_prv_compile.erl, line 389)
  in call from rebar_prv_compile:run_compilers/4 (apps/rebar/src/rebar_prv_compile.erl, line 192)
  in call from rebar_prv_compile:compile/4 (apps/rebar/src/rebar_prv_compile.erl, line 154)
/home/ziggi/varia/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbit_common
Error! Failed to eval:  application:load(rebar),        application:set_env(rebar, log_level, debug),

And it ends with:

RunPlugin(P, pre_compile) || P <- Plugins],                             [RunPlugin(P, compile) || P <- Plugins]         end     end(),  halt()

Runtime terminating during boot ({{badmatch,{error,nofile}},[{erl_eval,expr,6,[{file,"erl_eval.erl"},{line,498}]},{erl_eval,exprs,6,[{file,"erl_eval.erl"},{line,136}]},{init,start_it,1,[]},{init,start_em,1,[]},{init,do_boot,3,[]}]})

Crash dump is being written to: erl_crash.dump...done
Error: No Makefile to build dependency /home/ziggi/varia/rabbitmq-email/deps/thoas.
make[1]: *** [erlang.mk:3750: deps] Error 2
make[1]: Leaving directory '/home/ziggi/varia/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbit_common'
make: *** [erlang.mk:4512: deps] Error 2

@lukebakken
Copy link
Collaborator

Please note how I edited your previous comment to put the text behind a dropdown.

  • You did not answer this question - What version of Erlang are you using?
  • Please run these commands:
    cd path/to/rabbitmq-email
    git clean -xffd > /tmp/output.txt
    make 2>&1 | tee -a /tmp/output.txt
    
  • ATTACH /tmp/output.txt to your response.

@Ziggizag
Copy link
Author

Ziggizag commented Dec 6, 2023

OK,

erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell
"26"

output.txt

@lukebakken
Copy link
Collaborator

Thanks. I am getting a different error than you. I will investigate.

Here is the output from my Ubuntu 22 env:
lrb-output.txt

@lukebakken lukebakken self-assigned this Dec 6, 2023
@lukebakken lukebakken added this to the 1.1.2 milestone Dec 6, 2023
@lukebakken lukebakken added the bug label Dec 6, 2023
@lukebakken
Copy link
Collaborator

Just FYI, I am working on higher priority items like this but will fix this issue as time allows.

lukebakken added a commit that referenced this issue Dec 9, 2023
Fixes #61

Update erlang.mk and rabbitmq-components.mk
@lukebakken lukebakken linked a pull request Dec 9, 2023 that will close this issue
@lukebakken
Copy link
Collaborator

Hello, please see if this works in your environment:

git clone https://github.com/rabbitmq/rabbitmq-server.git
cd rabbitmq-server
make FULL=1
cd deps
git clone https://github.com/gotthardp/rabbitmq-email.git
cd rabbitmq-email
make

@lucatiozzo91
Copy link

Thank you @lukebakken, with your hint it work in my environment

I leave here a snippet of code for a multistage docker build where before we build the plugin and then copy the plugin inside the rabbitmq image.

This for rabbitmq 3.11

ARG RABBITMQ_VERSION=3.11.26

FROM elixir:1.14.5-otp-25 as builder
ARG RABBITMQ_VERSION

ENV TZ=Europe/Rome
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y rsync
RUN cd $HOME; git clone --depth 1 --branch v${RABBITMQ_VERSION}  https://github.com/rabbitmq/rabbitmq-server.git
RUN cd $HOME/rabbitmq-server && make FULL=1
RUN cd $HOME/rabbitmq-server/deps && git clone --depth 1 --branch v1.1.1 https://github.com/gotthardp/rabbitmq-email.git
RUN cd $HOME/rabbitmq-server/deps/rabbitmq-email && make RABBITMQ_VERSION=v${RABBITMQ_VERSION} dist

FROM docker.io/bitnami/rabbitmq:${RABBITMQ_VERSION}

COPY --from=builder /root/rabbitmq-server/deps/rabbitmq-email/plugins/eiconv-1.0.0 /opt/bitnami/rabbitmq/plugins/eiconv-1.0.0
COPY --from=builder /root/rabbitmq-server/deps/rabbitmq-email/plugins/gen_smtp-1.2.0 /opt/bitnami/rabbitmq/plugins/gen_smtp-1.2.0
COPY --from=builder /root/rabbitmq-server/deps/rabbitmq-email/plugins/rabbitmq_email-1.1.1 /opt/bitnami/rabbitmq/plugins/rabbitmq_email-1.1.1

This for rabbitmq 3.12 with new erlang/otp version

ARG RABBITMQ_VERSION=3.12.11

FROM elixir:1.14.5 as builder
ARG RABBITMQ_VERSION

ENV TZ=Europe/Rome
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y rsync
RUN cd $HOME; git clone --depth 1 --branch v${RABBITMQ_VERSION}  https://github.com/rabbitmq/rabbitmq-server.git
RUN cd $HOME/rabbitmq-server && make FULL=1
RUN cd $HOME/rabbitmq-server/deps && git clone --depth 1 --branch v1.1.1 https://github.com/gotthardp/rabbitmq-email.git
RUN cd $HOME/rabbitmq-server/deps/rabbitmq-email && make RABBITMQ_VERSION=v${RABBITMQ_VERSION} dist

FROM docker.io/bitnami/rabbitmq:${RABBITMQ_VERSION}

COPY --from=builder /root/rabbitmq-server/deps/rabbitmq-email/plugins/eiconv-1.0.0 /opt/bitnami/rabbitmq/plugins/eiconv-1.0.0
COPY --from=builder /root/rabbitmq-server/deps/rabbitmq-email/plugins/gen_smtp-1.2.0 /opt/bitnami/rabbitmq/plugins/gen_smtp-1.2.0
COPY --from=builder /root/rabbitmq-server/deps/rabbitmq-email/plugins/rabbitmq_email-1.1.1 /opt/bitnami/rabbitmq/plugins/rabbitmq_email-1.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants