Forum: GNU Radio Cygwin Python Import Error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Brian P. (Guest)
on 2007-02-10 23:18
(Received via mailing list)
I had an old version of GNURadio installed on my cygwin setup, but
decided to get the current development version in the svn repository.

After checking it out, bootstrapping, configuring and starting a make
- I had an error where the linker complained about omnithread being
made into a static library and not shared followed by a whole bunch of
missing omnithread declarations.

I got around this by doing --enable-shared=omnithread at configure,
and it went past that point.  Once the build was successful, I went
and did an make install and tried to run python and import gr.  Here
are the results:

$ python
Python 2.4.3 (#1, May 18 2006, 07:40:45)
[GCC 3.3.3 (cygwin special)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from gnuradio import gr
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.4/site-packages/gnuradio/gr/__init__.py",
line 27, in ?
    from gnuradio_swig_python import *
  File
"/usr/local/lib/python2.4/site-packages/gnuradio/gr/gnuradio_swig_python.py",
line 23, in ?
    from gnuradio_swig_py_runtime import *
  File
"/usr/local/lib/python2.4/site-packages/gnuradio/gr/gnuradio_swig_py_runtime.py",
line 6, in ?
    import _gnuradio_swig_py_runtime
ImportError: No module named _gnuradio_swig_py_runtime

I have 2 files in /usr/local/lib/python2.4/site-packages/gnuradio/gr
with the name _gnuradio_swig_py_runtime - one an ar archive and the
other a libtool library file.

After this error, I went and tried make check and I fail with the error:

make  check-TESTS
make[4]: Entering directory `/tmp/gnuradio/gnuradio-core/src/tests'
  14645 [main] test_all 620 _cygtls::handle_exceptions: Error while
dumping state (probably corrupted stack)
/bin/sh: line 4:   620 Segmentation fault      (core dumped) ${dir}$tst
FAIL: test_all.exe
===================
1 of 1 tests failed
===================
make[4]: *** [check-TESTS] Error 1
make[4]: Leaving directory `/tmp/gnuradio/gnuradio-core/src/tests'
make[3]: *** [check-am] Error 2
make[3]: Leaving directory `/tmp/gnuradio/gnuradio-core/src/tests'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory `/tmp/gnuradio/gnuradio-core/src'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/tmp/gnuradio/gnuradio-core'
make: *** [check-recursive] Error 1

I really have no idea what's going on, so any help would be appreciated.

Brian
Don W. (Guest)
on 2007-02-12 03:16
(Received via mailing list)
"Brian P." <removed_email_address@domain.invalid> wrote:

>I had an old version of GNURadio installed on my cygwin setup, but
> decided to get the current development version in the svn repository.
>
> After checking it out, bootstrapping, configuring and starting a make
> - I had an error where the linker complained about omnithread being
> made into a static library and not shared followed by a whole bunch of
> missing omnithread declarations.
>
> I got around this by doing --enable-shared=omnithread at configure,
> and it went past that point.

This has the same effect as --enable-shared=no, which won't work.  (The
documentation on the --enable-shared option is misleading.)

>  File "<stdin>", line 1, in ?
>    import _gnuradio_swig_py_runtime
> ImportError: No module named _gnuradio_swig_py_runtime
>
> I have 2 files in /usr/local/lib/python2.4/site-packages/gnuradio/gr
> with the name _gnuradio_swig_py_runtime - one an ar archive and the
> other a libtool library file.

As expected, no .dll files are produced when --enable-shared is turned
off.

When the omnithread library was made into a separate module, some magic
needed to make it work on windows was omitted.  These are supplied in
the
attached .patch files (to use: cd gnuradio; patch -p0 -i foo.patch).
Rerun
./bootstrap and ./config after applying the patches.  See ticket #138 at
www.gnuradio.org/trac for more details.

-- Don W.
Brian P. (Guest)
on 2007-02-12 15:27
(Received via mailing list)
On 2/11/07, Don W. <removed_email_address@domain.invalid> wrote:
>
> As expected, no .dll files are produced when --enable-shared is turned off.
>
> When the omnithread library was made into a separate module, some magic
> needed to make it work on windows was omitted.  These are supplied in the
> attached .patch files (to use: cd gnuradio; patch -p0 -i foo.patch).  Rerun
> ./bootstrap and ./config after applying the patches.  See ticket #138 at
> www.gnuradio.org/trac for more details.
>
> -- Don W.

I tried the patches, but was still unsuccessful.  I went to the 3.0.2
release and that works fine.  Thanks for the insight as to why svn was
not working properly.

Brian
This topic is locked and can not be replied to.