webdis icon indicating copy to clipboard operation
webdis copied to clipboard

Build fail in Mac 10.9.3

Open PrithivirajDamodaran opened this issue 9 years ago • 6 comments

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

include <event.h>

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

PrithivirajDamodaran avatar Mar 09 '15 07:03 PrithivirajDamodaran

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

keithhamilton avatar Jun 18 '15 17:06 keithhamilton

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

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

christofur avatar Jun 23 '15 11:06 christofur

@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.

breda avatar Oct 29 '15 17:10 breda

@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

gavincabbage avatar Dec 03 '15 19:12 gavincabbage

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>
         ^~~~~~~~~~~~~~~~~

DeezSmith avatar Feb 09 '16 16:02 DeezSmith

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

freeatnet avatar Apr 18 '16 16:04 freeatnet