Re: [pmacct-discussion] building version 1.6.1

2016-11-10 Thread Stephen Clark

On 11/09/2016 09:21 PM, Vincent Bernat wrote:

  ❦  9 novembre 2016 11:56 -0500, Stephen Clark  :


LIBS . : -L/usr/pgsql-9.4/lib -ldl -L/usr/local/lib -lpfring
-lpcap -lrt -lnuma -lz -lpthread

If libpfring is linked to one version of libpcap and your local libpcap
is another one, there will a version conflict unless libpcap symbols are
versioned (they are not). Could you check with ldd what is in libpfring,
dependency-wise?

Yes, that is probably what is happening. The pf_ring from ntopng
replace libpcap with its own
version that uses pf_ring.





Yes, that is probably what is happening. The pf_ring from ntopng
replace libpcap with its own
version that uses pf_ring.

So, if libpfring is exporting directly the bpf_validate symbols (could
you check with objdump -T?), you can try to not link with -lpcap at all.
I just took the easy way out and compiled on a system that didn't have pf_ring 
installed.

Thanks for the info though.

Steve




___
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists

Re: [pmacct-discussion] building version 1.6.1

2016-11-09 Thread Vincent Bernat
 ❦  9 novembre 2016 11:56 -0500, Stephen Clark  :

 LIBS . : -L/usr/pgsql-9.4/lib -ldl -L/usr/local/lib -lpfring
 -lpcap -lrt -lnuma -lz -lpthread
>>> If libpfring is linked to one version of libpcap and your local libpcap
>>> is another one, there will a version conflict unless libpcap symbols are
>>> versioned (they are not). Could you check with ldd what is in libpfring,
>>> dependency-wise?
>> Yes, that is probably what is happening. The pf_ring from ntopng
>> replace libpcap with its own
>> version that uses pf_ring.
>>
>>
>>
>>
>
> Yes, that is probably what is happening. The pf_ring from ntopng
> replace libpcap with its own
> version that uses pf_ring.

So, if libpfring is exporting directly the bpf_validate symbols (could
you check with objdump -T?), you can try to not link with -lpcap at all.
-- 
What I tell you three times is true.
-- Lewis Carroll

___
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists

Re: [pmacct-discussion] building version 1.6.1

2016-11-09 Thread Paolo Lucente

Hi Steve,

This is the same issue as described here:

https://github.com/pmacct/pmacct/issues/40

See the wontfix flag, i'm unable to reproduce the issue. If you solve it
yourself, please contribute a patch. I'd be fully to look into it for
you but it smells i need (unprivileged) access to the box.

Cheers,
Paolo


On Wed, Nov 09, 2016 at 07:22:36AM -0500, Stephen Clark wrote:
> Hi,
> 
> I get the following error when trying to build 1.6.1 on CentOS 6.0
> 
>   CCLD   pmacctd
> /usr/local/lib/libpcap.a(bpf_filter.o): In function `bpf_validate':
> (.text+0x0): multiple definition of `bpf_validate'
> ./.libs/libdaemons.a(libdaemons_la-bpf_filter.o):/var/lib/pgsql/sclark/pmacct-1.6.1/src/bpf_filter.c:528:
> first defined here
> /usr/local/lib/libpcap.a(bpf_filter.o): In function `bpf_filter':
> (.text+0x590): multiple definition of `bpf_filter'
> ./.libs/libdaemons.a(libdaemons_la-bpf_filter.o):/var/lib/pgsql/sclark/pmacct-1.6.1/src/bpf_filter.c:201:
> first defined here
> 
> PLATFORM . : x86_64
> OS ... : Linux 2.6.32-504.16.2.el6.x86_64
> COMPILER . : gcc
> CFLAGS ... : -O2 -g -O2
> LIBS . : -L/usr/pgsql-9.4/lib -ldl -L/usr/local/lib -lpfring
> -lpcap -lrt -lnuma -lz -lpthread
> LDFLAGS .. : -Wl,--export-dynamic
> PLUGINS .. :
> 
> Is there a way to exclude pfring?
> 
> Thanks,
> Steve
> 
> 
> ___
> pmacct-discussion mailing list
> http://www.pmacct.net/#mailinglists

___
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists