Freshened up build to work via rebar only #10

Merged
merged 2 commits into from Jun 12, 2011

Projects

None yet

3 participants

@kevsmith
  • Updated rebar version
  • Added pre/post build hooks to handle building ZeroMQ
  • Added c_src/Makefile to modularize build

These changes should make it possible for erlzmq2 to participate as a dep in a rebar-managed project. I haven't been able to fully verify the build on my Snow Leopard MBP w/R14B03 as the unit tests crash the emulator :(

@kevsmith kevsmith Freshened up build to work via rebar only:
* Updated rebar version
* Added pre/post build hooks to handle building ZeroMQ
* Added c_src/Makefile to modularize build
2b57f69
@yrashk
The ZeroMQ project member

Kevin, thanks for the patch, I will review it shortly. Speaking about the crash, have you done ulimit -n 1200 prior running the test? If yes, can you please open a separate issue as it works here?

@kevsmith

I've been able to verify the test suite works with these changes. evax was kind enough to point out a couple of sysctl.conf entries I was missing which fixed everything. Let me know if there's anything I can do to help get this merged in.

@yrashk
The ZeroMQ project member

This patch moves deps directory to c_src, is there any chance this can be adjusted so that deps is back at the root level?

@yrashk yrashk merged commit d0b50df into zeromq:master Jun 12, 2011
@loxs

Hey guys, sorry if this is not the right place to ask, but don't know a better one.
What should I do in order to include erlzmq2 as a dependency to my project?

I have something like this in my rebar.config:

    {deps, [{webmachine, "1.8.*", {git, "git://github.com/basho/webmachine", "HEAD"}},
            {eredis, ".*", {git,"git://github.com/wooga/eredis.git","master"}},
            {erlzmq, ".*", {git, "https://github.com/zeromq/erlzmq2.git", "master"}}
           ]}.

and it doesn't work.
I get the following:

$ make
==> mochiweb (get-deps)
==> webmachine (get-deps)
==> eredis (get-deps)
==> erlzmq (get-deps)
==> wsapi (get-deps)
==> mochiweb (compile)
==> webmachine (compile)
==> eredis (compile)
==> erlzmq (compile)
Compiling c_src/erlzmq_nif.c
c_src/erlzmq_nif.c: In function ‘erlzmq_nif_setsockopt’:
c_src/erlzmq_nif.c:344:10: error: ‘ZMQ_LINGER’ undeclared (first use in this function)
c_src/erlzmq_nif.c:344:10: note: each undeclared identifier is reported only once for each function it appears in
c_src/erlzmq_nif.c:345:10: error: ‘ZMQ_RECONNECT_IVL’ undeclared (first use in this function)
c_src/erlzmq_nif.c:346:10: error: ‘ZMQ_BACKLOG’ undeclared (first use in this function)
c_src/erlzmq_nif.c: In function ‘erlzmq_nif_getsockopt’:
c_src/erlzmq_nif.c:395:10: error: ‘ZMQ_RECOVERY_IVL_MSEC’ undeclared (first use in this function)
c_src/erlzmq_nif.c:434:10: error: ‘ZMQ_TYPE’ undeclared (first use in this function)
c_src/erlzmq_nif.c:435:10: error: ‘ZMQ_LINGER’ undeclared (first use in this function)
c_src/erlzmq_nif.c:436:10: error: ‘ZMQ_RECONNECT_IVL’ undeclared (first use in this function)
c_src/erlzmq_nif.c:437:10: error: ‘ZMQ_RECONNECT_IVL_MAX’ undeclared (first use in this function)
c_src/erlzmq_nif.c:438:10: error: ‘ZMQ_BACKLOG’ undeclared (first use in this function)
c_src/erlzmq_nif.c:439:10: error: ‘ZMQ_FD’ undeclared (first use in this function)
ERROR: $CC -c $CFLAGS $DRV_CFLAGS c_src/erlzmq_nif.c -o c_src/erlzmq_nif.o failed with error: 1
make: *** [all] Error 1

Otherwise, if I go to the directory where it downloaded erlzmq2 and execute "make", it works fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment