Build failure with GR 3.7.4 on Arch
chrisnorthcott opened this issue · 2 comments
The current gr-baz git will not build giving a bunch of compilation errors in swig/. All dependencies are installed. All goes well up until compiling the swig wrapper stuff:
[ 50%] Building CXX object lib/CMakeFiles/gnuradio-baz.dir/baz_radar_detector.cc.o
[ 52%] Building CXX object lib/CMakeFiles/gnuradio-baz.dir/baz_fastrak_decoder.cc.o
[ 55%] Building CXX object lib/CMakeFiles/gnuradio-baz.dir/baz_rtl_source_c.cc.o
[ 57%] Building CXX object lib/CMakeFiles/gnuradio-baz.dir/rtl2832.cc.o
[ 60%] Building CXX object lib/CMakeFiles/gnuradio-baz.dir/rtl2832-tuner_e4000.cc.o
[ 62%] Building CXX object lib/CMakeFiles/gnuradio-baz.dir/rtl2832-tuner_fc0013.cc.o
[ 65%] Building CXX object lib/CMakeFiles/gnuradio-baz.dir/rtl2832-tuner_fc0012.cc.o
[ 67%] Building CXX object lib/CMakeFiles/gnuradio-baz.dir/rtl2832-tuner_fc2580.cc.o
[ 70%] Building CXX object lib/CMakeFiles/gnuradio-baz.dir/rtl2832-tuner_r820t.cc.o
[ 72%] Building CXX object lib/CMakeFiles/gnuradio-baz.dir/rtl2832-tuner_e4k.cc.o
[ 75%] Building CXX object lib/CMakeFiles/gnuradio-baz.dir/baz_gate.cc.o
Linking CXX shared library libgnuradio-baz.so
[ 75%] Built target gnuradio-baz
Scanning dependencies of target baz_swig_swig_doc
[ 75%] Built target baz_swig_swig_doc
Scanning dependencies of target baz_swig_swig_tag
[ 77%] Building CXX object swig/CMakeFiles/baz_swig_swig_tag.dir/baz_swig_swig_tag.cpp.o
Linking CXX executable baz_swig_swig_tag
[ 77%] Built target baz_swig_swig_tag
[ 80%] Generating baz_swig.tag
[ 82%] Swig source
Scanning dependencies of target baz_swig
[ 85%] Building CXX object swig/CMakeFiles/baz_swig.dir/baz_swigPYTHON_wrap.cxx.o
/home/chris/gr-baz/b/swig/baz_swigPYTHON_wrap.cxx: In function 'std::vectorstd::basic_string* std_vector_Sl_std_string_Sg____getitem____SWIG_0(std::vectorstd::basic_string, PySliceObject)':
/home/chris/gr-baz/b/swig/baz_swigPYTHON_wrap.cxx:5646: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_)'
PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
^
/home/chris/gr-baz/b/swig/baz_swigPYTHON_wrap.cxx: In function 'void std_vector_Sl_std_string_Sg____setitem____SWIG_0(std::vectorstd::basic_string, PySliceObject, const std::vectorstd::basic_string&)':
/home/chris/gr-baz/b/swig/baz_swigPYTHON_wrap.cxx:5657: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_)'
PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
^
/home/chris/gr-baz/b/swig/baz_swigPYTHON_wrap.cxx: In function 'void std_vector_Sl_std_string_Sg____setitem____SWIG_1(std::vectorstd::basic_string, PySliceObject)':
/home/chris/gr-baz/b/swig/baz_swigPYTHON_wrap.cxx:5668: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_)'
PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
^
/home/chris/gr-baz/b/swig/baz_swigPYTHON_wrap.cxx: In function 'void std_vector_Sl_std_string_Sg____delitem____SWIG_1(std::vectorstd::basic_string, PySliceObject)':
/home/chris/gr-baz/b/swig/baz_swigPYTHON_wrap.cxx:5679: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_)'
PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
^
swig/CMakeFiles/_baz_swig.dir/build.make:102: recipe for target 'swig/CMakeFiles/baz_swig.dir/baz_swigPYTHON_wrap.cxx.o' failed
make[2]: ** [swig/CMakeFiles/_baz_swig.dir/baz_swigPYTHON_wrap.cxx.o] Error 1
CMakeFiles/Makefile2:165: recipe for target 'swig/CMakeFiles/_baz_swig.dir/all' failed
make[1]: *** [swig/CMakeFiles/_baz_swig.dir/all] Error 2
Makefile:126: recipe for target 'all' failed
make: *** [all] Error 2
Changing
define SWIGCPY_SLICE_ARG(arg) ((PySliceObject *)arg)
to
define SWICGPY_SLICE_ARG(arg) ((PyObject *) arg)
in the named source file seems to let the build finish but the resulting blocks do not work in GR and cause early termination.
Running Arch rolling release, both gnuradio and gr-baz have been pulled down from git today.
Well, I found the cause of this; Arch has both python3 and python2.7 installed (with 3.0 as the default) and cmake was selecting python3's headers whereas the generated files from swig will only build with 2.7.
Doing pacman -Rdd python
as root, building both gnuradio and gr-baz from git, and then reinstalling the python package (pacman -S python) fixed the problem. Although through all this I seem to have broken gnuradio in the process so once I've finished rebuilding everything and tested this solution properly I will close this issue.
Everything works fine with the fix above. Three days I've been trying to get gr-baz to build (primarily for the autocorrelation sink) and finally success!
Closing.