Building gnuradio on cygwin - wxPython issue

Hi,

I should know better, but I am nonetheless trying to build gnuradio on
Windows XP/cygwin. I did follow the instructions on the wiki (including
picking the exact versions), but I am getting stuck on building
wxPython.
When I try to do the
python setup.py install WXPORT=msw COMPILER=cygwin BUILD_GLCANVAS=0
BUILD_GIZMOS=0 UNICODE=0
step, I get the following error:

function
Traceback (most recent call last):
File “setup.py”, line 1034, in
**other_kw
File “/usr/lib/python2.6/distutils/core.py”, line 152, in setup
dist.run_commands()
File “/usr/lib/python2.6/distutils/dist.py”, line 975, in run_commands
self.run_command(cmd)
File “/usr/lib/python2.6/distutils/dist.py”, line 995, in run_command
cmd_obj.run()
File “/usr/lib/python2.6/distutils/command/install.py”, line 577, in
run
self.run_command(‘build’)
File “/usr/lib/python2.6/distutils/cmd.py”, line 333, in run_command
self.distribution.run_command(command)
File “/usr/lib/python2.6/distutils/dist.py”, line 995, in run_command
cmd_obj.run()
File “/usr/lib/python2.6/distutils/command/build.py”, line 134, in run
self.run_command(cmd_name)
File “/usr/lib/python2.6/distutils/cmd.py”, line 333, in run_command
self.distribution.run_command(command)
File “/usr/lib/python2.6/distutils/dist.py”, line 995, in run_command
cmd_obj.run()
File “/usr/lib/python2.6/distutils/command/build_ext.py”, line 340, in
run
self.build_extensions()
File “/usr/lib/python2.6/distutils/command/build_ext.py”, line 449, in
build_extensions
self.build_extension(ext)
File “/usr/lib/python2.6/distutils/command/build_ext.py”, line 531, in
build_extension
target_lang=language)
File “/usr/lib/python2.6/distutils/ccompiler.py”, line 769, in
link_shared_object
extra_preargs, extra_postargs, build_temp, target_lang)
File “/usr/lib/python2.6/distutils/cygwinccompiler.py”, line 189, in
link
libraries.extend(self.dll_libraries)
TypeError: ‘NoneType’ object is not iterable

The offending line 189 is a rather nondescript
libraries.extend(self.dll_libraries)

Has anybody who is more pythonic than me seen this before? My cygwin
version is current as of last Wednesday, and the python version is 2.6.5
(no other python installations on the machine).

Thanks for any insights,
Jan

Jan S. wrote:

File “setup.py”, line 1034, in
**other_kw
File “/usr/lib/python2.6/distutils/core.py”, line 152, in setup
dist.run_commands()
File “/usr/lib/python2.6/distutils/dist.py”, line 975, in run_commands
self.run_command(cmd)

Has anybody who is more pythonic than me seen this before? My cygwin
version is current as of last Wednesday, and the python version is 2.6.5
(no other python installations on the machine).

My latest test install of Cygwin and GNU Radio (May 2010) used python
2.5.5.
You could try going back to that version. I will try to look at it over
the
weekend and see if I can make it work with 2.6.5.

While I try to keep GNU Radio running under Cygwin, every update to a
Cygwin
package or third-party library (such as wxPython) carries a significant
risk
of breakage. For “production” use of GNU Radio on Windows, I prefer to
use
MinGW and MSYS. The initial setup takes a little longer, but once you
have
a working system there is seldom a need to update anything but GNU
Radio.

– Don W.

On 7/3/2010 6:13 AM, Don W. wrote:

link_shared_object
version is current as of last Wednesday, and the python version is 2.6.5
little longer, but once you have a working system there is seldom a
need to update anything but GNU Radio.

– Don W.

Thanks Don, this is good advice, I have been hit by cygwin
update-related breakages for other applications as well. I will try the
MinGW/MSYS route instead and report back.

Jan

Jan S. wrote:

I should know better, but I am nonetheless trying to build gnuradio on
Windows XP/cygwin. I did follow the instructions on the wiki (including
picking the exact versions), but I am getting stuck on building
wxPython.
. . .

While I try to keep GNU Radio running under Cygwin, every update to a
Cygwin package or third-party library (such as wxPython) carries a
significant risk of breakage. For “production” use of GNU Radio on
Windows, I prefer to use MinGW and MSYS. The initial setup takes a
little longer, but once you have a working system there is seldom a need
to update anything but GNU Radio.
. . .
Thanks Don, this is good advice, I have been hit by cygwin update-related
breakages for other applications as well. I will try the MinGW/MSYS route
instead and report back.

I have attached a python script I used to install GNU Radio on
MinGW/MSYS.
It has only basic error checking and no documentation, but you may find
it
helpful. If nothing else, it lists the version numbers and file
locations
of all the pieces. To use it, read the start of the script and edit the
install options and location as needed. Let me know if you find it
useful.

– Don W.

Jan S. wrote:

File “setup.py”, line 1034, in
**other_kw
File “/usr/lib/python2.6/distutils/core.py”, line 152, in setup
dist.run_commands()
File “/usr/lib/python2.6/distutils/dist.py”, line 975, in run_commands
self.run_command(cmd)
. . .
(no other python installations on the machine).
The problem is a Cygwin-specific error in the Python release. A patch
(for
/usr/lib/python2.6/distutils/cygwinccompiler.py) is attached.

I haven’t done a complete install with the latest Cygwin, but I have
found
several things to watch out for:

(1) As noted in the wiki, GNU Radio does not work with gcc4 (4.3.4);
use
gcc (3.4.4) instead.

(2) The latest cppunit (1.12.1-1) only works with gcc4; use 1.12.0-1
instead.

(3) Do not try to use the Cygwin libboost* packages; they not only
require
gcc4, but will install gcc4 and make it the default. Build boost from
source as described in the wiki.

In general, it appears that Cygwin is moving away from supporting gcc
3.x.
I will follow up on the issue that is preventing GNU Radio from working
with
gcc4 (on Cygwin) and hope it can be resolved before support for gcc 3.x
(on
Cygwin) is removed.

– Don W.

Hi Don,

I am also running into this error. I downloaded your patch and put it
into my /usr/lib/python2.6/distutils folder. On Cygwin, I tried to run

$ patch cygwinccompiler.patch

but it seems to never finishes executing even after about 45 minutes.
Should I just let it keep running or am I approaching this incorrectly?
Thank you for your help.

UPDATE:

I got it to work, thank you for the patch. Works like a charm

-Daniel

Don W. wrote in post #923546:

Jan S. wrote:

File “setup.py”, line 1034, in
**other_kw
File “/usr/lib/python2.6/distutils/core.py”, line 152, in setup
dist.run_commands()
File “/usr/lib/python2.6/distutils/dist.py”, line 975, in run_commands
self.run_command(cmd)
. . .
(no other python installations on the machine).
The problem is a Cygwin-specific error in the Python release. A patch
(for
/usr/lib/python2.6/distutils/cygwinccompiler.py) is attached.

I haven’t done a complete install with the latest Cygwin, but I have
found
several things to watch out for:

(1) As noted in the wiki, GNU Radio does not work with gcc4 (4.3.4);
use
gcc (3.4.4) instead.

(2) The latest cppunit (1.12.1-1) only works with gcc4; use 1.12.0-1
instead.

(3) Do not try to use the Cygwin libboost* packages; they not only
require
gcc4, but will install gcc4 and make it the default. Build boost from
source as described in the wiki.

In general, it appears that Cygwin is moving away from supporting gcc
3.x.
I will follow up on the issue that is preventing GNU Radio from working
with
gcc4 (on Cygwin) and hope it can be resolved before support for gcc 3.x
(on
Cygwin) is removed.

– Don W.

Hi Don,

I am also running into this error. I downloaded your patch and put it
into my /usr/lib/python2.6/distutils folder. On Cygwin, I tried to run

$ patch cygwinccompiler.patch

but it seems to never finishes executing even after about 45 minutes.
Should I just let it keep running or am I approaching this incorrectly?
Thank you for your help.