You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to compile cannedbgp against libbgpdump-1.4.99.13 on a standard Ubuntu 12.04 LTS install, but I am getting these errors, are there some extra libraries I need to included?
root@test-03:/source/cannedbgp# make
gcc -g -o cannedbgp pkg-config --libs "libevent" -L../bgpdump -Wl,-rpath,../bgpdump -lbgpdump -lrt main.o
main.o: In function peer_ev_read': /home/test/source/cannedbgp/main.c:133: undefined reference tobufferevent_get_input'
/home/test/source/cannedbgp/main.c:134: undefined reference to evbuffer_get_length' /home/test/source/cannedbgp/main.c:137: undefined reference toevbuffer_drain'
main.o: In function peer_put_message': /home/test/source/cannedbgp/main.c:146: undefined reference tobufferevent_write'
/home/test/source/cannedbgp/main.c:148: undefined reference to evbuffer_get_length' /home/test/source/cannedbgp/main.c:149: undefined reference tobufferevent_write'
/home/test/source/cannedbgp/main.c:151: undefined reference to bufferevent_write_buffer' main.o: In functionpeer_ev_write':
/home/test/source/cannedbgp/main.c:157: undefined reference to evbuffer_new' /home/test/source/cannedbgp/main.c:166: undefined reference tobufferevent_disable'
/home/test/source/cannedbgp/main.c:170: undefined reference to evbuffer_add' /home/test/source/cannedbgp/main.c:171: undefined reference toevbuffer_add'
/home/test/source/cannedbgp/main.c:173: undefined reference to evbuffer_add' /home/test/source/cannedbgp/main.c:174: undefined reference toevbuffer_add'
/home/test/source/cannedbgp/main.c:178: undefined reference to evbuffer_add' main.o:/home/test/source/cannedbgp/main.c:179: more undefined references toevbuffer_add' follow
main.o: In function peer_ev_write': /home/test/source/cannedbgp/main.c:188: undefined reference toevbuffer_free'
/home/test/source/cannedbgp/main.c:192: undefined reference to clock_gettime' main.o: In functionpeer_send_open':
/home/test/source/cannedbgp/main.c:216: undefined reference to evbuffer_new' /home/test/source/cannedbgp/main.c:228: undefined reference toevbuffer_add'
/home/test/source/cannedbgp/main.c:233: undefined reference to evbuffer_add' /home/test/source/cannedbgp/main.c:234: undefined reference toevbuffer_add'
/home/test/source/cannedbgp/main.c:235: undefined reference to evbuffer_add' /home/test/source/cannedbgp/main.c:236: undefined reference toevbuffer_add'
main.o:/home/test/source/cannedbgp/main.c:237: more undefined references to evbuffer_add' follow main.o: In functionpeer_send_open':
/home/test/source/cannedbgp/main.c:240: undefined reference to evbuffer_free' main.o: In functionpeer_send_keepalive':
/home/test/source/cannedbgp/main.c:245: undefined reference to evbuffer_new' /home/test/source/cannedbgp/main.c:248: undefined reference toevbuffer_add'
/home/test/source/cannedbgp/main.c:250: undefined reference to bufferevent_enable' /home/test/source/cannedbgp/main.c:251: undefined reference toevbuffer_free'
main.o: In function peer_ev_other': /home/test/source/cannedbgp/main.c:279: undefined reference tobufferevent_free'
main.o: In function evt_info_tick': /home/test/source/cannedbgp/main.c:312: undefined reference toclock_gettime'
main.o: In function main': /home/test/source/cannedbgp/main.c:444: undefined reference tobgpdump_open_dump'
/home/test/source/cannedbgp/main.c:450: undefined reference to bgpdump_read_next' /home/test/source/cannedbgp/main.c:451: undefined reference totable_dump_v2_peer_index_table'
/home/test/source/cannedbgp/main.c:452: undefined reference to table_dump_v2_peer_index_table' /home/test/source/cannedbgp/main.c:456: undefined reference totable_dump_v2_peer_index_table'
/home/test/source/cannedbgp/main.c:457: undefined reference to table_dump_v2_peer_index_table' /home/test/source/cannedbgp/main.c:500: undefined reference totable_dump_v2_peer_index_table'
main.o:/home/test/source/cannedbgp/main.c:504: more undefined references to table_dump_v2_peer_index_table' follow main.o: In functionmain':
/home/test/source/cannedbgp/main.c:553: undefined reference to bgpdump_read_next' /home/test/source/cannedbgp/main.c:556: undefined reference tobgpdump_free_mem'
/home/test/source/cannedbgp/main.c:568: undefined reference to bgpdump_close_dump' /home/test/source/cannedbgp/main.c:570: undefined reference toevent_base_new'
/home/test/source/cannedbgp/main.c:582: undefined reference to bufferevent_socket_new' /home/test/source/cannedbgp/main.c:583: undefined reference tobufferevent_setcb'
/home/test/source/cannedbgp/main.c:584: undefined reference to bufferevent_setwatermark' /home/test/source/cannedbgp/main.c:585: undefined reference tobufferevent_setwatermark'
/home/test/source/cannedbgp/main.c:586: undefined reference to bufferevent_enable' /home/test/source/cannedbgp/main.c:591: undefined reference toevent_new'
/home/test/source/cannedbgp/main.c:594: undefined reference to event_add' /home/test/source/cannedbgp/main.c:596: undefined reference toevent_new'
/home/test/source/cannedbgp/main.c:599: undefined reference to event_add' /home/test/source/cannedbgp/main.c:601: undefined reference toclock_gettime'
/home/test/source/cannedbgp/main.c:605: undefined reference to `event_base_loop'
collect2: ld returned 1 exit status
make: *** [cannedbgp] Error 1
root@test-03:/source/cannedbgp#
The text was updated successfully, but these errors were encountered:
On Wed, Mar 13, 2013 at 12:53:10PM -0700, Job Snijders wrote:
I'm trying to compile cannedbgp against libbgpdump-1.4.99.13 on a standard Ubuntu 12.04 LTS install, but I am getting these errors, are there some extra libraries I need to included?
Looks like all symbols from all libraries are missing. This is
probably due to...
root@test-03:~/source/cannedbgp# make
gcc -g -o cannedbgp pkg-config --libs "libevent" -L../bgpdump -Wl,-rpath,../bgpdump -lbgpdump -lrt main.o
main.o: In function `peer_ev_read':
... Ubuntu using a recent linker with --as-needed, which makes ordering
of the libraries relevant. In the Makefile, try moving "main.o" up
front (directly after "-o cannedbgp".
-David
P.S.: This tool was written for internal testing purposes and is
provided as-is. It may blow up your PC, eat your cat, inject bogus
routes into the DFZ, ...
I'm trying to compile cannedbgp against libbgpdump-1.4.99.13 on a standard Ubuntu 12.04 LTS install, but I am getting these errors, are there some extra libraries I need to included?
root@test-03:
/source/cannedbgp# make/source/cannedbgp#gcc -g -o cannedbgp
pkg-config --libs "libevent"
-L../bgpdump -Wl,-rpath,../bgpdump -lbgpdump -lrt main.omain.o: In function
peer_ev_read': /home/test/source/cannedbgp/main.c:133: undefined reference to
bufferevent_get_input'/home/test/source/cannedbgp/main.c:134: undefined reference to
evbuffer_get_length' /home/test/source/cannedbgp/main.c:137: undefined reference to
evbuffer_drain'main.o: In function
peer_put_message': /home/test/source/cannedbgp/main.c:146: undefined reference to
bufferevent_write'/home/test/source/cannedbgp/main.c:148: undefined reference to
evbuffer_get_length' /home/test/source/cannedbgp/main.c:149: undefined reference to
bufferevent_write'/home/test/source/cannedbgp/main.c:151: undefined reference to
bufferevent_write_buffer' main.o: In function
peer_ev_write':/home/test/source/cannedbgp/main.c:157: undefined reference to
evbuffer_new' /home/test/source/cannedbgp/main.c:166: undefined reference to
bufferevent_disable'/home/test/source/cannedbgp/main.c:170: undefined reference to
evbuffer_add' /home/test/source/cannedbgp/main.c:171: undefined reference to
evbuffer_add'/home/test/source/cannedbgp/main.c:173: undefined reference to
evbuffer_add' /home/test/source/cannedbgp/main.c:174: undefined reference to
evbuffer_add'/home/test/source/cannedbgp/main.c:178: undefined reference to
evbuffer_add' main.o:/home/test/source/cannedbgp/main.c:179: more undefined references to
evbuffer_add' followmain.o: In function
peer_ev_write': /home/test/source/cannedbgp/main.c:188: undefined reference to
evbuffer_free'/home/test/source/cannedbgp/main.c:192: undefined reference to
clock_gettime' main.o: In function
peer_send_open':/home/test/source/cannedbgp/main.c:216: undefined reference to
evbuffer_new' /home/test/source/cannedbgp/main.c:228: undefined reference to
evbuffer_add'/home/test/source/cannedbgp/main.c:233: undefined reference to
evbuffer_add' /home/test/source/cannedbgp/main.c:234: undefined reference to
evbuffer_add'/home/test/source/cannedbgp/main.c:235: undefined reference to
evbuffer_add' /home/test/source/cannedbgp/main.c:236: undefined reference to
evbuffer_add'main.o:/home/test/source/cannedbgp/main.c:237: more undefined references to
evbuffer_add' follow main.o: In function
peer_send_open':/home/test/source/cannedbgp/main.c:240: undefined reference to
evbuffer_free' main.o: In function
peer_send_keepalive':/home/test/source/cannedbgp/main.c:245: undefined reference to
evbuffer_new' /home/test/source/cannedbgp/main.c:248: undefined reference to
evbuffer_add'/home/test/source/cannedbgp/main.c:250: undefined reference to
bufferevent_enable' /home/test/source/cannedbgp/main.c:251: undefined reference to
evbuffer_free'main.o: In function
peer_ev_other': /home/test/source/cannedbgp/main.c:279: undefined reference to
bufferevent_free'main.o: In function
evt_info_tick': /home/test/source/cannedbgp/main.c:312: undefined reference to
clock_gettime'main.o: In function
main': /home/test/source/cannedbgp/main.c:444: undefined reference to
bgpdump_open_dump'/home/test/source/cannedbgp/main.c:450: undefined reference to
bgpdump_read_next' /home/test/source/cannedbgp/main.c:451: undefined reference to
table_dump_v2_peer_index_table'/home/test/source/cannedbgp/main.c:452: undefined reference to
table_dump_v2_peer_index_table' /home/test/source/cannedbgp/main.c:456: undefined reference to
table_dump_v2_peer_index_table'/home/test/source/cannedbgp/main.c:457: undefined reference to
table_dump_v2_peer_index_table' /home/test/source/cannedbgp/main.c:500: undefined reference to
table_dump_v2_peer_index_table'main.o:/home/test/source/cannedbgp/main.c:504: more undefined references to
table_dump_v2_peer_index_table' follow main.o: In function
main':/home/test/source/cannedbgp/main.c:553: undefined reference to
bgpdump_read_next' /home/test/source/cannedbgp/main.c:556: undefined reference to
bgpdump_free_mem'/home/test/source/cannedbgp/main.c:568: undefined reference to
bgpdump_close_dump' /home/test/source/cannedbgp/main.c:570: undefined reference to
event_base_new'/home/test/source/cannedbgp/main.c:582: undefined reference to
bufferevent_socket_new' /home/test/source/cannedbgp/main.c:583: undefined reference to
bufferevent_setcb'/home/test/source/cannedbgp/main.c:584: undefined reference to
bufferevent_setwatermark' /home/test/source/cannedbgp/main.c:585: undefined reference to
bufferevent_setwatermark'/home/test/source/cannedbgp/main.c:586: undefined reference to
bufferevent_enable' /home/test/source/cannedbgp/main.c:591: undefined reference to
event_new'/home/test/source/cannedbgp/main.c:594: undefined reference to
event_add' /home/test/source/cannedbgp/main.c:596: undefined reference to
event_new'/home/test/source/cannedbgp/main.c:599: undefined reference to
event_add' /home/test/source/cannedbgp/main.c:601: undefined reference to
clock_gettime'/home/test/source/cannedbgp/main.c:605: undefined reference to `event_base_loop'
collect2: ld returned 1 exit status
make: *** [cannedbgp] Error 1
root@test-03:
The text was updated successfully, but these errors were encountered: