Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have an issue when installing in osx #127

Open
shumtravi opened this issue Oct 21, 2017 · 3 comments
Open

Have an issue when installing in osx #127

shumtravi opened this issue Oct 21, 2017 · 3 comments

Comments

@shumtravi
Copy link

I'm just trying to install netzob in Sierra 10.12.6 by

$ pip3 install netzob

And get this:

Collecting arpreq==0.3.1 (from netzob)
Using cached arpreq-0.3.1.tar.gz
Installing collected packages: arpreq, netzob
Running setup.py install for arpreq ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;file='/private/var/folders/fs/4gkfdnfd49gggp_f0mr7lyxc0000gn/T/pip-build-5gf_ixyt/arpreq/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /var/folders/fs/4gkfdnfd49gggp_f0mr7lyxc0000gn/T/pip-tlt_1uj2-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'arpreq' extension
creating build
creating build/temp.macosx-10.6-intel-3.6
creating build/temp.macosx-10.6-intel-3.6/src
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c src/arpreq.c -o build/temp.macosx-10.6-intel-3.6/src/arpreq.o -std=c99
src/arpreq.c:240:39: error: use of undeclared identifier 'SIOCGIFHWADDR'
if (ioctl(st->socket, SIOCGIFHWADDR, &ifreq) == -1) {
^
src/arpreq.c:243:49: error: no member named 'ifr_hwaddr' in 'struct ifreq'
memcpy(&mac_address, &ifreq.ifr_hwaddr, sizeof(mac_address));
~~~~~ ^
/usr/include/secure/_string.h:65:33: note: expanded from macro 'memcpy'
__builtin___memcpy_chk (dest, src, len, __darwin_obsz0 (dest))
^~~
src/arpreq.c:251:28: error: no member named 'arp_dev' in 'struct arpreq'
strncpy(arpreq.arp_dev, ifa->ifa_name, IFNAMSIZ);
~~~~~~ ^
/usr/include/secure/_string.h:119:28: note: expanded from macro 'strncpy'
__builtin___strncpy_chk (dest, src, len, __darwin_obsz (dest))
^~~~
src/arpreq.c:251:28: error: no member named 'arp_dev' in 'struct arpreq'
strncpy(arpreq.arp_dev, ifa->ifa_name, IFNAMSIZ);
~~~~~~ ^
/usr/include/secure/_string.h:119:59: note: expanded from macro 'strncpy'
__builtin___strncpy_chk (dest, src, len, __darwin_obsz (dest))
^~~~
/usr/include/secure/_common.h:39:54: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
^~~~~~
src/arpreq.c:252:35: error: use of undeclared identifier 'SIOCGARP'
if (ioctl(st->socket, SIOCGARP, &arpreq) == -1) {
^
5 errors generated.
error: command '/usr/bin/clang' failed with exit status 1

----------------------------------------

Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;file='/private/var/folders/fs/4gkfdnfd49gggp_f0mr7lyxc0000gn/T/pip-build-5gf_ixyt/arpreq/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /var/folders/fs/4gkfdnfd49gggp_f0mr7lyxc0000gn/T/pip-tlt_1uj2-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/fs/4gkfdnfd49gggp_f0mr7lyxc0000gn/T/pip-build-5gf_ixyt/arpreq/

@gbossert
Copy link
Member

gbossert commented Nov 5, 2017

Unfortunately, this issue seems related to one of our dependency : arpreq.
Did you try to contact the owners of this project to see if they already encountered this issue on mac os ?

@ezhes
Copy link

ezhes commented Nov 10, 2017

Also of course having this issue. Gave up and tossed it in a VM.

@folkvir
Copy link

folkvir commented May 27, 2020

Unfortunately the arpreq library is not working on macosx.
Someone reported in their issues to use the getmac package instead (https://pypi.org/project/getmac/)
It is also a pure python implementation. It could be nice to replace the arpreq package by getmac. It will work on all platform and will remove the c++ build part of your project if there is no other libs needing a c++ build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants