[Top][All Lists]

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

Re: [Discuss-gnuradio] "usleep" problem while executing "make" forgnurad

From: Don Ward
Subject: Re: [Discuss-gnuradio] "usleep" problem while executing "make" forgnuradio-3.1.3 on MSYS-MINGW
Date: Fri, 15 Jan 2010 09:50:51 -0500

Shabbir Ahmed wrote:

I have been trying to get GNURADIO installed on windows, failed with CYGWIN
and then tried with MSYS/MINGW everything went fine until the last, while
executing "make" for gnuradio.

$ make
make  all-recursive
make[1]: Entering directory `/usr/src/gnuradio-3.1.3'
Making all in config
make[2]: Entering directory `/usr/src/gnuradio-3.1.3/config'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/src/gnuradio-3.1.3/config'
Making all in omnithread
make[2]: Entering directory `/usr/src/gnuradio-3.1.3/omnithread'
/bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..
-DOMNITHREAD_NT=1 -DPthreadDraftVersion=10
-I/usr/src/gnuradio-3.1.3/omnithread  -I/usr/local/include -g -O2 -Wall
-Woverloaded-virtual -MT omni_time.lo -MD -MP -MF .deps/omni_time.Tpo -c -o
omni_time.lo omni_time.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -DOMNITHREAD_NT=1
-DPthreadDraftVersion=10 -I/usr/src/gnuradio-3.1.3/omnithread
-I/usr/local/include -g -O2 -Wall -Woverloaded-virtual -MT omni_time.lo -MD
-MP -MF .deps/omni_time.Tpo -c omni_time.cc  -DDLL_EXPORT -DPIC -o
In file included from omni_time.cc:23:
../config.h: In function `int nanosleep(const timespec*, timespec*)':
../config.h:467: error: `usleep' was not declared in this scope
../config.h:467: warning: unused variable 'usleep'
make[2]: *** [omni_time.lo] Error 1
make[2]: Leaving directory `/usr/src/gnuradio-3.1.3/omnithread'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/gnuradio-3.1.3'
make: *** [all] Error 2


It is a problem that was reported earlier (
but no solution is posted in the link. I looked into the steps mentioned by
Don. But couldnt get any leads.

This problem (and others) are fixed in the latest development version (the git repository). I recommend that you install git under Cygwin and use that to download the latest code (per http://gnuradio.org/redmine/wiki/gnuradio/Download).

You could also start with the 3.2.2 tarball (is there a reason you are using 3.1.3?) and add patches, but many of the quick patches (when done "right") are more than simple hand edits and require that you run ./bootstrap before they will take effect. For example, you can fix the usleep problem above by adding "#include <unistd.h>" before the call to usleep in config.h, but that fix will go away the next time you run ./configure; patching config.h.in will fix that, but the right way is to patch config/gr_pwin32.m4 and rerun ./bootstrap and ./configure.

In any case, you will need the following:

 * Before ./configure:

       export CXX="g++ -mthreads"
       export LDFLAGS="-L/usr/local/lib -lws2_32"

If you want to try patching problems in 3.2.2:

* If using Python 2.5, after running ./configure edit Makefile to add "-shrext .pyd" to PYTHON_LDFLAGS

* In config.h and config.h.in, add "#include <unistd.h>" before the call to usleep

* In gnuradio-core/src/lib/missing, edit Makefile to remove references to posix_memalign

* In gnuradio-core/src/lib/io, remove references to gr_histo_sink in Makefile.* and io.i

 * use "--disable-gr-msdd6000" on ./configure

* If building usrp code, add "#include <config.h>" near top of usrp/host/lib/db_wbxng.cc"

I hope this helps. Eventually, this will all be documented in the wiki, but until then feel free to ask when you run into problems.

-- Don W.

reply via email to

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