Usrp/host build failure on MinGW

Build in usrp/host/misc is failing on MinGW with

tempname.c:315:4: error: too many arguments to function ‘mkdir’

It appears that the MKDIR_TAKES_ONE_ARGUMENT logic has been removed from
config/{mkstmp,gr_pwin32}.m4.

Anyone know the right way to fix this?

– Don W.

On 03/06/2011 08:33 AM, Don W. wrote:

Build in usrp/host/misc is failing on MinGW with

tempname.c:315:4: error: too many arguments to function ‘mkdir’

It appears that the MKDIR_TAKES_ONE_ARGUMENT logic has been removed from
config/{mkstmp,gr_pwin32}.m4.

Anyone know the right way to fix this?

The mkdir stuff was replaced with boost filesystem calls. I must have
forgot to grep the random c files in the host code. Can you try the diff
attached?

-josh

I am trying to install gnuradio on an XP machine under Cygwin.
I followed all the instructions at

http://gnuradio.org/redmine/wiki/gnuradio/CygwinInstallMain
And ran the configure minimal system without any problems ($ ./configure
–disable-all-components --enable-gruel --enable-gnuradio-core
–enable-gr-audio-oss).
When I run make, I get the following errors
/usr/bin/grep: /usr/lib/gcc/i686-pc-cygwin/4.3.2/libstdc++.la: No such
file or directorylibtoolL link:
`/usr/lib/gcc/i686-pc-cygwin/4.3.2.libstdc++.la’ is not a valid libtool
archivemake[5]: *** [libgnuradio-core-qa.la] Error 1
What might be going wrong here?
Best regards,-Vijay

Vijay P. wrote:

What might be going wrong here?
Someone wants gcc 4.3.2 libraries, but the Cygwin install instructions
assume you are using gcc 3.4.4. Is it possible that you have installed
cppunit 1.12.1 instead of 1.12.0? You need to be careful: Any updating
of
Cygwin packages will update cppupnit to 1.12.1 unless you specifically
tell
it not to in the “Pending” view of Cygwin setup.

As an aside, it is helpful when reporting problems like this to show a
little more of the output, including the libtool and g++ commands that
preceded the error message.

– Don W.

Josh B. wrote:

The mkdir stuff was replaced with boost filesystem calls. I must have
forgot to grep the random c files in the host code. Can you try the diff
attached?

Now it fails to find boost/filesystem/path.hpp. I think that
BOOST_INCLUDES
needs to be a part of the g++ command.

– Don W.

Hi Don,
You were absolutely right and thank you very much! I had 1.12.1
installed; I had double checked a couple of times to ensure that 1.12.0
was the one that was installed but then when I had updated a package it
automatically updated cppunit to 1.12.1.

Following this, I ran “make check” and “make install” and followed the
procedure to get the tone and it works so far.
Something that I want to note was that after running “make check” I did
get an error message but the program did not halt when it showed the
error. This error did not prevent the tone so maybe it does not matter.
For reference, I am attaching the error message at the end of this mail.
Best regards,-Vijay

Here is the error message at the end of running “make check”
FAIL: run_tests

1 of 1 test failed

make[6]: *** [check-TESTS] Error 1
make[6]: Leaving directory
/home/Vijay/gnuradio-3.3.0/gnuradio-core/src/python/ gnuradio/gr' make[5]: *** [check-am] Error 2 make[5]: Leaving directory /home/Vijay/gnuradio-3.3.0/gnuradio-core/src/python/
gnuradio/gr’
make[4]: *** [check-recursive] Error 1
make[4]: Leaving directory
/home/Vijay/gnuradio-3.3.0/gnuradio-core/src/python/ gnuradio' make[3]: *** [check-recursive] Error 1 make[3]: Leaving directory /home/Vijay/gnuradio-3.3.0/gnuradio-core/src/python’

make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory
/home/Vijay/gnuradio-3.3.0/gnuradio-core/src' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory /home/Vijay/gnuradio-3.3.0/gnuradio-core’
make: *** [check-recursive] Error 1
$

— On Sun, 3/6/11, Don W. [email protected] wrote:

From: Don W. [email protected]
Subject: Re: [Discuss-gnuradio] libstdc++ error on Cygwin
To: “Vijay P.” [email protected], [email protected]
Date: Sunday, March 6, 2011, 2:19 PM

Vijay P. wrote:

I am trying to install gnuradio on an XP machine under Cygwin.
I followed all the instructions at

http://gnuradio.org/redmine/wiki/gnuradio/CygwinInstallMain
And ran the configure minimal system without any problems […]
When I run make, I get the following errors
/usr/bin/grep: /usr/lib/gcc/i686-pc-cygwin/4.3.2/libstdc++.la: No such file or
directorylibtoolL link: `/usr/lib/gcc/i686-pc-cygwin/4.3.2.libstdc++.la’ is not a
valid libtool archivemake[5]: *** [libgnuradio-core-qa.la] Error 1
What might be going wrong here?

Someone wants gcc 4.3.2 libraries, but the Cygwin install instructions
assume you are using gcc 3.4.4. Is it possible that you have installed
cppunit 1.12.1 instead of 1.12.0? You need to be careful: Any updating
of Cygwin packages will update cppupnit to 1.12.1 unless you
specifically tell it not to in the “Pending” view of Cygwin setup.

As an aside, it is helpful when reporting problems like this to show a
little more of the output, including the libtool and g++ commands that
preceded the error message.

– Don W.

Hi Don,

Here is the what was displayed earlier, exactly when the error occured.
When I ran “make check” a couple of times afterward (one after the
other), eventually it passed without any errors

Best regards,
-Vijay


======================================================================
ERROR: test_002_ (main.qa_classify)

Traceback (most recent call last):
File “./qa_classify.py”, line 94, in test_002_
self.tb.run()
File
“/home/Vijay/gnuradio-3.3.0/gnuradio-core/src/python/gnuradio/gr/top_bloc
k.py”, line 104, in run
self.wait()
File
“/home/Vijay/gnuradio-3.3.0/gnuradio-core/src/python/gnuradio/gr/top_bloc
k.py”, line 107, in wait
_top_block_waiter(self._tb).wait()
File
“/home/Vijay/gnuradio-3.3.0/gnuradio-core/src/python/gnuradio/gr/top_bloc
k.py”, line 59, in init
self.event = _threading.Event()
File “/usr/lib/python2.6/threading.py”, line 360, in Event
return _Event(*args, **kwargs)
File “/usr/lib/python2.6/threading.py”, line 368, in init
self.__cond = Condition(Lock())
error: can’t allocate lock

— On Sun, 3/6/11, Don W. [email protected] wrote:

From: Don W. [email protected]
Subject: Re: [Discuss-gnuradio] libstdc++ error on Cygwin
To: [email protected]
Date: Sunday, March 6, 2011, 8:34 PM

Vijay P. wrote:

Something that I want to note was that after running “make check”
I did get an error message but the program did not halt when it
showed the error. This error did not prevent the tone so maybe it
does not matter. For reference, I am attaching the error message
at the end of this mail.
[…]
Here is the error message at the end of running “make check”
FAIL: run_tests

1 of 1 test failed

Earlier in the output there should have been more information.
The most likely problem would include the messages

…sem_init: No error

and

error: can’t allocate lock

This is a problem in Cygwin and does not indicate a problem in
your GNU Radio installation. It does not always occur, and “make
check” may succeed if you run it enough times.

– Don W.

Vijay P. wrote:

Something that I want to note was that after running “make check”
I did get an error message but the program did not halt when it
showed the error. This error did not prevent the tone so maybe it
does not matter. For reference, I am attaching the error message
at the end of this mail.
[…]
Here is the error message at the end of running “make check”
FAIL: run_tests

1 of 1 test failed

Earlier in the output there should have been more information.
The most likely problem would include the messages

…sem_init: No error

and

error: can’t allocate lock

This is a problem in Cygwin and does not indicate a problem in
your GNU Radio installation. It does not always occur, and “make
check” may succeed if you run it enough times.

– Don W.

Hi,

I get the same problem on cygwin too.
But seems both g++ 4.3 and 3.4.4 were installed and 4.3 is the dominant.
How
to switch to 3.4.4? Thanks!

On 06.03.2011 20:04, Vijay P. wrote:

/usr/bin/grep: /usr/lib/gcc/i686-pc-cygwin/4.3.2/libstdc++.la: No such file or
directory

When I upgraded to the GCC 4.5 compiler I had a similar issue.
It was not sufficient to select the gcc-4 4.5 compiler packets,
but also the libstdc++6 packets (Lib category) had to be upgraded to
4.5.
For the 4.3->4.5 transition you have to be careful to select the
“Experimental” version (not the “current” default) with a switch
in the upper setup.exe window. In the “current” setting, the selection
GCC 4.5 often changes back to 4.3 automatically.

Howard Wong wrote:

But seems both g++ 4.3 and 3.4.4 were installed and 4.3 is the dominant.
How
to switch to 3.4.4? Thanks!

Try “set-gcc-default-3.sh”.

By the way, I am testing GNU Radio with gcc 4.5.0 on Cygwin. If that
works,
I’ll go back and try 4.3.4.

– Don W.

It is being compiled when cppunit is downgrade to 1.12.0.