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

Compile error: event.h: No such file or directory #22

Closed
TheNicholasNick opened this issue May 23, 2011 · 7 comments
Closed

Compile error: event.h: No such file or directory #22

TheNicholasNick opened this issue May 23, 2011 · 7 comments

Comments

@TheNicholasNick
Copy link

ruby-1.8.7-p334 user1@server webdis [master] $ 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:19: error: event.h: No such file or directory
In file included from webdis.c:1:
server.h:14: error: field 'ev' has incomplete type
make: *** [webdis.o] Error 1
ruby-1.8.7-p334 user1@server webdis [master] $ git commit 04774aa

I guess I'll just go backwards to commit: 07daf02
as that is working on my dev machine :)

@TheNicholasNick
Copy link
Author

ok that didn't work - i'm guessing then I don't have something installed.

yeap - didn't have libevent installed, hence why it couldn't find event.h I suppose.

last code works - woohoo :)

@nicolasff
Copy link
Owner

Hi,

It looks like you don't have the development package for libevent.
Could you check that?

Nicolas

On 23 May 2011, at 06:58, SoreGumsreply@reply.github.com wrote:

ruby-1.8.7-p334 user1@server webdis [master] $ 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:19: error: event.h: No such file or directory
In file included from webdis.c:1:
server.h:14: error: field 'ev' has incomplete type
make: *** [webdis.o] Error 1
ruby-1.8.7-p334 user1@server webdis [master] $ git commit 04774aa

I guess I'll just go backwards to commit: 07daf02
as that is working on my dev machine :)

Reply to this email directly or view it on GitHub:
#22

@defender
Copy link

defender commented Jul 2, 2014

I have same issue and libevent-dev installed

@prajeeshmurukan
Copy link

libevent-dev installation worked for me

@dragnot
Copy link

dragnot commented Jun 28, 2017

I am having the same issue and i have lib even. any idea what version i am missing

redislabadm@ctoapp6 webdis-master]$ make
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o webdis.o webdis.c
In file included from webdis.c:1:0:
server.h:4:19: fatal error: event.h: No such file or directory
#include <event.h>
^
compilation terminated.
make: *** [webdis.o] Error 1
[redislabadm@ctoapp6 webdis-master]$ sudo instal libevent-*
sudo: instal: command not found
[redislabadm@ctoapp6 webdis-master]$ sudo install libevent-*
install: missing destination file operand after ‘libevent-
Try 'install --help' for more information.
[redislabadm@ctoapp6 webdis-master]$ sudo yum install libevent-

Loaded plugins: product-id, search-disabled-repos, subscription-manager
Package libevent-2.0.21-4.el7.x86_64 already installed and latest version
Nothing to do
[redislabadm@ctoapp6 webdis-master]$ make clean
rm -f webdis.o cmd.o worker.o slog.o server.o acl.o md5/md5.o sha1/sha1.o http.o client.o websocket.o pool.o conf.o formats/json.o formats/raw.o formats/common.o formats/custom-type.o hiredis/hiredis.o hiredis/sds.o hiredis/net.o hiredis/async.o hiredis/read.o hiredis/dict.o jansson/src/dump.o jansson/src/error.o jansson/src/hashtable.o jansson/src/load.o jansson/src/strbuffer.o jansson/src/utf.o jansson/src/value.o jansson/src/variadic.o http-parser/http_parser.o b64/cencode.o webdis
[redislabadm@ctoapp6 webdis-master]$ make all
cc -c -O0 -ggdb -Wall -Wextra -I. -Ijansson/src -Ihttp-parser -o webdis.o webdis.c
In file included from webdis.c:1:0:
server.h:4:19: fatal error: event.h: No such file or directory
#include <event.h>
^
compilation terminated.
make: *** [webdis.o] Error 1
[redislabadm@ctoapp6 webdis-master]$ yum list libevent
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Repo rhel-7-server-rpms forced skip_if_unavailable=True due to: /etc/pki/entitlement/8137755762607495637-key.pem
Repo rhel-7-server-rt-beta-rpms forced skip_if_unavailable=True due to: /etc/pki/entitlement/8137755762607495637-key.pem
Repo rhel-7-server-rt-rpms forced skip_if_unavailable=True due to: /etc/pki/entitlement/8137755762607495637-key.pem
Installed Packages
libevent.i686 2.0.21-4.el7 @rhel-7-server-rpms
libevent.x86_64 2.0.21-4.el7 @rhel-7-server-rpms

@jeanazuos
Copy link

libevent-dev installation works!

@claudede
Copy link

I have the problem as well

[claudede@ ~]$ sudo -s
[root@]# yum update
Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs) 57 kB/s | 4.5 kB 00:00
POstgress 14-8.7 33 kB/s | 1.8 kB 00:00
Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) 55 kB/s | 4.1 kB 00:00
Dependencies resolved.
Nothing to do.
Complete!
[root@]# yum list | grep -i libevent
libevent.x86_64 2.1.8-5.el8 @anaconda
libverto-libevent.x86_64 0.3.2-2.el8 @rhel-8-for-x86_64-baseos-rpms
libev-libevent-devel.i686 4.24-6.el8 rhel-8-for-x86_64-appstream-rpms
libev-libevent-devel.x86_64 4.24-6.el8 rhel-8-for-x86_64-appstream-rpms
libevent.i686 2.1.8-5.el8 rhel-8-for-x86_64-baseos-rpms
libevent-devel.i686 2.1.8-5.el8 rhel-8-for-x86_64-appstream-rpms
libevent-devel.x86_64 2.1.8-5.el8 rhel-8-for-x86_64-appstream-rpms
libevent-doc.noarch 2.1.8-5.el8 rhel-8-for-x86_64-baseos-rpms
libverto-libevent.i686 0.3.2-2.el8 rhel-8-for-x86_64-baseos-rpms
[root@]# cd /opt/webdis_git/webdis/
[root@ webdis]# ls
COPYING Dockerfile docs Makefile nicolasff.pub README.md src tests webdis.json webdis.prod.json
[root@ webdis]# make clean
rm -f src/webdis.o src/cmd.o src/worker.o src/slog.o src/server.o src/acl.o src/md5/md5.o src/sha1/sha1.o src/http.o src/client.o src/websocket.o src/pool.o src/conf.o src/formats/json.o src/formats/raw.o src/formats/common.o src/formats/custom-type.o src/hiredis/hiredis.o src/hiredis/sds.o src/hiredis/net.o src/hiredis/async.o src/hiredis/read.o src/hiredis/dict.o src/hiredis/alloc.o src/hiredis/sockcompat.o src/jansson/src/dump.o src/jansson/src/error.o src/jansson/src/hashtable.o src/jansson/src/load.o src/jansson/src/strbuffer.o src/jansson/src/utf.o src/jansson/src/value.o src/jansson/src/variadic.o src/http-parser/http_parser.o src/b64/cencode.o webdis
find "/opt/webdis_git/webdis" -name '*.d' -delete
[root@ webdis]# make all
cc -c -std=c99 -Wall -Wextra -Isrc -Isrc/jansson/src -Isrc/http-parser -MD -D_POSIX_C_SOURCE=200809L -Wno-pragmas -O3 -o src/webdis.o src/webdis.c
In file included from src/webdis.c:1:
src/server.h:4:10: fatal error: event.h: No such file or directory
#include <event.h>
^~~~~~~~~
compilation terminated.
make: *** [Makefile:103: src/webdis.o] Error 1
[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

7 participants