Errors while trying to compile UCLAZigBee

Hello list!

I am getting some errors while trying to install UCLAZigBee project. I
am using GNU Radio 3.3.0 on Ubuntu 10.10.
Here are the outputs of make and make install - could someone point out
what these errors mean/how to solve them?
I am unable to start any of the examples due to “cannot import name
ucla” - I think libraries aren’t installed (I have set pythonpath to
point to where the module is supposed to be)?

kresimir@kresimir-Latitude-D420:~/ucla_zigbee_phy$ make
make all-recursive
make[1]: Entering directory /home/kresimir/ucla_zigbee_phy' Making all in config make[2]: Entering directory/home/kresimir/ucla_zigbee_phy/config’
make[2]: Nothing to be done for all'. make[2]: Leaving directory/home/kresimir/ucla_zigbee_phy/config’
Making all in src
make[2]: Entering directory /home/kresimir/ucla_zigbee_phy/src' Making all in lib make[3]: Entering directory/home/kresimir/ucla_zigbee_phy/src/lib’
/usr/bin/swig -c++ -fvirtual -python -modern -I/usr/include/python2.6
-I/usr/local/include/gnuradio/swig -I/usr/local/include/gnuradio -module
ucla -o ucla.cc ucla.i
make all-am
make[4]: Entering directory /home/kresimir/ucla_zigbee_phy/src/lib' /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -pthread -I/usr/local/include/gnuradio -I/usr/local/include -I/usr/include/python2.6 -g -O2 -Wall -Woverloaded-virtual -pthread -MT ucla.lo -MD -MP -MF .deps/ucla.Tpo -c -o ucla.lo ucla.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -pthread -I/usr/local/include/gnuradio -I/usr/local/include -I/usr/include/python2.6 -g -O2 -Wall -Woverloaded-virtual -pthread -MT ucla.lo -MD -MP -MF .deps/ucla.Tpo -c ucla.cc -fPIC -DPIC -o .libs/ucla.o ucla.cc: In function PyObject* SwigPyObject_richcompare(SwigPyObject*, SwigPyObject*, int): ucla.cc:1543: warning: dereferencing pointer res does break strict-aliasing rules ucla.cc:1543: warning: dereferencing pointer res does break strict-aliasing rules ucla.cc:1540: note: initialized from here ucla.cc:1542: note: initialized from here ucla.cc: In function PyObject* _wrap_new_ucla_sos_packet_sink_sptr(PyObject*, PyObject*): ucla.cc:4899: warning: argv[0] may be used uninitialized in this function ucla.cc: In function PyObject* _wrap_new_ucla_cc1k_correlator_cb_sptr(PyObject*, PyObject*): ucla.cc:4351: warning: argv[0] may be used uninitialized in this function ucla.cc: In function PyObject* _wrap_new_ucla_qpsk_modulator_cc_sptr(PyObject*, PyObject*): ucla.cc:5991: warning: argv[0] may be used uninitialized in this function ucla.cc: In function PyObject* _wrap_new_ucla_ieee802_15_4_packet_sink_sptr(PyObject*, PyObject*): ucla.cc:5453: warning: argv[0] may be used uninitialized in this function ucla.cc: In function PyObject* _wrap_new_ucla_multichanneladd_cc_sptr(PyObject*, PyObject*): ucla.cc:8048: warning: argv[0] may be used uninitialized in this function ucla.cc: In function PyObject* _wrap_new_ucla_delay_cc_sptr(PyObject*, PyObject*): ucla.cc:7527: warning: argv[0] may be used uninitialized in this function ucla.cc: In function PyObject* _wrap_new_ucla_manchester_ff_sptr(PyObject*, PyObject*): ucla.cc:7015: warning: argv[0] may be used uninitialized in this function ucla.cc: In function PyObject* _wrap_new_ucla_symbols_to_chips_bi_sptr(PyObject*, PyObject*): ucla.cc:6503: warning: argv[0] may be used uninitialized in this function mv -f .deps/ucla.Tpo .deps/ucla.Plo /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -pthread -I/usr/local/include/gnuradio -I/usr/local/include -I/usr/include/python2.6 -g -O2 -Wall -Woverloaded-virtual -pthread -MT ucla_cc1k_correlator_cb.lo -MD -MP -MF .deps/ucla_cc1k_correlator_cb.Tpo -c -o ucla_cc1k_correlator_cb.lo ucla_cc1k_correlator_cb.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -pthread -I/usr/local/include/gnuradio -I/usr/local/include -I/usr/include/python2.6 -g -O2 -Wall -Woverloaded-virtual -pthread -MT ucla_cc1k_correlator_cb.lo -MD -MP -MF .deps/ucla_cc1k_correlator_cb.Tpo -c ucla_cc1k_correlator_cb.cc -fPIC -DPIC -o .libs/ucla_cc1k_correlator_cb.o ucla_cc1k_correlator_cb.cc: In member function void ucla_cc1k_correlator_cb::enter_looking(): ucla_cc1k_correlator_cb.cc:119: error: stdout was not declared in this scope ucla_cc1k_correlator_cb.cc:119: error: fflush was not declared in this scope ucla_cc1k_correlator_cb.cc: In member function void ucla_cc1k_correlator_cb::enter_under_threshold(): ucla_cc1k_correlator_cb.cc:138: error: stdout was not declared in this scope ucla_cc1k_correlator_cb.cc:138: error: fflush was not declared in this scope ucla_cc1k_correlator_cb.cc: In member function void ucla_cc1k_correlator_cb::enter_locked(): ucla_cc1k_correlator_cb.cc:154: error: stdout was not declared in this scope ucla_cc1k_correlator_cb.cc:154: error: fflush was not declared in this scope ucla_cc1k_correlator_cb.cc: In member function virtual int ucla_cc1k_correlator_cb::general_work(int, gr_vector_int&, gr_vector_const_void_star&, gr_vector_void_star&): ucla_cc1k_correlator_cb.cc:253: error: printf was not declared in this scope ucla_cc1k_correlator_cb.cc:252: warning: unused variable errors ucla_cc1k_correlator_cb.cc:272: warning: comparison between signed and unsigned integer expressions make[4]: *** [ucla_cc1k_correlator_cb.lo] Error 1 make[4]: Leaving directory/home/kresimir/ucla_zigbee_phy/src/lib’
make[3]: *** [all] Error 2
make[3]: Leaving directory /home/kresimir/ucla_zigbee_phy/src/lib' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory/home/kresimir/ucla_zigbee_phy/src’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/kresimir/ucla_zigbee_phy’
make: *** [all] Error 2

kresimir@kresimir-Latitude-D420:~/ucla_zigbee_phy$ sudo make install
[sudo] password for kresimir:
Making install in config
make[1]: Entering directory /home/kresimir/ucla_zigbee_phy/config' make[2]: Entering directory/home/kresimir/ucla_zigbee_phy/config’
make[2]: Nothing to be done for install-exec-am'. make[2]: Nothing to be done forinstall-data-am’.
make[2]: Leaving directory /home/kresimir/ucla_zigbee_phy/config' make[1]: Leaving directory/home/kresimir/ucla_zigbee_phy/config’
Making install in src
make[1]: Entering directory /home/kresimir/ucla_zigbee_phy/src' Making install in lib make[2]: Entering directory/home/kresimir/ucla_zigbee_phy/src/lib’
make install-am
make[3]: Entering directory /home/kresimir/ucla_zigbee_phy/src/lib' /bin/bash ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -pthread -I/usr/local/include/gnuradio -I/usr/local/include -I/usr/include/python2.6 -g -O2 -Wall -Woverloaded-virtual -pthread -MT ucla_cc1k_correlator_cb.lo -MD -MP -MF .deps/ucla_cc1k_correlator_cb.Tpo -c -o ucla_cc1k_correlator_cb.lo ucla_cc1k_correlator_cb.cc libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -pthread -I/usr/local/include/gnuradio -I/usr/local/include -I/usr/include/python2.6 -g -O2 -Wall -Woverloaded-virtual -pthread -MT ucla_cc1k_correlator_cb.lo -MD -MP -MF .deps/ucla_cc1k_correlator_cb.Tpo -c ucla_cc1k_correlator_cb.cc -fPIC -DPIC -o .libs/ucla_cc1k_correlator_cb.o ucla_cc1k_correlator_cb.cc: In member function void ucla_cc1k_correlator_cb::enter_looking(): ucla_cc1k_correlator_cb.cc:119: error: stdout was not declared in this scope ucla_cc1k_correlator_cb.cc:119: error: fflush was not declared in this scope ucla_cc1k_correlator_cb.cc: In member function void ucla_cc1k_correlator_cb::enter_under_threshold(): ucla_cc1k_correlator_cb.cc:138: error: stdout was not declared in this scope ucla_cc1k_correlator_cb.cc:138: error: fflush was not declared in this scope ucla_cc1k_correlator_cb.cc: In member function void ucla_cc1k_correlator_cb::enter_locked(): ucla_cc1k_correlator_cb.cc:154: error: stdout was not declared in this scope ucla_cc1k_correlator_cb.cc:154: error: fflush was not declared in this scope ucla_cc1k_correlator_cb.cc: In member function virtual int ucla_cc1k_correlator_cb::general_work(int, gr_vector_int&, gr_vector_const_void_star&, gr_vector_void_star&): ucla_cc1k_correlator_cb.cc:253: error: printf was not declared in this scope ucla_cc1k_correlator_cb.cc:252: warning: unused variable errors ucla_cc1k_correlator_cb.cc:272: warning: comparison between signed and unsigned integer expressions make[3]: *** [ucla_cc1k_correlator_cb.lo] Error 1 make[3]: Leaving directory/home/kresimir/ucla_zigbee_phy/src/lib’
make[2]: *** [install] Error 2
make[2]: Leaving directory /home/kresimir/ucla_zigbee_phy/src/lib' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory/home/kresimir/ucla_zigbee_phy/src’
make: *** [install-recursive] Error 1

the output for configure:
kresimir@kresimir-Latitude-D420:~/ucla_zigbee_phy$ ./configure
checking build system type… i686-pc-linux-gnu
checking host system type… i686-pc-linux-gnu
checking target system type… i686-pc-linux-gnu
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for a thread-safe mkdir -p… /bin/mkdir -p
checking for gawk… no
checking for mawk… mawk
checking whether make sets $(MAKE)… yes
checking for style of include used by make… GNU
checking for g++… g++
checking whether the C++ compiler works… yes
checking for C++ compiler default output file name… a.out
checking for suffix of executables…
checking whether we are cross compiling… no
checking for suffix of object files… o
checking whether we are using the GNU C++ compiler… yes
checking whether g++ accepts -g… yes
checking dependency style of g++… gcc3
checking how to run the C++ preprocessor… g++ -E
checking whether C++ has bool… yes
checking whether C++ has buggy scoping in for-loops… yes
checking whether user wants assertions… yes
checking whether C++ has std::isnan… no
checking whether user wants warnings… yes
checking whether g++ accepts -Wall… yes
checking whether g++ accepts -Woverloaded-virtual… yes
checking whether user wants gprof… no
checking whether user wants prof… no
checking for gcc… gcc
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ISO C89… none needed
checking dependency style of gcc… gcc3
checking whether ln -s works… yes
checking whether make sets $(MAKE)… (cached) yes
checking for a sed that does not truncate output… /bin/sed
checking for grep that handles long lines and -e… /bin/grep
checking for egrep… /bin/grep -E
checking for fgrep… /bin/grep -F
checking for ld used by gcc… /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld… yes
checking for BSD- or MS-compatible name lister (nm)… /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface… BSD nm
checking the maximum length of command line arguments… 1572864
checking whether the shell understands some XSI constructs… yes
checking whether the shell understands “+=”… yes
checking for /usr/bin/ld option to reload object files… -r
checking for objdump… objdump
checking how to recognize dependent libraries… pass_all
checking for ar… ar
checking for strip… strip
checking for ranlib… ranlib
checking command to parse /usr/bin/nm -B output from gcc object… ok
checking how to run the C preprocessor… gcc -E
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking for dlfcn.h… yes
checking whether we are using the GNU C++ compiler… (cached) yes
checking whether g++ accepts -g… (cached) yes
checking dependency style of g++… (cached) gcc3
checking how to run the C++ preprocessor… g++ -E
checking for objdir… .libs
checking if gcc supports -fno-rtti -fno-exceptions… no
checking for gcc option to produce PIC… -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works… yes
checking if gcc static flag -static works… yes
checking if gcc supports -c -o file.o… yes
checking if gcc supports -c -o file.o… (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared
libraries… yes
checking whether -lc should be explicitly linked in… no
checking dynamic linker characteristics… GNU/Linux ld.so
checking how to hardcode library paths into programs… immediate
checking whether stripping libraries is possible… yes
checking if libtool supports shared libraries… yes
checking whether to build shared libraries… yes
checking whether to build static libraries… no
checking for ld used by g++… /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld… yes
checking whether the g++ linker (/usr/bin/ld) supports shared
libraries… yes
checking for g++ option to produce PIC… -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works… yes
checking if g++ static flag -static works… yes
checking if g++ supports -c -o file.o… yes
checking if g++ supports -c -o file.o… (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared
libraries… yes
checking dynamic linker characteristics… GNU/Linux ld.so
checking how to hardcode library paths into programs… immediate
checking for python… /usr/bin/python
checking for python version… 2.6
checking for python platform… linux2
checking for python script directory…
${prefix}/lib/python2.6/dist-packages
checking for python extension module directory…
${exec_prefix}/lib/python2.6/dist-packages
checking for Python include path… /usr/include/python2.6
checking Python.h usability… yes
checking Python.h presence… yes
checking for Python.h… yes
checking for swig… /usr/bin/swig
checking for SWIG version… 1.3.40
checking for the pthreads library -lpthreads… no
checking whether pthreads work without any flags… no
checking whether pthreads work with -Kthread… no
checking whether pthreads work with -kthread… no
checking for the pthreads library -llthread… no
checking whether pthreads work with -pthread… yes
checking for joinable pthread attribute… PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads… no
checking for cc_r… gcc
checking for library containing clock_gettime… -lrt
checking for clock_gettime… yes
checking for gettimeofday… yes
checking for nanosleep… yes
checking for ANSI C header files… (cached) yes
checking for sys/wait.h that is POSIX.1 compatible… yes
checking fcntl.h usability… yes
checking fcntl.h presence… yes
checking for fcntl.h… yes
checking limits.h usability… yes
checking limits.h presence… yes
checking for limits.h… yes
checking for strings.h… (cached) yes
checking sys/ioctl.h usability… yes
checking sys/ioctl.h presence… yes
checking for sys/ioctl.h… yes
checking sys/time.h usability… yes
checking sys/time.h presence… yes
checking for sys/time.h… yes
checking for unistd.h… (cached) yes
checking sys/mman.h usability… yes
checking sys/mman.h presence… yes
checking for sys/mman.h… yes
checking for an ANSI C-conforming const… yes
checking for inline… inline
checking for size_t… yes
checking whether time.h and sys/time.h may both be included… yes
checking for dummy… no
checking for cc_r… no
checking for sys/types.h… (cached) yes
checking for fcntl.h… (cached) yes
checking io.h usability… no
checking io.h presence… no
checking for io.h… no
checking windows.h usability… no
checking windows.h presence… no
checking for windows.h… no
checking for winioctl.h… no
checking for winbase.h… no
checking for getopt… yes
checking for usleep… yes
checking for gettimeofday… (cached) yes
checking for nanosleep… (cached) yes
checking for rand… yes
checking for srand… yes
checking for random… yes
checking for srandom… yes
checking for sleep… yes
checking for sigaction… yes
checking for struct timezone… yes
checking for struct timespec… yes
checking for ssize_t… yes
checking for getopt… (cached) yes
checking for usleep… (cached) yes
checking for gettimeofday… (cached) yes
checking for Sleep… no
checking whether mkdir accepts only one arg… no
checking for pkg-config… /usr/bin/pkg-config
checking for gnuradio-core >= 2… yes
checking GNURADIO_CORE_CFLAGS… -pthread -I/usr/local/include/gnuradio
-I/usr/local/include
checking GNURADIO_CORE_LIBS… -L/usr/local/lib -lgnuradio-core -lgruel
-lfftw3f -lgsl -lgslcblas -lm
checking GNURADIO_CORE_INCLUDEDIR… /usr/local/include/gnuradio
gr_boost_include_dir =
checking boost/shared_ptr.hpp usability… yes
checking boost/shared_ptr.hpp presence… yes
checking for boost/shared_ptr.hpp… yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config/Makefile
config.status: creating doc/Makefile
config.status: creating src/Makefile
config.status: creating src/lib/Makefile
config.status: creating src/python/Makefile
config.status: creating src/python/run_tests
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing run_tests commands

Any help would be appreciated.

Regards,
Kresimir

On Tue, 2011-05-17 at 13:50 +0200, Kresimir Dabcevic wrote:

Hello list!

I am getting some errors while trying to install UCLAZigBee project. I
am using GNU Radio 3.3.0 on Ubuntu 10.10.
Here are the outputs of make and make install - could someone point
out what these errors mean/how to solve them?
I am unable to start any of the examples due to “cannot import name
ucla” - I think libraries aren’t installed (I have set pythonpath to
point to where the module is supposed to be)?

The errors are pretty standard C missing header errors. Just add

#include <stdio.h>

to the top of every file that gives you an error. Some compilers seem to
default to including standard headers, others don’t.

–n

On Wed, 2011-05-18 at 11:46 +0200, Kresimir Dabcevic wrote:

ucla" - I think libraries aren’t installed (I have set pythonpath

to the top of every file that gives you an error. Some compilers seem
to
default to including standard headers, others don’t.

–n

Great, thanks.
Has anyone succeeded in modifying the UCLA examples to work with UHD
maybe?

Not that I know of, but it shouldn’t be particularly hard to make those
changes. I’m not sure the UCLA project is still maintained.

–n

If I recall, the project belonged to a masters student that graduated
around two years ago. So I doubt that it is still maintained.