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

Build is failing on Mac OS X Lion 7.3 #45

Closed
kishendas opened this issue Apr 24, 2012 · 10 comments
Closed

Build is failing on Mac OS X Lion 7.3 #45

kishendas opened this issue Apr 24, 2012 · 10 comments

Comments

@kishendas
Copy link

$ make
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o webdis.o webdis.c
In file included from webdis.c:1:
./server.h:4:10: fatal error: 'event.h' file not found

include <event.h>

     ^

1 error generated.
make: *** [webdis.o] Error 1

@nicolasff
Copy link
Owner

You need to install libevent. Please refer to the README for instructions.

@kishendas
Copy link
Author

Do I also have to install hiredis ? I am getting the below error now. I have libevent installed.

$ make
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o webdis.o webdis.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o cmd.o cmd.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o worker.o worker.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o slog.o slog.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o server.o server.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o libb64/cencode.o libb64/cencode.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o acl.o acl.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o md5/md5.o md5/md5.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o sha1/sha1.o sha1/sha1.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o http.o http.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o client.o client.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o websocket.o websocket.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o pool.o pool.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o conf.o conf.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o formats/json.o formats/json.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o formats/raw.o formats/raw.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o formats/common.o formats/common.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o formats/custom-type.o formats/custom-type.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o formats/bson.o formats/bson.c
cc -c -O3 -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o hiredis/hiredis.o hiredis/hiredis.c
hiredis/hiredis.c:827:31: error: second argument to 'va_arg' is of incomplete type 'void'
va_arg(ap,void);
~~~~~~~~~~^~~~~
/usr/bin/../lib/clang/3.1/include/stdarg.h:35:50: note: expanded from macro 'va_arg'
#define va_arg(ap, type) __builtin_va_arg(ap, type)
^
1 error generated.
make: *** [hiredis/hiredis.o] Error 1

@nicolasff
Copy link
Owner

No, hired is is bundled. This seems to be an issue when compiling with clang; I'll try to reproduce it.

@nicolasff nicolasff reopened this Apr 24, 2012
@nicolasff
Copy link
Owner

I have updated hiredis, which should fix this issue. Could you please try out the latest master?

@kishendas
Copy link
Author

Looks good now. Thanks.
Btw I am not able to connect to webdis, although the thread is up.
Below is the list of commands that I tried - ( Sorry if I am doing something very basic wrong )
$ ./webdis &
[2] 31597
$ curl http://127.0.0.1:31597/SET/hello/world
curl: (7) couldn't connect to host
[2]+ Done ./webdis
$ curl http://127.0.0.1:7379/SET/hello/world
$

@nicolasff
Copy link
Owner

What you wrote seems wrong; you started webdis and that created a process with PID 31597 and you tried to connect to TCP port 31597. I assume you then killed webdis (seeing as it shows Done ./webdis), and then tried to connect to the right port, 7379.

Run it, and connect to port 7379. You can use curl -v to get more details.

@kishendas
Copy link
Author

Right, initially I gave the process id by mistake for the port, but corrected it later.
So, this command seems to be killing the webdis process -> $ curl http://127.0.0.1:31597/SET/hello/world .
Anyway with -v options its giving Http 503 ( Service unavailable) -

$ curl -v http://127.0.0.1:7379/SET/hello/world

  • About to connect() to 127.0.0.1 port 7379 (#0)
  • Trying 127.0.0.1... connected
  • Connected to 127.0.0.1 (127.0.0.1) port 7379 (#0)

    GET /SET/hello/world HTTP/1.1
    User-Agent: curl/7.21.4 libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
    Host: 127.0.0.1:7379
    Accept: /

    < HTTP/1.1 503 Service Unavailable
    < Server: Webdis
    < Allow: GET,POST,PUT,OPTIONS
    < Access-Control-Allow-Origin: *
    < Connection: Keep-Alive
    < Content-Length: 0
    <
  • Connection #0 to host 127.0.0.1 left intact
  • Closing connection #0

@nicolasff
Copy link
Owner

Is redis running? I tried with redis running and it returned {"SET":[true,"OK"]}. 503 Service Unavailable means that webdis couldn't connect to redis.

@kishendas
Copy link
Author

Redis was running. I killed both redis and webdis processes and started them again. It looks good now.
Btw does webdis persists the number of client connections to redis ?
Are there any documents/examples or I would have to look at the code to learn more about Webdis.
My requirement is to support web-analytics for about 500 million concurrent users.
Thanks for all the help.

@nicolasff
Copy link
Owner

Great!

I'm glad to know it's working now. I'm not sure exactly what you mean, but webdis maintains persistent connections to redis, although it doesn't record the number of connections that have been made to itself.

For further references you can look at the code, or ask me here on GitHub or by email, no preference. I'd be interested to see how far you can scale redis and webdis.

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

No branches or pull requests

2 participants