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: cannot convert 'PySliceObject*' to 'PyObject* {aka _object*}' for argument '1' to 'int PySlice_GetIndices(PyObject*, Py_ssize_t, Py_ssize_t*, Py_ssize_t*, Py_ssize_t*)' #31

Open
TheOncomingStorm opened this issue Nov 7, 2014 · 1 comment

Comments

@TheOncomingStorm
Copy link

I've been trying to build gr-baz and I consistently get the same error time and time again.

Scanning dependencies of target baz_swig
[ 91%] Building CXX object swig/CMakeFiles/baz_swig.dir/baz_swigPYTHON_wrap.cxx.o
gr-baz/build/swig/baz_swigPYTHON_wrap.cxx:5754:90: error: cannot convert 'PySliceObject
' to 'PyObject
{aka object}' for argument '1' to 'int PySlice_GetIndices(PyObject_, Py_ssize_t, Py_ssize_t_, Py_ssize_t_, Py_ssize_t*)'

I did some checking and there were some suggestions that it's a Swig version conflict error but I've updated(and downgraded) my swig installation and I get the same results...but regardless the error reports were almost 4 years old and were for a much older version of swig.

Then I noticed that during the configure it'd detect python2 runtime but then detect python3 .so libraries so I tried forcing them to match libraries with the runtimes and still got the same results.

Any thoughts?

gcc 4.8.3
swig 3.0.2
gnuradio 3.7.5.1
python 2.7.8 and 3.4.2

@TheOncomingStorm
Copy link
Author

Ok, I finally solved this and it DEFINITELY had everything to do with the mismatched python runtime and libraries.

The way I solved it was to patch swig/CMakeLists.txt
-find_package(PythonLibs)
+find_package(PythonLibs 2.7 REQUIRED)

There's gotta be a more elegant way of doing that from your end but it works as I need it to at this point so I'll leave that up to you.

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

1 participant