Discussion:
Complex type not recognised in /osmocom/dsp/cxvec.h when building gr-iqbal
Shane MacPhillamy
2014-05-23 01:50:46 UTC
Permalink
I’m trying to build gr-iqbal on OSX 10.9. with Xcode 5 CLI tools LLVM 5.1. I have configure gr-iqbal as:

export BOOST_PREFIX=/Users/shanemacphillamy/Projects/BlinkMobile/gnuradio/boost_lib
export CPPUNIT_PREFIX=/Users/shanemacphillamy/Projects/BlinkMobile/gnuradio/cppunit_lib
#
# -DBOOST_ROOT=$BOOST_PREFIX -DBoost_INCLUDE_DIR=$BOOST_PREFIX/include/boost-1_56/ -DBoost_LIBRARY_DIRS=$BOOST_PREFIX/lib
#
CC=/usr/bin/llvm-gcc CXX=/usr/bin/llvm-g++ \
cmake -DPYTHON_EXECUTABLE=/usr/local/bin/python \
-DBOOST_ROOT=$BOOST_PREFIX \
-DBoost_INCLUDE_DIR=$BOOST_PREFIX/include/boost-1_56/ \
-DBoost_LIBRARY_DIRS=$BOOST_PREFIX/lib \
-DENABLE_TESTING=ON \
-DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/Headers \
-DPYTHON_LIBRARY=/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib \
..

When I run make I get the following syntax error reported I presume implying complex is not defined, any pointers on how I should try to resolve this please?

Scanning dependencies of target gnuradio-iqbalance
[ 7%] Building CXX object lib/CMakeFiles/gnuradio-iqbalance.dir/fix_cc.cc.o
[ 14%] Building CXX object lib/CMakeFiles/gnuradio-iqbalance.dir/optimize_c.cc.o
In file included from /Users/shanemacphillamy/Projects/BlinkMobile/gnuradio/gr-iqbal/lib/optimize_c.cc:40:
/Users/shanemacphillamy/Projects/BlinkMobile/gnuradio/gr-iqbal/libosmo-dsp/include/osmocom/dsp/cxvec.h:45:15: error: expected ';'
at end of declaration list
float complex *data; /*!< \brief Data field */
^
;
/Users/shanemacphillamy/Projects/BlinkMobile/gnuradio/gr-iqbal/libosmo-dsp/include/osmocom/dsp/cxvec.h:46:8: error: duplicate
member 'complex'
float complex _data[0]; /*!< \brief Optional inline data array */
^


Thanks.

Cheers, Shane
Sylvain Munaut
2014-05-23 05:42:00 UTC
Permalink
Post by Shane MacPhillamy
When I run make I get the following syntax error reported I presume implying
complex is not defined, any pointers on how I should try to resolve this
please?
Edit cxvec.h and try replacing #include <complex.h> with #include
"/usr/include/complex.h".

gr-iqbal is C++ (because Gnuradio is C++) but it depends of a C
library (libosmo-dsp) and in recent version of the C++ standard, they
managed to make C incompatible with C++ ... We have a workaround for
GCC under linux, but not for LLVM on OSX.



Cheers,

Sylvain
Shane MacPhillamy
2014-05-23 07:22:05 UTC
Permalink
Thanks, Sylvain - changing the to an absolute path builds successfully.

Cheers, Shane
Post by Sylvain Munaut
Post by Shane MacPhillamy
When I run make I get the following syntax error reported I presume implying
complex is not defined, any pointers on how I should try to resolve this
please?
Edit cxvec.h and try replacing #include <complex.h> with #include
"/usr/include/complex.h".
gr-iqbal is C++ (because Gnuradio is C++) but it depends of a C
library (libosmo-dsp) and in recent version of the C++ standard, they
managed to make C incompatible with C++ ... We have a workaround for
GCC under linux, but not for LLVM on OSX.
Cheers,
Sylvain
Loading...