Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1 build problems

open
nobody
None
5
2002-07-02
2002-07-02
Anonymous
No

Downloaded pylibpcap-0.4.tar.gz and
ran "python ./setup.py build":

running build
running build_py
not copying pcap.py (output up-to-date)
running build_ext
building 'pcapcmodule' extension
gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -
I/usr/local/include -I/usr/include/python2.1 -c pcap.c -o
build/temp.linux-i686-2.1/pcap.o
pcap.c: In function `SWIG_UnpackData':
pcap.c:381: warning: `uu' might be used uninitialized in
this function
pcap.c: In function `SWIG_ConvertPtr':
pcap.c:447: warning: suggest explicit braces to avoid
ambiguous `else'
pcap.c:450: warning: suggest explicit braces to avoid
ambiguous `else'
pcap.c:456: warning: suggest explicit braces to avoid
ambiguous `else'
pcap.c: At top level:
pcap.c:1602: `DLT_PPP_ETHER' undeclared here (not
in a function)
pcap.c:1602: initializer element is not constant
pcap.c:1602: (near initialization for `swig_const_table
[39].lvalue')
pcap.c:1608: `DLT_LTALK' undeclared here (not in a
function)
pcap.c:1608: initializer element is not constant
pcap.c:1608: (near initialization for `swig_const_table
[45].lvalue')
pcap.c:1609: `DLT_ECONET' undeclared here (not in a
function)
pcap.c:1609: initializer element is not constant
pcap.c:1609: (near initialization for `swig_const_table
[46].lvalue')
pcap.c:1610: `DLT_IPFILTER' undeclared here (not in a
function)
pcap.c:1610: initializer element is not constant
pcap.c:1610: (near initialization for `swig_const_table
[47].lvalue')
pcap.c:1611: `DLT_PFLOG' undeclared here (not in a
function)
pcap.c:1611: initializer element is not constant
pcap.c:1611: (near initialization for `swig_const_table
[48].lvalue')
pcap.c:1612: `DLT_CISCO_IOS' undeclared here (not in
a function)
pcap.c:1612: initializer element is not constant
pcap.c:1612: (near initialization for `swig_const_table
[49].lvalue')
pcap.c:1613: `DLT_PRISM_HEADER' undeclared here
(not in a function)
pcap.c:1613: initializer element is not constant
pcap.c:1613: (near initialization for `swig_const_table
[50].lvalue')
pcap.c:1614: `DLT_AIRONET_HEADER' undeclared
here (not in a function)
pcap.c:1614: initializer element is not constant
pcap.c:1614: (near initialization for `swig_const_table
[51].lvalue')
pcap.c:163: warning: `SWIG_TypeDynamicCast' defined
but not used
pcap.c:175: warning: `SWIG_TypeQuery' defined but not
used
pcap.c:350: warning: `SWIG_addvarlink' defined but not
used
pcap.c:486: warning: `SWIG_ConvertPacked' defined
but not used
error: command 'gcc' failed with exit status 1

System is running Debian potato with a few packages
from sid:
libpacp0 0.6.2-2
libswig1.3 1.3.11-1
python 2.1.3-3
gcc 2.95.4-14

Can you help?

Cheers,
Roland.
--
Tell me and I'll forget; show me and I may remember,
involve me and I'll understand - Chinese Proverb.

Discussion

  • Logged In: NO

    I had the same problem, it appears libpcap is version 6 not
    version 7

     
  • Logged In: YES
    user_id=236100

    I also had the same problem. The solution for me was
    different. I have a self-built gcc 3.2.3, which comes with
    its own bpf.h. That was being used in favor of the one in
    /usr/include, but the gcc version looks to be from libpcap
    0.6 or so. I fixed this by manually compiling pcap.c with
    the -isystem/usr/include option to gcc.

     
  • Isaac Levy
    Isaac Levy
    2003-08-24

    Logged In: YES
    user_id=319101

    I had the samep problem, identical final output:

    OS: Mac OSX 10.2.6
    installing: pylibpcap-0.4
    installed: libpcap-2003.08.19
    python: Python 2.3
    (note, framework install- should be functionally
    identical to non-framework install)

    ###-last-lines-of-build-output-###
    ld: Undefined symbols:
    _pcap_findalldevs
    _pcap_freealldevs
    _pcap_getnonblock
    _pcap_setnonblock
    error: command 'gcc' failed with exit status 1
    ###end-last-lines-of-build-output-###

    I'm not sure what the procedure is to resolve this, seems as
    though I'm not the only one though- so I'd be willing to help find a
    global fix for this- (?)

    Rocket-

     
  • Logged In: NO

    Do not use gcc 2.95.4, its buggy