[rabbitmq-discuss] Erlang client for amqp_0_9_1 branch broken

Tony Menges amenges at vmware.com
Fri Jul 2 18:39:47 BST 2010


It looks like a recent change has broken the build of the Erlang client in the amqp_0_9_1 branch. In particular, the include/amqp_client.hrl file picked up some defines that specify version 8. The change seems to have come in with the merge of bug22885 into amqp_0_9_1.

The build failure is:

$ make
ERL_LIBS=deps:dist erlc -I include -o ebin -Wall -v +debug_info -Duse_specs src/amqp_channel.erl
~/Development/RabbitMQ-Source/rabbitmq-public-umbrella/rabbitmq-erlang-client/include/amqp_client.hrl:29: redefining macro 'PROTOCOL_VERSION_MAJOR'
~/Development/RabbitMQ-Source/rabbitmq-public-umbrella/rabbitmq-erlang-client/include/amqp_client.hrl:30: redefining macro 'PROTOCOL_VERSION_MINOR'
make: *** [ebin/amqp_channel.beam] Error 1

Besides the redefinitions of PROTOCOL_VERSION_MAJOR/MINOR, amqp_client.hrl defines PROTOCOL to amqp_0_8.

In rabbit-server/include/rabbit_framing.hrl:
-define(PROTOCOL_VERSION_MAJOR, 0).
-define(PROTOCOL_VERSION_MINOR, 9).
-define(PROTOCOL_VERSION_REVISION, 1).

In rabbit-erlang-client/include/amqp_client.hrl:
-define(PROTOCOL_VERSION_MAJOR, 0).
-define(PROTOCOL_VERSION_MINOR, 8).
-define(PROTOCOL_HEADER,
        <<"AMQP", 1, 1, ?PROTOCOL_VERSION_MAJOR, ?PROTOCOL_VERSION_MINOR>>).
-define(PROTOCOL, amqp_0_8).

Removing the PROTOCOL_VERSION_MAJOR/MINOR definitions in amqp_client.hrl and changing protocol to amqp_0_9_1 allows the build to succeed; I haven't tested it yet to see if runs correctly (I currently only use the Erlang client for plugins).

Thanks,

Tony Menges


More information about the rabbitmq-discuss mailing list