[rabbitmq-discuss] Build rabbitmq-server-2.4.1 from source problem

71 views
Skip to first unread message

Alexander Kuleshov

unread,
May 30, 2011, 7:42:34 AM5/30/11
to rabbitmq...@lists.rabbitmq.com
Hello,

I try to build rabbitmq-server-2.4.1 from source. But get error:

make
python codegen.py body codegen/amqp-rabbitmq-0.9.1.json
src/rabbit_framing_amqp_0_9_1.erl
Traceback (most recent call last):
File "codegen.py", line 492, in <module>
"body": generateErl})
File "codegen/amqp_codegen.py", line 283, in do_main_dict
execute(funcDict[function], sources, dest)
File "codegen/amqp_codegen.py", line 262, in execute
fn(amqp_specs)
File "codegen.py", line 485, in generateErl
genErl(AmqpSpec(specPath))
File "codegen/amqp_codegen.py", line 140, in __init__
self.major = self.spec['major-version']
KeyError: 'major-version'
make: *** No rule to make target `deps.mk', needed by
`ebin/bpqueue.beam'. Stop.

I use python 2.7.1

Thank you.
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq...@lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

Matthew Sackman

unread,
May 31, 2011, 5:59:35 AM5/31/11
to rabbitmq...@lists.rabbitmq.com
On Mon, May 30, 2011 at 11:42:34AM +0000, Alexander Kuleshov wrote:
> I use python 2.7.1

I suspect that may be the problem. Try a 2.6.

Matthew

Alexander Kuleshov

unread,
May 31, 2011, 8:19:47 AM5/31/11
to rabbitmq...@lists.rabbitmq.com
Hello,

I install python 2.6

Now i get:

make: *** No rule to make target `deps.mk', needed by
`ebin/bpqueue.beam'. Stop.

Matthew Sackman

unread,
May 31, 2011, 8:31:13 AM5/31/11
to rabbitmq...@lists.rabbitmq.com
On Tue, May 31, 2011 at 12:19:47PM +0000, Alexander Kuleshov wrote:
> Hello,
>
> I install python 2.6
>
> Now i get:
>
> make: *** No rule to make target `deps.mk', needed by
> `ebin/bpqueue.beam'. Stop.

Ok, are you building from our hg repos or from the source tarball?

For me, with the tarball:

matthew@hazel:~$ cd /tmp
matthew@hazel:/tmp$ wget http://www.rabbitmq.com/releases/rabbitmq-server/v2.4.1/rabbitmq-server-2.4.1.tar.gz
--2011-05-31 13:29:40-- http://www.rabbitmq.com/releases/rabbitmq-server/v2.4.1/rabbitmq-server-2.4.1.tar.gz
Length: 324199 (317K) [application/x-gzip]
Saving to: `rabbitmq-server-2.4.1.tar.gz'

100%[=====================================================================================================================>] 324,199 182K/s in 1.7s

2011-05-31 13:29:42 (182 KB/s) - `rabbitmq-server-2.4.1.tar.gz' saved [324199/324199]

matthew@hazel:/tmp$ tar xzf rabbitmq-server-2.4.1.tar.gz
matthew@hazel:/tmp$ cd rabbitmq-server-2.4.1/
matthew@hazel:/tmp/rabbitmq-server-2.4.1$ make


python codegen.py body codegen/amqp-rabbitmq-0.9.1.json src/rabbit_framing_amqp_0_9_1.erl

python codegen.py body codegen/amqp-rabbitmq-0.8.json src/rabbit_framing_amqp_0_8.erl
xsltproc --stringparam modulename "`basename src/rabbit_ctl_usage.erl .erl`" \
docs/usage.xsl docs/rabbitmqctl.1.xml > src/rabbit_ctl_usage.erl.tmp
sed -e 's/"/\\"/g' -e 's/%QUOTE%/"/g' src/rabbit_ctl_usage.erl.tmp > src/rabbit_ctl_usage.erl.tmp2
fold -s src/rabbit_ctl_usage.erl.tmp2 > src/rabbit_ctl_usage.erl.tmp3
mv src/rabbit_ctl_usage.erl.tmp3 src/rabbit_ctl_usage.erl
rm src/rabbit_ctl_usage.erl.tmp src/rabbit_ctl_usage.erl.tmp2
python codegen.py --ignore-conflicts header codegen/amqp-rabbitmq-0.9.1.json codegen/amqp-rabbitmq-0.8.json include/rabbit_framing.hrl
rm -f deps.mk
echo src/rabbit_control.erl:src/gm_soak_test.erl:src/tcp_listener_sup.erl:src/rabbit_alarm.erl:src/rabbit.erl:src/rabbit_restartable_sup.erl:src/rabbit_types.erl:src/rabbit_net.erl:src/worker_pool.erl:src/rabbit_auth_mechanism.erl:src/rabbit_tests_event_receiver.erl:src/rabbit_msg_store.erl:src/rabbit_exchange_type_topic.erl:src/rabbit_writer.erl:src/rabbit_channel.erl:src/rabbit_exchange_type_fanout.erl:src/rabbit_auth_backend_internal.erl:src/rabbit_prelaunch.erl:src/rabbit_registry.erl:src/rabbit_auth_mechanism_cr_demo.erl:src/gm.erl:src/rabbit_log.erl:src/rabbit_amqqueue.erl:src/rabbit_direct.erl:src/file_handle_cache.erl:src/rabbit_ssl.erl:src/gen_server2.erl:src/rabbit_guid.erl:src/rabbit_auth_mechanism_amqplain.erl:src/rabbit_error_logger.erl:src/rabbit_msg_store_index.erl:src/rabbit_vhost.erl:src/rabbit_backing_queue.erl:src/gm_speed_test.erl:src/rabbit_tests.erl:src/rabbit_exchange_type_direct.erl:src/rabbit_queue_collector.erl:src/tcp_acceptor.erl:src/rabbit_misc.er
l:src/rabbit_msg_store_ets_index.erl:src/delegate.erl:src/rabbit_connection_sup.erl:src/worker_pool_sup.erl:src/rabbit_limiter.erl:src/rabbit_node_monitor.erl:src/rabbit_heartbeat.erl:src/rabbit_sasl_report_file_h.erl:src/rabbit_memory_monitor.erl:src/rabbit_auth_backend.erl:src/vm_memory_monitor.erl:src/rabbit_exchange.erl:src/tcp_listener.erl:src/bpqueue.erl:src/rabbit_binary_generator.erl:src/rabbit_networking.erl:src/rabbit_variable_queue.erl:src/priority_queue.erl:src/rabbit_amqqueue_sup.erl:src/gatherer.erl:src/rabbit_auth_mechanism_plain.erl:src/rabbit_msg_store_gc.erl:src/rabbit_queue_index.erl:src/rabbit_channel_sup.erl:src/rabbit_event.erl:src/worker_pool_worker.erl:src/pg_local.erl:src/rabbit_framing.erl:src/rabbit_mnesia.erl:src/rabbit_exchange_type.erl:src/rabbit_command_assembler.erl:src/rabbit_exchange_type_headers.erl:src/rabbit_upgrade_functions.erl:src/supervisor2.erl:src/test_sup.erl:src/rabbit_amqqueue_process.erl:src/gm_tests.erl:src/tcp_acceptor_sup.erl
:src/rabbit_upgrade.erl:src/rabbit_error_logger_file_h.erl:src/delegate_sup.erl:src/rabbit_reader.erl:src/rabbit_binding.erl:src/rabbit_msg_file.erl:src/rabbit_client_sup.erl:src/rabbit_access_control.erl:src/rabbit_router.erl:src/rabbit_version.erl:src/rabbit_binary_parser.erl:src/rabbit_channel_sup_sup.erl:src/rabbit_basic.erl:src/rabbit_sup.erl:src/rabbit_framing_amqp_0_9_1.erl:src/rabbit_framing_amqp_0_8.erl:src/rabbit_ctl_usage.erl:include/rabbit_msg_store_index.hrl:include/rabbit_exchange_type_spec.hrl:include/rabbit_auth_backend_spec.hrl:include/gm_specs.hrl:include/rabbit_auth_mechanism_spec.hrl:include/rabbit_backing_queue_spec.hrl:include/rabbit_msg_store.hrl:include/rabbit.hrl:include/rabbit_framing.hrl: | escript generate_deps deps.mk ebin
erlc -I include -o ebin -Wall -v +debug_info -Duse_specs -pa ebin src/rabbit_alarm.erl
erlc -I include -o ebin -Wall -v +debug_info -Duse_specs -pa ebin src/rabbit_control.erl
erlc -I include -o ebin -Wall -v +debug_info -Duse_specs -pa ebin src/rabbit.erl
erlc -I include -o ebin -Wall -v +debug_info -Duse_specs -pa ebin src/rabbit_version.erl

etc etc

What platform etc are you on?

Matthew

Alexander Kuleshov

unread,
May 31, 2011, 8:37:54 AM5/31/11
to rabbitmq...@lists.rabbitmq.com
Thank you all. I build it with python 2.6.

Now i have 2 question:

1) How can i use it in my erlang code? I must to user
rabbitmq-erlang-client? or something else?

I build rabbitmq-erlang-client from github git. I put in my code:

-include("amqp_client.hrl").

But get error:

./test.erl:10: can't find include file "amqp_client.hrl"

2) How can i install rabbitmq-server. I build it with make. Them i try
to make install:

make install
Please set TARGET_DIR.
Please set SBIN_DIR.
Please set MAN_DIR.
make: *** [install_dirs] Error 1


Thank you.

Alvaro Videla

unread,
May 31, 2011, 8:47:27 AM5/31/11
to Alexander Kuleshov, rabbitmq...@lists.rabbitmq.com
Hi,

To use the Erlang client I created an App following the OTP design principles (folder structure, etc).

Then I have a folder deps like this:

deps /
amqp_client/
rabbit_common/

I've got the content of those folders from the .ez files distributed on the plugins area of rabbitmq.com

So I have a rebar.config file like this:

{erl_opts, [debug_info, fail_on_warning, {i, "include"}, {i, "deps"} ]}.

Which AFAIK will be translated to an erlc option like: erlc -I deps -I include … etc etc

Then on my app .hrl file with the records definitions and so on I added:

-include_lib("amqp_client/include/amqp_client.hrl").

-include_lib then will try to find the amqp_client app in your load path… which is what the -I deps option should take care off.

I think that's the *way* of doing it in Erlang, probably Matthew can comment on that.

Cheers,

-Alvaro
Sent form my Nokia 1100



David Wragg

unread,
May 31, 2011, 8:56:51 AM5/31/11
to rabbitmq...@lists.rabbitmq.com
Matthew Sackman <mat...@rabbitmq.com> writes:
> On Mon, May 30, 2011 at 11:42:34AM +0000, Alexander Kuleshov wrote:
>> I use python 2.7.1
>
> I suspect that may be the problem. Try a 2.6.

It works fine for me with python 2.7.1 (on Fedora 15). There might have
been an issue with Alexander's Python install, but I don't think there
is a general 2.7 issue.

--
David Wragg
Staff Engineer, RabbitMQ
VMware, Inc.

Reply all
Reply to author
Forward
0 new messages