Hello,
Below is the log. Am I missing some package or something?
[1:07:53][~][1] $ sudo pip install ooniprobe zsh: correct 'pip' to '.pip' [nyae]? n Downloading/unpacking ooniprobe Downloading ooniprobe-1.2.2.tar.gz (13.4MB): 13.4MB downloaded Running setup.py (path:/tmp/pip-build-YH9MXT/ooniprobe/setup.py) egg_info for package ooniprobe /usr/share/GeoIP/GeoIPASNum.dat already exists. Skipping. /usr/share/GeoIP/GeoIP.dat already exists. Skipping. /usr/share/GeoIP/GeoLiteCity.dat already exists. Skipping.
warning: no files found matching 'data/inputs/' Requirement already satisfied (use --upgrade to upgrade): PyYAML>=3.10 in /usr/lib64/python2.7/site-packages (from ooniprobe) Requirement already satisfied (use --upgrade to upgrade): Twisted>=12.2.0 in /usr/lib64/python2.7/site-packages (from ooniprobe) Downloading/unpacking ipaddr>=2.1.10 (from ooniprobe) Downloading ipaddr-2.1.11.tar.gz Running setup.py (path:/tmp/pip-build-YH9MXT/ipaddr/setup.py) egg_info for package ipaddr
Requirement already satisfied (use --upgrade to upgrade): pyOpenSSL>=0.13 in /usr/lib64/python2.7/site-packages (from ooniprobe) Requirement already satisfied (use --upgrade to upgrade): geoip in /usr/lib64/python2.7/site-packages (from ooniprobe) Downloading/unpacking txtorcon>=0.7 (from ooniprobe) Downloading txtorcon-0.11.0-py2-none-any.whl (175kB): 175kB downloaded Downloading/unpacking txsocksx>=0.0.2 (from ooniprobe) Downloading txsocksx-1.13.0.3.tar.gz Running setup.py (path:/tmp/pip-build-YH9MXT/txsocksx/setup.py) egg_info for package txsocksx zip_safe flag not set; analyzing archive contents...
Installed /tmp/pip-build-YH9MXT/txsocksx/vcversioner-2.14.0.0-py2.7.egg
Downloading/unpacking parsley>=1.1 (from ooniprobe) Downloading Parsley-1.2.tar.gz (275kB): 275kB downloaded Running setup.py (path:/tmp/pip-build-YH9MXT/parsley/setup.py) egg_info for package parsley
Downloading/unpacking scapy-real>=2.2.0-dev (from ooniprobe) Downloading scapy-real-2.2.0-dev.tar.gz (1.1MB): 1.1MB downloaded Running setup.py (path:/tmp/pip-build-YH9MXT/scapy-real/setup.py) egg_info for package scapy-real
Downloading/unpacking pypcap>=1.1 (from ooniprobe) Downloading pypcap-1.1.1.tar.gz (44kB): 44kB downloaded Running setup.py (path:/tmp/pip-build-YH9MXT/pypcap/setup.py) egg_info for package pypcap Found pcap headers in /usr/include/pcap/pcap.h Found libraries in /usr/lib64/libpcap.so found pcap_setnonblock found pcap_compile_nopcap function found pcap_file function
Downloading/unpacking service-identity (from ooniprobe) Downloading service_identity-14.0.0-py2.py3-none-any.whl Requirement already satisfied (use --upgrade to upgrade): zope.interface>=3.6.1 in /usr/lib64/python2.7/site-packages (from txtorcon>=0.7->ooniprobe) Requirement already satisfied (use --upgrade to upgrade): pyasn1 in /usr/lib/python2.7/site-packages (from service-identity->ooniprobe) Downloading/unpacking pyasn1-modules (from service-identity->ooniprobe) Downloading pyasn1-modules-0.0.5.tar.gz Running setup.py (path:/tmp/pip-build-YH9MXT/pyasn1-modules/setup.py) egg_info for package pyasn1-modules
Downloading/unpacking characteristic>=14.0.0 (from service-identity->ooniprobe) Downloading characteristic-14.3.0-py2.py3-none-any.whl Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/site-packages (from zope.interface>=3.6.1->txtorcon>=0.7->ooniprobe) Installing collected packages: ooniprobe, ipaddr, txtorcon, txsocksx, parsley, scapy-real, pypcap, service-identity, pyasn1-modules, characteristic Running setup.py install for ooniprobe /usr/share/GeoIP/GeoIPASNum.dat already exists. Skipping. /usr/share/GeoIP/GeoIP.dat already exists. Skipping. /usr/share/GeoIP/GeoLiteCity.dat already exists. Skipping. changing mode of build/scripts-2.7/oonideckgen from 644 to 755 changing mode of build/scripts-2.7/ooniprobe from 644 to 755 changing mode of build/scripts-2.7/oonireport from 644 to 755 changing mode of build/scripts-2.7/ooniresources from 644 to 755
warning: no files found matching 'data/inputs/' changing mode of /usr/bin/ooniresources to 755 changing mode of /usr/bin/oonireport to 755 changing mode of /usr/bin/ooniprobe to 755 changing mode of /usr/bin/oonideckgen to 755 Running setup.py install for ipaddr
Running setup.py install for txsocksx
Running setup.py install for parsley
Running setup.py install for scapy-real changing mode of build/scripts-2.7/scapy from 644 to 755 changing mode of build/scripts-2.7/UTscapy from 644 to 755
changing mode of /usr/bin/UTscapy to 755 changing mode of /usr/bin/scapy to 755 Running setup.py install for pypcap Found pcap headers in /usr/include/pcap/pcap.h Found libraries in /usr/lib64/libpcap.so found pcap_setnonblock found pcap_compile_nopcap function found pcap_file function building 'pcap' extension gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DHAVE_PCAP_INT_H=1 -DHAVE_PCAP_SETNONBLOCK=1 -DHAVE_PCAP_COMPILE_NOPCAP=1 -DHAVE_PCAP_FILE=1 -I/usr/include/pcap -I/usr/include/python2.7 -c pcap.c -o build/temp.linux-x86_64-2.7/pcap.o pcap.c: In function ‘__pyx_pf_4pcap_3bpf_2filter’: pcap.c:1395:52: warning: passing argument 2 of ‘PyObject_AsCharBuffer’ from incompatible pointer type __pyx_t_1 = ((PyObject_AsCharBuffer(__pyx_v_buf, (&__pyx_v_p), (&__pyx_v_n)) < 0) != 0); ^ In file included from /usr/include/python2.7/Python.h:133:0, from pcap.c:16: /usr/include/python2.7/abstract.h:476:22: note: expected ‘const char **’ but argument is of type ‘char **’ PyAPI_FUNC(int) PyObject_AsCharBuffer(PyObject *obj, ^ pcap.c:1395:66: warning: passing argument 3 of ‘PyObject_AsCharBuffer’ from incompatible pointer type __pyx_t_1 = ((PyObject_AsCharBuffer(__pyx_v_buf, (&__pyx_v_p), (&__pyx_v_n)) < 0) != 0); ^ In file included from /usr/include/python2.7/Python.h:133:0, from pcap.c:16: /usr/include/python2.7/abstract.h:476:22: note: expected ‘Py_ssize_t *’ but argument is of type ‘int *’ PyAPI_FUNC(int) PyObject_AsCharBuffer(PyObject *obj, ^ pcap.c:1416:58: warning: pointer targets in passing argument 2 of ‘bpf_filter’ differ in signedness [-Wpointer-sign] __pyx_t_1 = ((bpf_filter(__pyx_v_self->fcode.bf_insns, __pyx_v_p, __pyx_v_n, __pyx_v_n) == 0) != 0); ^ In file included from /usr/include/pcap/pcap.h:49:0, from pcap.c:343: /usr/include/pcap/bpf.h:1474:14: note: expected ‘const u_char *’ but argument is of type ‘char *’ extern u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int); ^ pcap.c: In function ‘__pyx_pf_4pcap_4pcap_16dispatch’: pcap.c:3135:68: warning: passing argument 3 of ‘pcap_dispatch’ from incompatible pointer type __pyx_v_n = pcap_dispatch(__pyx_v_self->__pyx___pcap, __pyx_t_1, __pyx_f_4pcap___pcap_handler, ((unsigned char *)(&__pyx_v_ctx))); ^ In file included from pcap.c:343:0: /usr/include/pcap/pcap.h:373:5: note: expected ‘pcap_handler’ but argument is of type ‘void (*)(void *, struct pcap_pkthdr *, char *)’ int pcap_dispatch(pcap_t *, int, pcap_handler, u_char *); ^ pcap.c: In function ‘__pyx_pf_4pcap_4pcap_18loop’: pcap.c:3364:74: warning: passing argument 3 of ‘pcap_ex_next’ from incompatible pointer type __pyx_v_n = pcap_ex_next(__pyx_v_self->__pyx___pcap, (&__pyx_v_hdr), (&__pyx_v_pkt));
^ In file included from pcap.c:344:0: pcap_ex.h:13:7: note: expected ‘u_char **’ but argument is of type ‘char **’ int pcap_ex_next(pcap_t *pcap, struct pcap_pkthdr **hdr, u_char **pkt); ^ pcap.c: In function ‘__pyx_pf_4pcap_4pcap_20sendpacket’: pcap.c:3619:61: warning: pointer targets in passing argument 2 of ‘pcap_sendpacket’ differ in signedness [-Wpointer-sign] __pyx_v_ret = pcap_sendpacket(__pyx_v_self->__pyx___pcap, __pyx_t_1, __pyx_t_2); ^ In file included from pcap.c:343:0: /usr/include/pcap/pcap.h:384:5: note: expected ‘const u_char *’ but argument is of type ‘char *’ int pcap_sendpacket(pcap_t *, const u_char *, int); ^ pcap.c: In function ‘__pyx_pf_4pcap_4pcap_28__next__’: pcap.c:3976:74: warning: passing argument 3 of ‘pcap_ex_next’ from incompatible pointer type __pyx_v_n = pcap_ex_next(__pyx_v_self->__pyx___pcap, (&__pyx_v_hdr), (&__pyx_v_pkt));
^ In file included from pcap.c:344:0: pcap_ex.h:13:7: note: expected ‘u_char **’ but argument is of type ‘char **’ int pcap_ex_next(pcap_t *pcap, struct pcap_pkthdr **hdr, u_char **pkt); ^ gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DHAVE_PCAP_INT_H=1 -DHAVE_PCAP_SETNONBLOCK=1 -DHAVE_PCAP_COMPILE_NOPCAP=1 -DHAVE_PCAP_FILE=1 -I/usr/include/pcap -I/usr/include/python2.7 -c pcap_ex.c -o build/temp.linux-x86_64-2.7/pcap_ex.o pcap_ex.c:18:23: fatal error: pcap-int.h: No such file or directory # include <pcap-int.h> ^ compilation terminated. error: command 'gcc' failed with exit status 1 Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-YH9MXT/pypcap/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-X1iDfG-record/install-record.txt --single-version-externally-managed --compile: Found pcap headers in /usr/include/pcap/pcap.h
Found libraries in /usr/lib64/libpcap.so
found pcap_setnonblock
found pcap_compile_nopcap function
found pcap_file function
running install
running build
running build_ext
building 'pcap' extension
creating build
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DHAVE_PCAP_INT_H=1 -DHAVE_PCAP_SETNONBLOCK=1 -DHAVE_PCAP_COMPILE_NOPCAP=1 -DHAVE_PCAP_FILE=1 -I/usr/include/pcap -I/usr/include/python2.7 -c pcap.c -o build/temp.linux-x86_64-2.7/pcap.o
pcap.c: In function ‘__pyx_pf_4pcap_3bpf_2filter’:
pcap.c:1395:52: warning: passing argument 2 of ‘PyObject_AsCharBuffer’ from incompatible pointer type
__pyx_t_1 = ((PyObject_AsCharBuffer(__pyx_v_buf, (&__pyx_v_p), (&__pyx_v_n)) < 0) != 0);
^
In file included from /usr/include/python2.7/Python.h:133:0,
from pcap.c:16:
/usr/include/python2.7/abstract.h:476:22: note: expected ‘const char **’ but argument is of type ‘char **’
PyAPI_FUNC(int) PyObject_AsCharBuffer(PyObject *obj,
^
pcap.c:1395:66: warning: passing argument 3 of ‘PyObject_AsCharBuffer’ from incompatible pointer type
__pyx_t_1 = ((PyObject_AsCharBuffer(__pyx_v_buf, (&__pyx_v_p), (&__pyx_v_n)) < 0) != 0);
^
In file included from /usr/include/python2.7/Python.h:133:0,
from pcap.c:16:
/usr/include/python2.7/abstract.h:476:22: note: expected ‘Py_ssize_t *’ but argument is of type ‘int *’
PyAPI_FUNC(int) PyObject_AsCharBuffer(PyObject *obj,
^
pcap.c:1416:58: warning: pointer targets in passing argument 2 of ‘bpf_filter’ differ in signedness [-Wpointer-sign]
__pyx_t_1 = ((bpf_filter(__pyx_v_self->fcode.bf_insns, __pyx_v_p, __pyx_v_n, __pyx_v_n) == 0) != 0);
^
In file included from /usr/include/pcap/pcap.h:49:0,
from pcap.c:343:
/usr/include/pcap/bpf.h:1474:14: note: expected ‘const u_char *’ but argument is of type ‘char *’
extern u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int);
^
pcap.c: In function ‘__pyx_pf_4pcap_4pcap_16dispatch’:
pcap.c:3135:68: warning: passing argument 3 of ‘pcap_dispatch’ from incompatible pointer type
__pyx_v_n = pcap_dispatch(__pyx_v_self->__pyx___pcap, __pyx_t_1, __pyx_f_4pcap___pcap_handler, ((unsigned char *)(&__pyx_v_ctx)));
^
In file included from pcap.c:343:0:
/usr/include/pcap/pcap.h:373:5: note: expected ‘pcap_handler’ but argument is of type ‘void (*)(void *, struct pcap_pkthdr *, char *)’
int pcap_dispatch(pcap_t *, int, pcap_handler, u_char *);
^
pcap.c: In function ‘__pyx_pf_4pcap_4pcap_18loop’:
pcap.c:3364:74: warning: passing argument 3 of ‘pcap_ex_next’ from incompatible pointer type
__pyx_v_n = pcap_ex_next(__pyx_v_self->__pyx___pcap, (&__pyx_v_hdr), (&__pyx_v_pkt));
^
In file included from pcap.c:344:0:
pcap_ex.h:13:7: note: expected ‘u_char **’ but argument is of type ‘char **’
int pcap_ex_next(pcap_t *pcap, struct pcap_pkthdr **hdr, u_char **pkt);
^
pcap.c: In function ‘__pyx_pf_4pcap_4pcap_20sendpacket’:
pcap.c:3619:61: warning: pointer targets in passing argument 2 of ‘pcap_sendpacket’ differ in signedness [-Wpointer-sign]
__pyx_v_ret = pcap_sendpacket(__pyx_v_self->__pyx___pcap, __pyx_t_1, __pyx_t_2);
^
In file included from pcap.c:343:0:
/usr/include/pcap/pcap.h:384:5: note: expected ‘const u_char *’ but argument is of type ‘char *’
int pcap_sendpacket(pcap_t *, const u_char *, int);
^
pcap.c: In function ‘__pyx_pf_4pcap_4pcap_28__next__’:
pcap.c:3976:74: warning: passing argument 3 of ‘pcap_ex_next’ from incompatible pointer type
__pyx_v_n = pcap_ex_next(__pyx_v_self->__pyx___pcap, (&__pyx_v_hdr), (&__pyx_v_pkt));
^
In file included from pcap.c:344:0:
pcap_ex.h:13:7: note: expected ‘u_char **’ but argument is of type ‘char **’
int pcap_ex_next(pcap_t *pcap, struct pcap_pkthdr **hdr, u_char **pkt);
^
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DHAVE_PCAP_INT_H=1 -DHAVE_PCAP_SETNONBLOCK=1 -DHAVE_PCAP_COMPILE_NOPCAP=1 -DHAVE_PCAP_FILE=1 -I/usr/include/pcap -I/usr/include/python2.7 -c pcap_ex.c -o build/temp.linux-x86_64-2.7/pcap_ex.o
pcap_ex.c:18:23: fatal error: pcap-int.h: No such file or directory
# include <pcap-int.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
---------------------------------------- Cleaning up... Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-YH9MXT/pypcap/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-X1iDfG-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-YH9MXT/pypcap Traceback (most recent call last): File "/bin/pip", line 11, in <module> sys.exit(main()) File "/usr/lib/python2.7/site-packages/pip/__init__.py", line 184, in main return command.main(cmd_args) File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 161, in main text = '\n'.join(complete_log) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 24: ordinal not in range(128) [1:18:05][~]$ yum provides pcap-int.h Loaded plugins: auto-update-debuginfo, langpacks (cut) No matches found
Cheers, d33tah
On 1/8/15 1:21 AM, Jacek Wielemborek wrote:
Hello,
Below is the log. Am I missing some package or something?
[ snip ]
pcap_ex.c:18:23: fatal error: pcap-int.h: No such file or directory
# include <pcap-int.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
[ snip ]
[1:18:05][~]$ yum provides pcap-int.h Loaded plugins: auto-update-debuginfo, langpacks (cut) No matches found
From the looks of it you are missing the libpcap-dev package. I believe
in fedora it is called libpcap-devel.
If you still encounter other issues you should reach us on the ooni-dev mailing list (ooni-dev@lists.torproject.org) or try asking around on IRC #ooni irc.oftc.net.
~ Arturo
W dniu 08.01.2015 o 12:11, Arturo Filastò pisze:
On 1/8/15 1:21 AM, Jacek Wielemborek wrote:
Hello,
Below is the log. Am I missing some package or something?
[ snip ]
pcap_ex.c:18:23: fatal error: pcap-int.h: No such file or directory
# include <pcap-int.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
[ snip ]
[1:18:05][~]$ yum provides pcap-int.h Loaded plugins: auto-update-debuginfo, langpacks (cut) No matches found
From the looks of it you are missing the libpcap-dev package. I believe in fedora it is called libpcap-devel.
If you still encounter other issues you should reach us on the ooni-dev mailing list (ooni-dev@lists.torproject.org) or try asking around on IRC #ooni irc.oftc.net.
~ Arturo
tor-dev mailing list tor-dev@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev
I do have libpcap-devel installed, it's just this pcap-int.h header that is both missing and not to be found in any Fedora package:
$ rpm -qa | grep pcap-dev libpcap-devel-1.6.2-1.fc21.x86_64
Note the following tickets:
https://bugzilla.redhat.com/show_bug.cgi?id=449387 https://code.google.com/p/pypcap/issues/detail?id=45
It looks like this wasn't included on purpose - pypcap is using libpcap's private interface. Note that according to Google Code, this package had no releases or SVN updates since 2010.
On May 18, 2015 at 4:19:09 PM, Jacek Wielemborek (d33tah@gmail.com) wrote:
I do have libpcap-devel installed, it's just this pcap-int.h header that is both missing and not to be found in any Fedora package:
$ rpm -qa | grep pcap-dev libpcap-devel-1.6.2-1.fc21.x86_64
Note the following tickets:
https://bugzilla.redhat.com/show_bug.cgi?id=449387%C2%A0 https://code.google.com/p/pypcap/issues/detail?id=45
It looks like this wasn't included on purpose - pypcap is using libpcap's private interface. Note that according to Google Code, this package had no releases or SVN updates since 2010.
Hi Jacek,
From where did you get pypcap?
The version on pypi (installable with pip install pypap) should be my fork of it: https://github.com/hellais/pypcap%C2%A0that includes a workaround for that problem:
https://github.com/hellais/pypcap/blob/master/pcap_ex.c#L17
Try installing that version of it and if it fails please open a ticket on:
https://github.com/hellais/pypcap/issues
~ Arturo