Sorry for the truncated email. Getting a linker error using libevent 2.1:
marcog@marcog-VirtualBox:~/Cometa/cometa-mt/server$ make cc -Wall -g -I./include -L/usr/local/lib -levent -o cometa cometa.o request.o http_parser.o config.o rsyslog.o response.o routes.o api.o info.o webhooks.o websockets.o -l:libevent-2.1.so.5 -l:libevent_pthreads-2.1.so.5 -lpthread -lcrypto -lm -ldl -lwebsock -lconfig -lssl -lworkqueue -lbeanstalk /usr/bin/ld: cometa.o: undefined reference to symbol 'event_base_add_virtual' /usr/local/lib/libevent-2.0.so.5: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make: *** [cometa] Error 1 While everything is fine with libevent 2.0: marcog@marcog-VirtualBox:~/Cometa/cometa-mt/server$ make cc -Wall -g -I./include -L/usr/local/lib -levent -o cometa cometa.o request.o http_parser.o config.o rsyslog.o response.o routes.o api.o info.o webhooks.o websockets.o -l:libevent-2.0.so.5 -l:libevent_pthreads-2.0.so.5 -lpthread -lcrypto -lm -ldl -lwebsock -lconfig -lssl -lworkqueue -lbeanstalk The symbol is defined in both libraries: marcog@marcog-VirtualBox:~$ nm /usr/local/lib/libevent-2.1.so.5 | grep event_base_add_virtual 0000000000022b80 T event_base_add_virtual_ marcog@marcog-VirtualBox:~$ nm /usr/local/lib/libevent-2.0.so.5 | grep event_base_add_virtual 00000000000134f0 T event_base_add_virtual And the linker cache seems fine: marcog@marcog-VirtualBox:~/Cometa/cometa-mt/server$ ldconfig -p | grep libevent libevent_pthreads-2.1.so.5 (libc6,x86-64) => /usr/local/lib/libevent_pthreads-2.1.so.5 libevent_pthreads-2.0.so.5 (libc6,x86-64) => /usr/local/lib/libevent_pthreads-2.0.so.5 libevent_openssl-2.1.so.5 (libc6,x86-64) => /usr/local/lib/libevent_openssl-2.1.so.5 libevent_extra-2.1.so.5 (libc6,x86-64) => /usr/local/lib/libevent_extra-2.1.so.5 libevent_extra-2.0.so.5 (libc6,x86-64) => /usr/local/lib/libevent_extra-2.0.so.5 libevent_core-2.1.so.5 (libc6,x86-64) => /usr/local/lib/libevent_core-2.1.so.5 libevent_core-2.0.so.5 (libc6,x86-64) => /usr/local/lib/libevent_core-2.0.so.5 libevent-2.1.so.5 (libc6,x86-64) => /usr/local/lib/libevent-2.1.so.5 libevent-2.0.so.5 (libc6,x86-64) => /usr/local/lib/libevent-2.0.so.5 I am considering 2.1 because of a deadlock with a bufferevent implicit lock (using flags BEV_OPT_CLOSE_ON_FREE | BEV_OPT_THREADSAFE)) with a pthread write lock. Any suggestion would be greatly appreciated. -Marco G. ------------------------------ Marco Graziano | Founder & CEO | Visible Energy, Inc. | 530 Lytton Avenue, 2nd Floor, Palo Alto, CA 94301 Tel: (650)353-7812 | Cell: (650)644-8867 Before you print this email or/ attachments, please consider the negative environmental impacts associated with printing. On Tue, Feb 10, 2015 at 8:32 AM, Marco Graziano <[email protected]> wrote: > Getting a linker error using libevent 2.1: > > marcog@marcog-VirtualBox:~/Cometa/cometa-mt/server$ make > cc -Wall -g -I./include -L/usr/local/lib -levent -o cometa cometa.o > request.o http_parser.o config.o rsyslog.o response.o routes.o api.o info.o > webhooks.o websockets.o -l:libevent-2.1.so.5 -l:libevent_pthreads-2.1.so.5 > -lpthread -lcrypto -lm -ldl -lwebsock -lconfig -lssl -lworkqueue > -lbeanstalk > /usr/bin/ld: cometa.o: undefined reference to symbol > 'event_base_add_virtual' > /usr/local/lib/libevent-2.0.so.5: error adding symbols: DSO missing from > command line > collect2: error: ld returned 1 exit status > make: *** [cometa] Error 1 > > While everything is fine with libevent 2.0: > > marcog@marcog-VirtualBox:~/Cometa/cometa-mt/server$ make > cc -Wall -g -I./include -L/usr/local/lib -levent -o cometa cometa.o > request.o http_parser.o config.o rsyslog.o response.o routes.o api.o info.o > webhooks.o websockets.o -l:libevent-2.0.so.5 -l:libevent_pthreads-2.0.so.5 > -lpthread -lcrypto -lm -ldl -lwebsock -lconfig -lssl -lworkqueue > -lbeanstalk > > The symbol is defined in both libraries: > > > ------------------------------ > > Marco Graziano | Founder & CEO | Visible Energy, Inc. | 530 Lytton Avenue, > 2nd Floor, Palo Alto, CA 94301 > Tel: (650)353-7812 | Cell: (650)644-8867 > Before you print this email or/ attachments, please consider the negative > environmental impacts associated with printing. >
