Closed Zxy675272387 closed 5 years ago
You need libevent2. What OS are you using?
debian 9.5 and my libevent version is libevent-2.1.10-stable
libevent on my system is 2.0.21. If the API were incompatible, lsquic would not have compiled -- but what you are getting are link errors.
I just downloaded libevent 2.1.10 and compiled, linked, and ran lsquic using it:
cmake -DCMAKE_LIBRARY_PATH=$HOME/local/lib -DCMAKE_INCLUDE_PATH=$HOME/local/include .
I don't know why it fails on your system.
I enter the source file http_client.c,find you use include<event2/event.h>,but on my os ,if I include<event2/event.h>to use libevent it can't be compiled. If I change the include into include
It may be because you don't have libevent development package installed. On Ubuntu, libevent header files are in /usr/include/event2
and are distrubuted in libevent-dev
package. I don't have experience with Debian, but it should be similar.
If everything else fails, you can do what I did above: compile and install a separate copy of libevent and use that.
I find why,because my libevent and libevent-dev seems are not the same version,after I change to 2.0.21,there is no error,but the make msg is : 35%] Built target lsquic [ 35%] Built target http_client [ 35%] Built target graph_cubic [ 35%] Built target test_frame_rw [ 35%] Built target test_wuf_gquic_le [ 35%] Built target test_wuf_gquic_be [ 35%] Built target test_ver_nego [ 35%] Built target test_export_key [ 35%] Built target test_stream [ 35%] Built target test_frame_chop [ 35%] Built target test_streamgen [ 35%] Built target test_di_nocopy [ 35%] Built target test_cubic [ 35%] Built target test_engine_ctor [ 35%] Built target test_blocked_gquic_be [ 35%] Built target test_reg_pkt_headergen [ 35%] Built target test_conn_hash [ 35%] Built target test_goaway_gquic_be [ 35%] Built target test_frame_writer [ 35%] Built target test_packno_len [ 35%] Built target test_ackparse_gquic_le [ 35%] Built target test_qlog [ 35%] Built target test_spi [ 35%] Built target test_ackparse_gquic_be [ 35%] Built target test_packet_out [ 35%] Built target test_rst_stream_gquic_be [ 35%] Built target test_conn_close_gquic_le [ 35%] Built target test_ackgen_gquic_be [ 35%] Built target test_conn_close_gquic_be [ 35%] Built target test_rtt [ 35%] Built target test_ackgen_gquic_le [ 35%] Built target test_dec [ 35%] Built target test_lsquic_hash [ 35%] Built target test_attq [ 35%] Built target test_alarmset [ 35%] Built target test_arr [ 35%] Built target test_blocked_gquic_le [ 35%] Built target test_some_packets [ 35%] Built target test_parse_packet_in [ 35%] Built target test_elision [ 35%] Built target test_goaway_gquic_le [ 35%] Built target test_buf [ 35%] Built target test_quic_be_floats [ 35%] Built target test_rechist [ 35%] Built target test_frame_reader [ 35%] Built target test_hkdf [ 35%] Built target test_malo [ 35%] Built target test_quic_le_floats [ 35%] Built target test_rst_stream_gquic_le [ 35%] Built target test_senhist [ 35%] Built target test_set [ 35%] Built target test_sfcw [ 35%] Built target test_stop_waiting_gquic_be [ 35%] Built target test_stop_waiting_gquic_le [ 35%] Built target test_streamparse
there is no error,but the make msg is
Yes, those are test files: by default, everything is built. You can type make http_client
to compile just the client program.
No feedback for a while -- closing bug.
when I cd lsquic-client and make,the errors as below,it seems that my libevent version is not suitable,but I don't know how fix it [ 35%] Linking C executable http_client CMakeFiles/http_client.dir/test/http_client.c.o: In function
create_another_conn_or_stop': /home/b/quictest/lsquic/lsquic-client/test/http_client.c:292: undefined reference to
event_free' CMakeFiles/http_client.dir/test/http_client.c.o: In functionhttp_client_on_conn_closed': /home/b/quictest/lsquic/lsquic-client/test/http_client.c:332: undefined reference to
event_new' CMakeFiles/http_client.dir/test/prog.c.o: In functionprog_run': /home/b/quictest/lsquic/lsquic-client/test/prog.c:345: undefined reference to
event_new'