discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Problems with getting block recognized


From: radio4pm
Subject: [Discuss-gnuradio] Problems with getting block recognized
Date: Wed, 30 Dec 2009 21:18:14 -0500
User-agent: Webmail 4.0

At the moment I have two problems and am unable to resolve whether they
are related to one another or different problems. 

The first is that I have a block built by someone else that enables
gnuradio to talk to a radio based on a Digilent Spartan 3E demo board
and an outboard daughter card that performs the A-D conversion. 
Supposedly this all works.  My problem is in getting gnuradio (and
python) to recognize the module.  I have gone back and reviewed very
carefully the instructions in "How to Write a Signal Processing Block"
and believe that I am following the instructions, but I think that
something is not ending up where it should go when I am done.  The
second problem is likely related in that the module is unable to find
the flowgraph class during the make check.  Any assistance with this  or
at least pointing me in the right direction would be greatly appreciated

Thanks,
-CAS

Problem description: 
System is Fedora 12.  The packages are installed
in /usr/share/lib/Python2.6/site-packages/gnuradio and the PYTHONPATH is
set to "/usr/share/lib/python2.6/site-packages/".  The output resulting
When I run the configure && make && make check follows.  This shows an
error in the test program in that it is unable to locate flowgraph.  I
am assuming that this means it is not locating the gnuradio python files
where this is declared, but no amount of adding libraries or changing
the PYTHONPATH seems to help in this regard.  So following up on an
e-mail thread suggestion, I executed the make install instruction.  This
installed the files (built without error) into
the /usr/local/lib/python2.6/site-packages/gnuradio/ directory and these
are the only files in this directory.  When I try to execute this within
python and load the gnuradio files as follows:

WEB_CONTROL = False

# Controls display of AM Sync Carrier - turn off for smaller
# window if not needed
AM_SYNC_DISPLAY = False

import os, wx, sys, math
import wx.lib.evtmgr as em
from gnuradio import blks2
from gnuradio.wxgui import powermate, fftsink2
from gnuradio import gr, audio, eng_notation, gru
from gnuradio.eng_option import eng_option
from optparse import OptionParser
import nexsdr

This fails stating that it is unable to locate module nexsdr.  I tried
moving the installed files (nexsdr.py, nexsdr.pyc, nexsdr.pyo,
_nexsdr.la, _nexsdr.os) to the site-packages/gnuradio directory with the
other gnuradio modules.  This did not change anything in the response. 

Here is the output of the ./configure, make, make check, and make
install commands:
address@hidden gr-nexsdr_76.8MHz]# ./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... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
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... yes
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 dependency style of gcc... gcc3
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for rm... /bin/rm
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... 1966080
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 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... no
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... no
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/site-packages
checking for python extension module directory... 
${exec_prefix}/lib/python2.6/site-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 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 >= 3... yes
checking GNURADIO_CORE_CFLAGS... -pthread -DOMNITHREAD_POSIX=1
-I/usr/include/gnuradio  
checking GNURADIO_CORE_LIBS... -lgnuradio-core -lboost_thread-mt -lrt
-lboost_date_time-mt -lgruel -lfftw3f -lgsl -lgslcblas -lm
-lgromnithread  
checking GNURADIO_CORE_INCLUDEDIR... /usr/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: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing run_tests commands
address@hidden gr-nexsdr_76.8MHz]# make
make  all-recursive
make[1]: Entering directory `/home/liveuser/Downloads/gr-nexsdr_76.8MHz'
Making all in config
make[2]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/config'
make[2]: Nothing to be done for `all'. 
make[2]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/config'
Making all in src
make[2]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src'
Making all in lib
make[3]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/lib'
make  all-am
make[4]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/lib'
make[4]: Nothing to be done for `all-am'. 
make[4]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/lib'
make[3]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/lib'
Making all in python
make[3]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/python'
make[3]: Nothing to be done for `all'. 
make[3]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/python'
make[3]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src'
make[3]: Nothing to be done for `all-am'. 
make[3]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src'
make[2]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src'
make[2]: Entering directory `/home/liveuser/Downloads/gr-nexsdr_76.8MHz'
make[2]: Leaving directory `/home/liveuser/Downloads/gr-nexsdr_76.8MHz'
make[1]: Leaving directory `/home/liveuser/Downloads/gr-nexsdr_76.8MHz'
address@hidden gr-nexsdr_76.8MHz]# make check
Making check in config
make[1]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/config'
make[1]: Nothing to be done for `check'. 
make[1]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/config'
Making check in src
make[1]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src'
Making check in lib
make[2]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/lib'
make  check-am
make[3]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/lib'
make[3]: Nothing to be done for `check-am'. 
make[3]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/lib'
make[2]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/lib'
Making check in python
make[2]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/python'
make  check-TESTS
make[3]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/python'
E
======================================================================
ERROR: test_000_nop (__main__.qa_usrp)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./qa_nexsdr.py", line 9, in setUp
    self.fg = gr.flow_graph ()
AttributeError: 'module' object has no attribute 'flow_graph'

----------------------------------------------------------------------
Ran 1 test in 0.001s

FAILED (errors=1)
FAIL: run_tests
===================
1 of 1 tests failed
===================
make[3]: *** [check-TESTS] Error 1
make[3]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/python'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/python'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src'
make: *** [check-recursive] Error 1
address@hidden gr-nexsdr_76.8MHz]# make install
Making install in config
make[1]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/config'
make[2]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/config'
make[2]: Nothing to be done for `install-exec-am'. 
make[2]: Nothing to be done for `install-data-am'. 
make[2]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/config'
make[1]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/config'
Making install in src
make[1]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src'
Making install in lib
make[2]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/lib'
make  install-am
make[3]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/lib'
make[4]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/lib'
make[4]: Nothing to be done for `install-exec-am'. 
test -z "/usr/local/include/gnuradio" || /bin/mkdir -p
"/usr/local/include/gnuradio"
 /usr/bin/install -c -m 644 'nexsdr_source_c.h'
'/usr/local/include/gnuradio/nexsdr_source_c.h'
test -z "/usr/local/lib/python2.6/site-packages/gnuradio" || /bin/mkdir
-p "/usr/local/lib/python2.6/site-packages/gnuradio"
 /bin/sh ../../libtool   --mode=install /usr/bin/install -c
'_nexsdr.la'
'/usr/local/lib/python2.6/site-packages/gnuradio/_nexsdr.la'
libtool: install: /usr/bin/install
-c .libs/_nexsdr.so /usr/local/lib/python2.6/site-packages/gnuradio/_nexsdr.so
libtool: install: /usr/bin/install
-c .libs/_nexsdr.lai /usr/local/lib/python2.6/site-packages/gnuradio/_nexsdr.la
libtool: finish:
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/sbin"
 ldconfig -n /usr/local/lib/python2.6/site-packages/gnuradio
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib/python2.6/site-packages/gnuradio

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages. 
----------------------------------------------------------------------
test -z "/usr/local/lib/python2.6/site-packages/gnuradio" || /bin/mkdir
-p "/usr/local/lib/python2.6/site-packages/gnuradio"
 /usr/bin/install -c -m 644 'nexsdr.py'
'/usr/local/lib/python2.6/site-packages/gnuradio/nexsdr.py'
Byte-compiling python modules... 
nexsdr.py
Byte-compiling python modules (optimized versions) ... 
nexsdr.py
test -z "/usr/local/include/gnuradio/swig" || /bin/mkdir -p
"/usr/local/include/gnuradio/swig"
 /usr/bin/install -c -m 644 '../../src/lib/nexsdr.i'
'/usr/local/include/gnuradio/swig/nexsdr.i'
make[4]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/lib'
make[3]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/lib'
make[2]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/lib'
Making install in python
make[2]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/python'
make[3]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/python'
make[3]: Nothing to be done for `install-exec-am'. 
make[3]: Nothing to be done for `install-data-am'. 
make[3]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/python'
make[2]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src/python'
make[2]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src'
make[3]: Entering directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src'
make[3]: Nothing to be done for `install-exec-am'. 
make[3]: Nothing to be done for `install-data-am'. 
make[3]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src'
make[2]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src'
make[1]: Leaving directory
`/home/liveuser/Downloads/gr-nexsdr_76.8MHz/src'
make[1]: Entering directory `/home/liveuser/Downloads/gr-nexsdr_76.8MHz'
make[2]: Entering directory `/home/liveuser/Downloads/gr-nexsdr_76.8MHz'
make[2]: Nothing to be done for `install-exec-am'. 
test -z "/usr/local/lib/pkgconfig" || /bin/mkdir -p
"/usr/local/lib/pkgconfig"
make[2]: Leaving directory `/home/liveuser/Downloads/gr-nexsdr_76.8MHz'
make[1]: Leaving directory `/home/liveuser/Downloads/gr-nexsdr_76.8MHz'







reply via email to

[Prev in Thread] Current Thread [Next in Thread]