libevhtp icon indicating copy to clipboard operation
libevhtp copied to clipboard

libevhtp-1.2.18 doesn't build against libevent 2.1.8-stable

Open deadeyegoodwin opened this issue 5 years ago • 1 comments

Details

Building on Ubuntu 16.04.

The problem seems to be that libevent creates its configuration files with name prefix "Libevent" (like LibeventConfig.cmake), but evhtp uses "find_package(LibEvent REQUIRED)" here https://github.com/criticalstack/libevhtp/blob/1.2.18/CMakeLists.txt#L57.

It should be "find_package(Libevent REQUIRED)". Note the lower-case 'e'.

Steps or code to reproduce the problem.

  • Get libevent https://github.com/libevent/libevent/archive/release-2.1.8-stable.tar.gz
  • mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=/tmp/libevent_install .. && make install
  • Get libevhtp 1.2.18
  • cd build && cmake -DLibevent_DIR=/tmp/libevent_install/lib/cmake/libevent ..

cmake will fail saying it can't find LIBEVENT_INCLUDE_DIR and other libevent artifacts.

  • edit CMakeLists.txt to have "find_package(Libevent REQUIRED)"
  • cd build && cmake -DLibevent_DIR=/tmp/libevent_install/lib/cmake/libevent .. && make

Builds correctly...

Version

1.2.18

deadeyegoodwin avatar May 06 '19 22:05 deadeyegoodwin

There is also another LibEvent that needs to be changed to Libevent in CMakeLists.txt. Here: https://github.com/criticalstack/libevhtp/blob/1.2.18/CMakeLists.txt#L60

deadeyegoodwin avatar May 07 '19 19:05 deadeyegoodwin