fugalh/hearnet — Issue #1: needs updating for new versions of libpcap and libjack?
Author: wxl
Created: 2011-11-27 09:05:12+00:00
State: open

Though it's not clear, given the last commit, I'm thinking this is the only logical explanation for the errors I receive when trying to compile. I sure hope you haven't given up on this project as I have looked high and low for something similar.

I'm running this on Lubuntu 11.10.

libjack-jackd2-0:
Installed: 1.9.7~dfsg-1ubuntu2
libjack-jackd2-dev:
Installed: 1.9.7~dfsg-1ubuntu2

libpcap0.8:
Installed: 1.1.1-8
libpcap-dev:
Installed: 1.1.1-8

Yes, I do have jack2 and it could very well be jack1, but as they are supposed to be drop in replacements for one another, I would suspect this to be a problem. On the other hand, most of the errors seem to reference jack. Maybe the compatibility begins at the binary level.

Output from make is as follows:
$ make
g++ `pkg-config --cflags --libs jack` -lpcap hearnet.cpp -o hearnet
hearnet.cpp: In function ‘int set_srate(jack_nframes_t, void*)’:
hearnet.cpp:120:47: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘jack_nframes_t {aka unsigned int}’ [-Wformat]
hearnet.cpp: In function ‘int main(int, char**)’:
hearnet.cpp:174:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
hearnet.cpp:216:19: warning: ‘jack_client_t* jack_client_new(const char*)’ is deprecated (declared at /usr/include/jack/jack.h:122) [-Wdeprecated-declarations]
hearnet.cpp:216:46: warning: ‘jack_client_t* jack_client_new(const char*)’ is deprecated (declared at /usr/include/jack/jack.h:122) [-Wdeprecated-declarations]
hearnet.cpp:224:70: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘jack_nframes_t {aka unsigned int}’ [-Wformat]
/tmp/ccuYkstX.o: In function `process(unsigned int, void*)':
hearnet.cpp:(.text+0xac): undefined reference to `jack_port_get_buffer'
/tmp/ccuYkstX.o: In function `main':
hearnet.cpp:(.text+0x512): undefined reference to `pcap_open_live'
hearnet.cpp:(.text+0x6f7): undefined reference to `pcap_compile'
hearnet.cpp:(.text+0x719): undefined reference to `pcap_setfilter'
hearnet.cpp:(.text+0x729): undefined reference to `pcap_geterr'
hearnet.cpp:(.text+0x791): undefined reference to `jack_set_error_function'
hearnet.cpp:(.text+0x79c): undefined reference to `jack_client_new'
hearnet.cpp:(.text+0x7fd): undefined reference to `jack_set_process_callback'
hearnet.cpp:(.text+0x81b): undefined reference to `jack_set_sample_rate_callback'
hearnet.cpp:(.text+0x847): undefined reference to `jack_get_sample_rate'
hearnet.cpp:(.text+0x885): undefined reference to `jack_port_register'
hearnet.cpp:(.text+0x898): undefined reference to `jack_activate'
hearnet.cpp:(.text+0x8f6): undefined reference to `jack_get_ports'
hearnet.cpp:(.text+0x965): undefined reference to `jack_port_name'
hearnet.cpp:(.text+0x97b): undefined reference to `jack_connect'
hearnet.cpp:(.text+0xa2b): undefined reference to `pcap_dispatch'
collect2: ld returned 1 exit status
make: *** [hearnet] Error 1

Let me know what else you need to know and thanks in advance.