You are not logged in.

#1 2011-01-13 19:25:42

ptchinster
Member
Registered: 2008-12-27
Posts: 47

Trouble with wireshark-svn when python is installed

Package in question: http://aur.archlinux.org/packages.php?ID=28874

When building on a system with only python2 installed and no python (v3) the above package compiles just fine. However on my system that has both pythong2 installed as well as python, it fails. Ive tried using flags and options like --with-python=/usr/bin/python2 etc, but i still get this error during the "make" phase of the build.

libtool: link: ( cd ".libs" && rm -f "libdfilter.la" && ln -s "../libdfilter.la" "libdfilter.la" )
make[3]: Leaving directory `/tmp/wireshark-svn/src/wireshark-build/epan/dfilter'
Making all in dissectors
make[3]: Entering directory `/tmp/wireshark-svn/src/wireshark-build/epan/dissectors'
/usr/bin/python ../../tools/ncp2222.py -o packet-ncp2222.c
  File "../../tools/ncp2222.py", line 207
    if highest_var > global_highest_var:
                                       ^
TabError: inconsistent use of tabs and spaces in indentation
make[3]: *** [packet-ncp2222.c] Error 1
make[3]: Leaving directory `/tmp/wireshark-svn/src/wireshark-build/epan/dissectors'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/wireshark-svn/src/wireshark-build/epan'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/wireshark-svn/src/wireshark-build'
make: *** [all] Error 2

Any recommendations on how to fix this? Am i overlooking an option to force python2, should i do some env hacks to redirect any reference to /usr/bin/python to /usr/bin/python2? What would be "the arch way" for fixing this?

Offline

#2 2011-01-13 22:31:35

ptchinster
Member
Registered: 2008-12-27
Posts: 47

Re: Trouble with wireshark-svn when python is installed

I found that using find and sed i can replace all instances of /usr/bin/python to /usr/bin/python2 in all the Makefiles that get produced, however during the build i now get the error

./faq.py >faq.txt.tmp && \
    (( which elinks > /dev/null && elinks -dump -dump-width 72 -no-numbering -no-references < faq.txt.tmp > faq.txt ) || \
     ( which links  > /dev/null && links -width 72 -html-numbered-links 0 -dump               faq.txt.tmp > faq.txt ) || \
     ( which lynx   > /dev/null && lynx -dump -width=72 -nolist -stdin -force-html          < faq.txt.tmp > faq.txt ) || \
         ./../tools/html2text.py --width=72 --no-links faq.txt.tmp > faq.txt ) && \
    rm -f faq.txt.tmp
  File "./faq.py", line 48
    print "<a href=#sec%s><h%d>%s:</h%d></a>\n" % (self.get_num_string(), self.get_header_level(), self.get_num_name(), self.get_header_level())
                                              ^
SyntaxError: invalid syntax
make: *** [faq.txt] Error 1

Sticking ()'s around what is being printed seems to fix it  - but i shouldnt have to do that to every print in the 2000+ lined file. Im not a python guy - any quick fixes come to mind to anybody?

EDIT:

Currently working with this PKGBUILD:
http://paste.pocoo.org/raw/320255/

Last edited by ptchinster (2011-01-13 22:33:36)

Offline

Board footer

Powered by FluxBB