compiling rabbit MQ server on windows

145 views
Skip to first unread message

Jaile Sebes

unread,
Oct 7, 2017, 2:04:17 PM10/7/17
to rabbitmq-users
Hi 

As per our company Quality policy any 3rd party software we use we should be able to compile

I am using rabbitMQ server on windows  and took the code from Git

Installed MSYS2 and MinGW , set erl and Elixir PATH

During build of  v.3.6.12 I get the following error


d:/rabbitmq-server-rabbitmq_v3_6_12/src/lqueue.erl:30: can't find include lib "rabbit_common/include/old_builtin_types.hrl"
d:/rabbitmq-server-rabbitmq_v3_6_12/src/lqueue.erl:32: undefined macro 'QUEUE_TYPE/0'
d:/rabbitmq-server-rabbitmq_v3_6_12/src/lqueue.erl:49: type lqueue() undefined
make[1]: *** [erlang.mk:5123: ebin/rabbit.app] Error 1
make: *** [erlang.mk:4913: app] Error 2


If I explicitly copy /old_builtin_types.hrl  as suggested in one link 

I get the error 

d:/rabbitmq-server-rabbitmq_v3_6_12/src/rabbit_amqqueue_process.erl:98: undefined macro 'DICT_TYPE/0'
make[1]: *** [erlang.mk:5123: ebin/rabbit.app] Error 1
make: *** [erlang.mk:4913: app] Error 2
 not found

please Help

Best Regards


Jaile Sebes

unread,
Oct 7, 2017, 2:15:49 PM10/7/17
to rabbitmq-users
Also My Erlang is 19.3 

Luke Bakken

unread,
Oct 7, 2017, 6:25:55 PM10/7/17
to rabbitmq-users
Hi Jaile -

You want to use this project to build RabbitMQ on Windows: https://github.com/rabbitmq/rabbitmq-public-umbrella

Also, you need to run make from the MSYS2 terminal, not cmd.exe

Let me know how it goes -
Luke

ram yd

unread,
Nov 7, 2018, 2:18:11 AM11/7/18
to rabbitmq-users
Hi,

Even i have to build rabbitmq server as per company policy.

I am using Cygwin to build rabbimtq and i have successfully built Erlang.

Would you please share your steps that help us to do it.

Luke Bakken

unread,
Nov 7, 2018, 9:05:51 AM11/7/18
to rabbitmq-users
Hi Ram,

I'm sorry you have to deal with this due to your company policy.

I have outlined some general steps for building RabbitMQ on Windows here: https://stackoverflow.com/a/53048508/1466825

Please note that the official RabbitMQ release for Windows is built on Linux, since Erlang beam files are cross-platform.

I will work on documenting the process more thoroughly in the coming week.

Thanks,
Luke

ram yd

unread,
Nov 7, 2018, 12:35:58 PM11/7/18
to rabbitm...@googlegroups.com
Thanks Luke.

I was also planned to do the same ( build it in Linux and use it in windows).

However I tried it but make file creates some process by using createprocess function and it fails as it not possible take command line more than 8191 char. ( Windows cmd restrictions)

There is no easy way to fix this issue.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Luke Bakken

unread,
Nov 7, 2018, 12:51:36 PM11/7/18
to rabbitmq-users
Hello,

When you say "make file creates some process by using createprocess function" what exactly are you running? The only version of make that will work on Windows to build RabbitMQ is either the Cygwin or MSYS2 one.

I am currently documenting the build process in this gist:


Thanks,
Luke

ram yd

unread,
Nov 7, 2018, 1:02:47 PM11/7/18
to rabbitm...@googlegroups.com
Hi,

Today, I have installed msys with mingw and faced that problem. Earlier I tried with cygwin but it is not even downloading deps packages from git repository.

--

ram yd

unread,
Nov 7, 2018, 1:13:40 PM11/7/18
to rabbitm...@googlegroups.com
Hi Luke,

I have seen your instructions in readme.md link. Are you able to build successfully. 

Luke Bakken

unread,
Nov 7, 2018, 2:05:09 PM11/7/18
to rabbitmq-users
Hello,

Be patient, I'm testing the process now. Like I said earlier, RabbitMQ is not normall built on Windows.

Thanks,
Luke

Luke Bakken

unread,
Nov 7, 2018, 2:19:14 PM11/7/18
to rabbitmq-users
Alright, I have had a successful build.

Please follow the instructions in this gist and report and discrepancies:


Note that I started with a pristine Windows 8.1 VM so your environment may introduce differences. Everything was cloned into C:\Users\vagrant, for instance.

When installing MSYS2 or cloning repositories, be sure to do so into paths that do not have space characters in them.

Thanks,
Luke

ram yd

unread,
Nov 7, 2018, 7:53:33 PM11/7/18
to rabbitm...@googlegroups.com
Thanks for your wonderful help . I'll follow your step to build it.



ram yd

unread,
Nov 9, 2018, 2:15:49 AM11/9/18
to rabbitm...@googlegroups.com
HI Luke,

I have built rabbitmq  (using erlang 19.3.6.4) successfully by following your instructions.

At present we are using Erlang 19.3.6.4 but i faced  thie following error.

2018-11-09 12:38:57.333 [info] <0.31.0> Application lager started on node rabbit@md1z9g0c
2018-11-09 12:38:57.395 [info] <0.3.0> Log file opened with Lager
2018-11-09 12:39:01.283 [info] <0.31.0> Application mnesia started on node rabbit@md1z9g0c
2018-11-09 12:39:01.283 [info] <0.31.0> Application asn1 started on node rabbit@md1z9g0c
2018-11-09 12:39:02.138 [info] <0.31.0> Application inets started on node rabbit@md1z9g0c
2018-11-09 12:39:02.138 [info] <0.31.0> Application recon started on node rabbit@md1z9g0c
2018-11-09 12:39:02.138 [info] <0.31.0> Application gen_batch_server started on node rabbit@md1z9g0c
2018-11-09 12:39:02.138 [info] <0.31.0> Application crypto started on node rabbit@md1z9g0c
2018-11-09 12:39:02.138 [info] <0.31.0> Application public_key started on node rabbit@md1z9g0c
2018-11-09 12:39:02.981 [info] <0.31.0> Application ssl started on node rabbit@md1z9g0c
2018-11-09 12:39:03.013 [info] <0.31.0> Application ranch started on node rabbit@md1z9g0c
2018-11-09 12:39:03.013 [info] <0.31.0> Application ranch_proxy_protocol started on node rabbit@md1z9g0c
2018-11-09 12:39:03.013 [info] <0.31.0> Application jsx started on node rabbit@md1z9g0c
2018-11-09 12:39:03.013 [info] <0.31.0> Application xmerl started on node rabbit@md1z9g0c
2018-11-09 12:39:03.013 [info] <0.31.0> Application rabbit_common started on node rabbit@md1z9g0c
2018-11-09 12:39:03.173 [info] <0.31.0> Application os_mon started on node rabbit@md1z9g0c
2018-11-09 12:39:03.485 [info] <0.31.0> Application aten started on node rabbit@md1z9g0c
2018-11-09 12:39:04.485 [info] <0.210.0> WAL: recovering []
2018-11-09 12:39:04.485 [info] <0.210.0> wal: opening new file "00000001.wal"
2018-11-09 12:39:04.532 [info] <0.31.0> Application ra started on node rabbit@md1z9g0c
2018-11-09 12:39:04.626 [error] <0.214.0> This RabbitMQ version cannot run on Erlang 19.3.6.4 (erts 8.3.5.3): minimum required version is 21.0 (erts 10.0)
2018-11-09 12:39:04.626 [error] <0.213.0> CRASH REPORT Process <0.213.0> with 0 neighbours exited with reason: {{erlang_version_too_old,"Erlang 21.0 or later is required, started on 19.3.6.4"},{rabbit,start,[normal,[]]}} in application_master:init/4 line 134
2018-11-09 12:39:04.626 [info] <0.31.0> Application rabbit exited with reason: {{erlang_version_too_old,"Erlang 21.0 or later is required, started on 19.3.6.4"},{rabbit,start,[normal,[]]}}


it would be good if you also specify how to build particular version of rabbitmq server. because we are using Rabbitmq 3.6.10

Also specify how to build only the needed deps instead of building all deps.


--
Regards,
Ramkumar Y.D

ram yd

unread,
Nov 9, 2018, 2:19:00 AM11/9/18
to rabbitm...@googlegroups.com
Hi Luke

oops i forgot to mention that this error occurs while starting rabbitmq server.
--
Regards,
Ramkumar Y.D

Michael Klishin

unread,
Nov 9, 2018, 8:43:21 AM11/9/18
to rabbitm...@googlegroups.com
You have built the node from master instead of the v3.7.x branch. Master requires Erlang/OTP 21 and the error
says as much.

make up BRANCH=v3.7.x

in the umbrella will check out that branch in all dependent repositories.
MK

Staff Software Engineer, Pivotal/RabbitMQ

Michael Klishin

unread,
Nov 9, 2018, 8:43:58 AM11/9/18
to rabbitm...@googlegroups.com
Also, master is what will ship as 3.8 and we do not recommend running it in production just yet.

Luke Bakken

unread,
Nov 9, 2018, 9:42:33 AM11/9/18
to rabbitmq-users
Hello,

Glad the instructions worked for you. A slightly newer version of that gist included a step to check out the tag for the release you'd like to build. 

You can find the final version of the document here:

https://github.com/rabbitmq/rabbitmq-server-release/blob/master/PKG_WINDOWS.md#fetch-and-build-deps

When you build a distribution package (as make package-windows does), you build all dependencies. It doesn't really take that much time in the larger scheme of things.

Thanks,
Luke

On Thursday, November 8, 2018 at 11:15:49 PM UTC-8, ram yd wrote:
HI Luke,

I have built rabbitmq  (using erlang 19.3.6.4) successfully by following your instructions.

Luke Bakken

unread,
Nov 9, 2018, 9:54:42 AM11/9/18
to rabbitmq-users
One more thing -

When you build version 3.6.10 (which is very old) my instructions probably won't work due to these lines in the Makefile:


They use a command that is not available on MSYS2 (elinks). I recommend commenting out or removing the xmlto and elinks commands  as their only purpose is to create a text file that is a readme.

If you run into other issues building 3.6.10 let us know on this mailing list. Or, upgrade to version 3.7.8 since we know it works.

Thanks,
Luke

ram yd

unread,
Nov 9, 2018, 10:45:54 AM11/9/18
to rabbitm...@googlegroups.com
Thanks Luke and Michael for the response.

To we decided to use latest version of rabbitmq in our project.

However I will try to compile 3.6.10 for the safety purpose if we face any issue on our project with latest version of rabbitmq.

I'll let you know once after I compile 3.6.10


--

Michael Klishin

unread,
Nov 9, 2018, 12:27:24 PM11/9/18
to rabbitm...@googlegroups.com

ram yd

unread,
Nov 13, 2018, 4:05:56 AM11/13/18
to rabbitm...@googlegroups.com
Hi Luke,

I have compiled 3.6.10 successfully. 

In addition to your steps, we need to remove the following line.

$(verbose) rm rabbitmq-service.html 

But the generated installer has this name "rabbitmq-server-3.6.10+dirty".

I am not sure what i have done it to generate like that.
--
Regards,
Ramkumar Y.D

Michael Klishin

unread,
Nov 15, 2018, 8:18:48 PM11/15/18
to rabbitm...@googlegroups.com
The "+dirty" part simply means there were uncommitted changes in the git repo.

ram yd

unread,
Nov 15, 2018, 9:43:31 PM11/15/18
to rabbitm...@googlegroups.com
Thank you
Reply all
Reply to author
Forward
0 new messages