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

Error when compiling master: pcapobj.cc:652:11: error: no member named 'ob_type' in 'pcapobject' #36

Open
jab1982 opened this issue Oct 4, 2017 · 1 comment

Comments

@jab1982
Copy link

jab1982 commented Oct 4, 2017

I have just cloned pcapy and I am getting the following error when trying to compile it:

(python36) $ python setup.py build

my_init_posix: changing LDSHARED = 'clang++ -bundle -undefined dynamic_lookup'
to 'clang++ -bundle -undefined dynamic_lookup'
running build
running build_ext
building 'pcapy' extension
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c pcapdumper.cc -o build/temp.macosx-10.12-x86_64-3.6/pcapdumper.o
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c bpfobj.cc -o build/temp.macosx-10.12-x86_64-3.6/bpfobj.o
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c pcapobj.cc -o build/temp.macosx-10.12-x86_64-3.6/pcapobj.o
pcapobj.cc:652:11: error: no member named 'ob_type' in 'pcapobject'
  if (pp->ob_type != &Pcaptype)
      ~~  ^
1 error generated.
error: command 'clang' failed with exit status 1

$ python -V
Python 3.6.1

Mac OS X Sierra(10.12.6).

Any clue?

@Noxet
Copy link
Contributor

Noxet commented Oct 30, 2017

Have the same issue:

pcapobj.cc:652:11: error: ‘struct pcapobject’ has no member named ‘ob_type’; did you mean ‘ob_base’?
   if (pp->ob_type != &Pcaptype)
           ^~~~~~~
           ob_base
error: command 'gcc' failed with exit status 1

Running Python 3.6.2 and GCC 7.1.1

Noxet added a commit to Noxet/pcapy that referenced this issue Oct 30, 2017
The member "ob_type" is not present in the pcapobject struct. One must use the macro "Py_TYPE(...)" instead.
asolino added a commit that referenced this issue Oct 30, 2017
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

2 participants