[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[Libevent-users] Unable to compile libevent 2.0.18



Hi,

I just downloaded libevent source and tried to compile it. However, I got the following error

======== make output ======

make  all-recursive
make[1]: Entering directory `/usr/src/libevent-2.0.18-stable'
Making all in .
make[2]: Entering directory `/usr/src/libevent-2.0.18-stable'
/bin/bash ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.  -I./compat -I./include -I./include    -g -O2 -Wall -fno-strict-aliasing -pthread -MT event.lo -MD -MP -MF .deps/event.Tpo -c -o event.lo event.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I./compat -I./include -I./include -g -O2 -Wall -fno-strict-aliasing -pthread -MT event.lo -MD -MP -MF .deps/event.Tpo -c event.c  -fPIC -DPIC -o .libs/event.o
In file included from event.c:27:0:
./include/event2/event-config.h:18:3: error: expected identifier or '(' before '/' token
In file included from event.c:35:0:
/usr/include/x86_64-linux-gnu/sys/types.h:34:1: error: unknown type name '__u_char'
make[2]: *** [event.lo] Error 1
make[2]: Leaving directory `/usr/src/libevent-2.0.18-stable'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/libevent-2.0.18-stable'
make: *** [all] Error 2


======= ./configure output ======

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking whether ln -s works... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether gcc needs -traditional... no
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for library containing inet_ntoa... none required
checking for library containing socket... none required
checking for library containing inet_aton... none required
checking for library containing clock_gettime... -lrt
checking for library containing sendfile... none required
checking for WIN32... no
checking for CYGWIN... no
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for library containing inflateEnd... -lz
checking openssl/bio.h usability... yes
checking openssl/bio.h presence... yes
checking for openssl/bio.h... yes
checking for library containing SSL_new... -lssl
checking for ANSI C header files... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking for unistd.h... (cached) yes
checking sys/epoll.h usability... yes
checking sys/epoll.h presence... yes
checking for sys/epoll.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/queue.h usability... yes
checking sys/queue.h presence... yes
checking for sys/queue.h... yes
checking sys/event.h usability... no
checking sys/event.h presence... no
checking for sys/event.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/devpoll.h usability... no
checking sys/devpoll.h presence... no
checking for sys/devpoll.h... no
checking port.h usability... no
checking port.h presence... no
checking for port.h... no
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking netinet/in6.h usability... no
checking netinet/in6.h presence... no
checking for netinet/in6.h... no
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking sys/eventfd.h usability... yes
checking sys/eventfd.h presence... yes
checking for sys/eventfd.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/sendfile.h usability... yes
checking sys/sendfile.h presence... yes
checking for sys/sendfile.h... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking for sys/sysctl.h... yes
checking for TAILQ_FOREACH in sys/queue.h... yes
checking for timeradd in sys/time.h... yes
checking for timercmp in sys/time.h... yes
checking for timerclear in sys/time.h... yes
checking for timerisset in sys/time.h... yes
checking whether CTL_KERN is declared... yes
checking whether KERN_RANDOM is declared... yes
checking whether RANDOM_UUID is declared... yes
checking whether KERN_ARND is declared... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether time.h and sys/time.h may both be included... yes
checking for gettimeofday... yes
checking for vasprintf... yes
checking for fcntl... yes
checking for clock_gettime... yes
checking for strtok_r... yes
checking for strsep... yes
checking for getnameinfo... yes
checking for strlcpy... no
checking for inet_ntop... yes
checking for inet_pton... yes
checking for signal... yes
checking for sigaction... yes
checking for strtoll... yes
checking for inet_aton... yes
checking for pipe... yes
checking for eventfd... yes
checking for sendfile... yes
checking for mmap... yes
checking for splice... yes
checking for arc4random... no
checking for arc4random_buf... no
checking for issetugid... no
checking for geteuid... yes
checking for getegid... yes
checking for getprotobynumber... yes
checking for setenv... yes
checking for unsetenv... yes
checking for putenv... yes
checking for sysctl... yes
checking for getaddrinfo... yes
checking size of long... 8
checking for F_SETFD in fcntl.h... yes
checking for select... yes
checking for poll... yes
checking for epoll_ctl... yes
checking for port_create... no
checking for pid_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking for uint64_t... yes
checking for uint32_t... yes
checking for uint16_t... yes
checking for uint8_t... yes
checking for uintptr_t... yes
checking for fd_mask... yes
checking size of long long... 8
checking size of long... (cached) 8
checking size of int... 4
checking size of short... 2
checking size of size_t... 8
checking size of void *... 8
checking for struct in6_addr... yes
checking for struct sockaddr_in6... yes
checking for sa_family_t... yes
checking for struct addrinfo... yes
checking for struct sockaddr_storage... yes
checking for struct in6_addr.s6_addr32... yes
checking for struct in6_addr.s6_addr16... yes
checking for struct sockaddr_in.sin_len... no
checking for struct sockaddr_in6.sin6_len... no
checking for struct sockaddr_storage.ss_family... yes
checking for struct sockaddr_storage.__ss_family... no
checking for socklen_t... yes
checking whether our compiler supports __func__... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking size of pthread_t... 8
configure: creating ./config.status
config.status: creating libevent.pc
config.status: creating libevent_openssl.pc
config.status: creating libevent_pthreads.pc
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating test/Makefile
config.status: creating sample/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands


===========================

Here is the output of uname -a

Linux li423-94 3.0.18-x86_64-linode24 #1 SMP Mon Jan 30 14:25:46 EST 2012 x86_64 x86_64 x86_64 GNU/Linux

This is a Linode small instance (Xen-based)

No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 11.10
Release:    11.10
Codename:    oneiric


Am I doing anything wrong here? I compiled and installed this library successfully on a Ubuntu 11.10 dedicated server. Not sure why it can not be compiled on a Xen-based Ubuntu 11.10 VM instance provided by Linode.


Thanks


Dinh