nicolasff / webdis

A Redis HTTP interface with JSON output
https://webd.is
BSD 2-Clause "Simplified" License
2.84k stars 304 forks source link

Build fail in Mac 10.9.3 #115

Open PrithivirajDamodaran opened 9 years ago

PrithivirajDamodaran commented 9 years ago

./server.h:4:10: fatal error: 'event.h' file not found

include

I have installed libevent 2.2 using brew but still getting the same issue.

keithhamilton commented 9 years ago

I am also getting this error in Ubuntu 14.04. Installed build tools with build-essential.

christofur commented 9 years ago

Hi, check out https://github.com/nicolasff/webdis/issues/45

I was also having this problem in Ubuntu 14.04 until I installed libevent.

breda commented 8 years ago

@PrithivirajDamodaran
It is because homebrew installs the packages in a different directory (/usr/local/Cellar). So, what you have to do is to link the header files before running make :

export CFLAGS="-I /usr/local/Cellar/libevent/2.0.22/include"
make

Note: I have libevent 2.0.22 installed, change the path if you have a different version. @keithhamilton Do the same thing, just change the path to where the libevent is installed.

gavincabbage commented 8 years ago

@breda - Your solution resulted in the following error. Do you know where the package is installed when installed with apt-get? I'm thinking a symlink or something might solve the problem, but don't know the where the package is normally located when not in usr/local/Cellar. Any ideas?

In file included from webdis.c:1:
./server.h:5:10: error: 'hiredis/async.h' file not found with <angled> include;
      use "quotes" instead
#include <hiredis/async.h>
         ^~~~~~~~~~~~~~~~~
         "hiredis/async.h"
1 error generated.
make: *** [webdis.o] Error 1
DeezSmith commented 8 years ago

I'm having the same issue after running the export

cc -c -I /usr/local/Cellar/libevent/2.0.21_1/include -o webdis.o webdis.c
In file included from webdis.c:1:
./server.h:5:10: error: 'hiredis/async.h' file not found with <angled> include;
      use "quotes" instead
#include <hiredis/async.h>
         ^~~~~~~~~~~~~~~~~
freeatnet commented 8 years ago

For anyone still interested, I helped a friend fix this issue by updating XCode's command line utilities.