balint256 / gr-baz

Collection of new blocks for GNU Radio
http://wiki.spench.net/wiki/gr-baz
GNU General Public License v3.0
191 stars 78 forks source link

Can't build with clang #20

Open magnayn opened 11 years ago

magnayn commented 11 years ago

I'm trying to build for OS X, with homebrew.

gnu-radio has compiled correctly, but the cmake generated gr-baz doesn't seem to compile.

I suspect this might be to do with the c++ compiler being clang not gcc, but I'm not sure. It spits out the error below, so I can't figure out how gnuradio is happy with it.

-<%>- make
[ 2%] Building CXX object lib/CMakeFiles/gnuradio-baz.dir/baz_print_char.cc.o In file included from /Users/magnayn/dev/ettus/gr-baz2/lib/baz_print_char.cc:37: In file included from /Users/magnayn/dev/ettus/gr-baz2/lib/baz_print_char.h:31: In file included from /usr/local/include/gnuradio/gr_sync_block.h:27: In file included from /usr/local/include/gnuradio/gr_block.h:27: In file included from /usr/local/include/gnuradio/gr_basic_block.h:27: In file included from /usr/local/include/gnuradio/gr_runtime_types.h:27: In file included from /usr/local/include/gnuradio/gr_types.h:31: In file included from /usr/local/include/gnuradio/gr_complex.h:25: In file included from /usr/include/c++/4.2.1/complex:48: In file included from /usr/include/c++/4.2.1/cmath:53: /usr/local/include/gnuradio/math.h:60:10: error: 'inline' can only appear on functions static inline float ^ /usr/local/include/gnuradio/math.h:61:3: error: redefinition of 'fast_atan2f' as different kind of symbol fast_atan2f(gr_complex z) ^ /usr/local/include/gnuradio/math.h:58:24: note: previous definition is here GR_RUNTIME_API float fast_atan2f(float y, float x); ^ /usr/local/include/gnuradio/math.h:61:15: error: use of undeclared identifier 'gr_complex' fast_atan2f(gr_complex z) ^ /usr/local/include/gnuradio/math.h:61:28: error: expected ';' after top level declarator fast_atan2f(gr_complex z) ^ In file included from /Users/magnayn/dev/ettus/gr-baz2/lib/baz_print_char.cc:37: In file included from /Users/magnayn/dev/ettus/gr-baz2/lib/baz_print_char.h:31: In file included from /usr/local/include/gnuradio/gr_sync_block.h:27: In file included from /usr/local/include/gnuradio/gr_block.h:27: In file included from /usr/local/include/gnuradio/gr_basic_block.h:27: In file included from /usr/local/include/gnuradio/gr_runtime_types.h:27: In file included from /usr/local/include/gnuradio/gr_types.h:31: In file included from /usr/local/include/gnuradio/gr_complex.h:25: In file included from /usr/include/c++/4.2.1/complex:48: /usr/include/c++/4.2.1/cmath:99:11: error: no member named 'acos' in the global namespace using ::acos; ~~^ /usr/include/c++/4.2.1/cmath:115:11: error: no member named 'asin' in the global namespace using ::asin; ~~^ /usr/include/c++/4.2.1/cmath:131:11: error: no member named 'atan' in the global namespace using ::atan; ~~^ /usr/include/c++/4.2.1/cmath:147:11: error: no member named 'atan2' in the global namespace using ::atan2; ~~^ /usr/include/c++/4.2.1/cmath:164:11: error: no member named 'ceil' in the global namespace using ::ceil; ~~^ /usr/include/c++/4.2.1/cmath:180:11: error: no member named 'cos' in the global namespace using ::cos; ~~^ /usr/include/c++/4.2.1/cmath:196:11: error: no member named 'cosh' in the global namespace using ::cosh; ~~^ /usr/include/c++/4.2.1/cmath:212:11: error: no member named 'exp' in the global namespace using ::exp; ~~^ /usr/include/c++/4.2.1/cmath:228:11: error: no member named 'fabs' in the global namespace using ::fabs; ~~^ /usr/include/c++/4.2.1/cmath:244:11: error: no member named 'floor' in the global namespace using ::floor; ~~^ /usr/include/c++/4.2.1/cmath:260:11: error: no member named 'fmod' in the global namespace using ::fmod; ~~^ /usr/include/c++/4.2.1/cmath:270:11: error: no member named 'frexp' in the global namespace using ::frexp; ~~^ /usr/include/c++/4.2.1/cmath:286:11: error: no member named 'ldexp' in the global namespace using ::ldexp; ~~^ /usr/include/c++/4.2.1/cmath:302:11: error: no member named 'log' in the global namespace using ::log; ~~^ /usr/include/c++/4.2.1/cmath:318:11: error: no member named 'log10' in the global namespace using ::log10; ~~^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make[2]: * [lib/CMakeFiles/gnuradio-baz.dir/baz_print_char.cc.o] Error 1 make[1]: * [lib/CMakeFiles/gnuradio-baz.dir/all] Error 2 make: *\ [all] Error 2