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

Build Issue: " event2/event.h: No such file or directory " #41

Closed
stormcenter opened this issue Jul 13, 2018 · 6 comments
Closed

Build Issue: " event2/event.h: No such file or directory " #41

stormcenter opened this issue Jul 13, 2018 · 6 comments

Comments

@stormcenter
Copy link
Contributor

I found build issue on linux and mac os , both are the same error.

Here is the log:

/home/zhangchi09/develop/lsquic-client/test/prog.c:19:26: fatal error: event2/event.h: No such file or directory
compilation terminated.
CMakeFiles/http_client.dir/build.make:86: recipe for target 'CMakeFiles/http_client.dir/test/prog.c.o' failed
make[2]: *** [CMakeFiles/http_client.dir/test/prog on.c.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/http_client.dir/all' failed
make[1]: *** [CMakeFiles/http_client.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

pls help me to find out the solution , thx.

@dtikhonov
Copy link
Contributor

You need the libevent library and header files to build lsquic-client. libevent is packaged for all major distributions. On Ubuntu, for example, you'd type apt-get install libevent-dev to install it.

@litespeedtech
Copy link
Owner

This is a duplicate of #5 -- closing.

@stormcenter
Copy link
Contributor Author

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 18ee662..cd19cd2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,8 +106,7 @@ link_directories( ${BORINGSSL_LIB} )

SET(CMAKE_INCLUDE_CURRENT_DIR ON)
include_directories( include )

-IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# Find libevent on FreeBSD:
include_directories( /usr/local/include )
link_directories( /usr/local/lib )

I think you missing Darwin jundagement on CMakeLists.txt

@dtikhonov
Copy link
Contributor

I think "jundagement" is a misspelled word, but I am not sure which one. 😄 I am not sure what you mean.

@stormcenter
Copy link
Contributor Author

I mean ”CMAKE_SYSTEM_NAME“ only matchs FreeBSD, so it doesn't include "/usr/local/include" and "/usr/local/lib" on Mac

@dtikhonov
Copy link
Contributor

Oh, I see -- thanks for the report. We will address it in the next release. (If you want to open a pull request for this, you are very welcome to do so!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants