From owner-freebsd-net@FreeBSD.ORG Fri Jul 21 16:23:15 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E570716A4DE; Fri, 21 Jul 2006 16:23:15 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 554FE43D46; Fri, 21 Jul 2006 16:23:15 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id A564F5DD8; Fri, 21 Jul 2006 12:23:14 -0400 (EDT) X-Virus-Scanned: amavisd-new at codefab.com Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X8DO96BBptb2; Fri, 21 Jul 2006 12:23:10 -0400 (EDT) Received: from [199.103.21.238] (pan.codefab.com [199.103.21.238]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by pi.codefab.com (Postfix) with ESMTP id 882C15D44; Fri, 21 Jul 2006 12:23:10 -0400 (EDT) In-Reply-To: References: <44BF95E9.2030102@mac.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <3724C08A-4ADD-4294-8953-A4ADA2326577@mac.com> Content-Transfer-Encoding: 7bit From: Charles Swiger Date: Fri, 21 Jul 2006 12:23:06 -0400 To: gnn@freebsd.org X-Mailer: Apple Mail (2.752.2) Cc: freebsd-net@freebsd.org Subject: Re: Packet Construction and Protocol Testing... X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jul 2006 16:23:16 -0000 On Jul 20, 2006, at 10:10 PM, gnn@freebsd.org wrote: >> [1]: If I could only get net/py-pcap to build, I might be able to >> do a little >> more... :-) > > You only need net/py-pypcap, but if that's what you meant please let > me know what the build problem is. Interesting-- basicly, your tests commonly use a construct like "from pcap import pcap", which isn't working here with either port: 35-pi# cd /usr/ports/net/py-pcap 36-pi# make ===> Extracting for py24-pcap-0.5 => MD5 Checksum OK for pylibpcap-0.5.tar.gz. => SHA256 Checksum OK for pylibpcap-0.5.tar.gz. => MD5 Checksum OK for pylibpcap-doc.i.1.4. => SHA256 Checksum OK for pylibpcap-doc.i.1.4. install -o root -g wheel -m 444 /usr/ports/distfiles/pylibpcap-doc.i. 1.4 /usr/ports/net/py-pcap/work/pylibpcap-0.5/doc.i ===> Patching for py24-pcap-0.5 ===> Applying FreeBSD patches for py24-pcap-0.5 ===> py24-pcap-0.5 depends on executable: swig - found ===> py24-pcap-0.5 depends on file: /usr/local/bin/python - found ===> Configuring for py24-pcap-0.5 /usr/local/lib/python2.4/distutils/dist.py:222: UserWarning: 'licence' distribution option is deprecated; use 'license' warnings.warn(msg) running config ===> Building for py24-pcap-0.5 /usr/local/lib/python2.4/distutils/dist.py:222: UserWarning: 'licence' distribution option is deprecated; use 'license' warnings.warn(msg) running build running build_ext building '_pcapmodule' extension generating constants.c from mk-constants.py swig -python -shadow -ISWIG -o pcap.c pcap.i pcap.i:72: Warning(124): Specifying the language name in %typemap is deprecated - use #ifdef SWIG instead. pcap.i:77: Warning(124): Specifying the language name in %typemap is deprecated - use #ifdef SWIG instead. pcap.i:82: Warning(124): Specifying the language name in %typemap is deprecated - use #ifdef SWIG instead. creating build creating build/temp.freebsd-5.5-PRERELEASE-i386-2.4 cc -fno-strict-aliasing -DNDEBUG -O -pipe -march=pentium - D__wchar_t=wchar_t -DTHREAD_STACK_SIZE=0x20000 -O -pipe - march=pentium -fPIC -DSWIG_COBJECT_TYPES -I/usr/local/include/ python2.4 -c pcap.c -o build/temp.freebsd-5.5-PRERELEASE-i386-2.4/pcap.o pcap.c: In function `init_pcap': pcap.c:4220: warning: passing arg 2 of `SWIG_Python_InstallConstants' discards qualifiers from pointer target type pcap.c:4230: warning: passing arg 3 of `PyModule_AddStringConstant' discards qualifiers from pointer target type cc -fno-strict-aliasing -DNDEBUG -O -pipe -march=pentium - D__wchar_t=wchar_t -DTHREAD_STACK_SIZE=0x20000 -O -pipe - march=pentium -fPIC -DSWIG_COBJECT_TYPES -I/usr/local/include/ python2.4 -c pcap_interface.c -o build/temp.freebsd-5.5-PRERELEASE- i386-2.4/pcap_interface.o cc -fno-strict-aliasing -DNDEBUG -O -pipe -march=pentium - D__wchar_t=wchar_t -DTHREAD_STACK_SIZE=0x20000 -O -pipe - march=pentium -fPIC -DSWIG_COBJECT_TYPES -I/usr/local/include/ python2.4 -c exception.c -o build/temp.freebsd-5.5-PRERELEASE- i386-2.4/exception.o cc -fno-strict-aliasing -DNDEBUG -O -pipe -march=pentium - D__wchar_t=wchar_t -DTHREAD_STACK_SIZE=0x20000 -O -pipe - march=pentium -fPIC -DSWIG_COBJECT_TYPES -I/usr/local/include/ python2.4 -c error.c -o build/temp.freebsd-5.5-PRERELEASE-i386-2.4/ error.o creating build/lib.freebsd-5.5-PRERELEASE-i386-2.4 cc -shared -pthread -O -pipe -march=pentium build/temp.freebsd-5.5- PRERELEASE-i386-2.4/pcap.o build/temp.freebsd-5.5-PRERELEASE-i386-2.4/ pcap_interface.o build/temp.freebsd-5.5-PRERELEASE-i386-2.4/ exception.o build/temp.freebsd-5.5-PRERELEASE-i386-2.4/error.o -lpcap -o build/lib.freebsd-5.5-PRERELEASE-i386-2.4/_pcapmodule.so running build_py copying pcap.py -> build/lib.freebsd-5.5-PRERELEASE-i386-2.4 5.61s real 4.65s user 0.86s system 98% 37-pi# make install ===> Installing for py24-pcap-0.5 ===> py24-pcap-0.5 depends on file: /usr/local/bin/python - found ===> Generating temporary packing list ===> Checking if net/py-pcap already installed /usr/local/lib/python2.4/distutils/dist.py:222: UserWarning: 'licence' distribution option is deprecated; use 'license' warnings.warn(msg) running install running build running build_ext running build_py running install_lib copying build/lib.freebsd-5.5-PRERELEASE-i386-2.4/_pcapmodule.so -> / usr/local/lib/python2.4/site-packages copying build/lib.freebsd-5.5-PRERELEASE-i386-2.4/pcap.py -> /usr/ local/lib/python2.4/site-packages byte-compiling /usr/local/lib/python2.4/site-packages/pcap.py to pcap.pyc writing byte-compilation script '/tmp/tmpv6RYOP.py' /usr/local/bin/python -O /tmp/tmpv6RYOP.py removing /tmp/tmpv6RYOP.py ===> Registering installation for py24-pcap-0.5 38-pi# python /usr/ports/net/py-pcap Python 2.4.3 (#2, May 15 2006, 15:15:09) [GCC 3.4.2 [FreeBSD] 20040728] on freebsd5 Type "help", "copyright", "credits" or "license" for more information. >>> import pcap >>> from pcap import pcap Traceback (most recent call last): File "", line 1, in ? ImportError: cannot import name pcap >>> 39-pi# make deinstall ===> Deinstalling for net/py-pcap ===> Deinstalling py24-pcap-0.5 40-pi# cd ../py-pypcap 41-pi# make deinstall ===> Deinstalling for net/py-pypcap ===> py24-pypcap not installed, skipping 42-pi# make install ===> Installing for py24-pypcap-1.1 ===> py24-pypcap-1.1 depends on file: /usr/local/bin/python - found ===> Generating temporary packing list ===> Checking if net/py-pypcap already installed python setup.py install running install running build running build_ext running install_lib copying build/lib.freebsd-5.5-PRERELEASE-i386-2.4/pcap.so -> /usr/ local/lib/python2.4/site-packages ===> Registering installation for py24-pypcap-1.1 43-pi# python Python 2.4.3 (#2, May 15 2006, 15:15:09) [GCC 3.4.2 [FreeBSD] 20040728] on freebsd5 Type "help", "copyright", "credits" or "license" for more information. >>> import pcap Traceback (most recent call last): File "", line 1, in ? ImportError: /usr/local/lib/python2.4/site-packages/pcap.so: Undefined symbol "pcap_inject" >>> 44-pi# grep -l pcap_inject /usr/lib/libpcap* 45-pi# nm -g /usr/local/lib/python2.4/site-packages/pcap.so | grep pcap_inject U pcap_inject Thanks for your time, -- -Chuck