Peter Hessler <phess...@openbsd.org> writes: > I would like to use pcapy in a python3 module, so we need to update it. > > However, when I run the test program, I get the following error: > > python2.7:/usr/local/lib/python2.7/site-packages/pcapy.so: undefined > symbol '_Z10bpf_filterPK8bpf_insnPKhjj' > Traceback (most recent call last): > File "/usr/local/tests/pcapytests.py", line 8, in <module> > import pcapy > ImportError: Cannot load specified object > > Based on what I can tell, pcapy.so is linked against libpcap, which > should provide those symbols. > > $ ldd /usr/local/lib/python2.7/site-packages/pcapy.so > /usr/local/lib/python2.7/site-packages/pcapy.so: > Start End Type Open Ref GrpRef Name > 000010ffb9019000 000010ffb921f000 dlib 2 0 0 > /usr/local/lib/python2.7/site-packages/pcapy.so > 000010ff88f9c000 000010ff891c1000 rlib 0 1 0 > /usr/lib/libpcap.so.8.1 > 000010ff5d7d6000 000010ff5daed000 rlib 0 1 0 > /usr/lib/libstdc++.so.57.0 > 000010ff9925f000 000010ff99636000 rlib 0 1 0 > /usr/local/lib/libpython2.7.so.0.0 > 000010fee0ee9000 000010fee1110000 rlib 0 3 0 > /usr/lib/libm.so.10.0 > 000010ff63fa3000 000010ff641b2000 rlib 0 1 0 > /usr/lib/libpthread.so.23.0 > 000010fef2919000 000010fef2b26000 rlib 0 1 0 > /usr/lib/libutil.so.12.1 > > Ideas?
C++ name mangling is affecting the functions declared in net/bpf.h. Probably a __BEGIN_DECLS / __END_DECLS pair missing. -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE