"usleep" problem while executing "make" for gnuradio-3.1.3 on MSYS-MINGW


I have been trying to get GNURADIO installed on windows, failed with
and then tried with MSYS/MINGW everything went fine until the last,
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 .libs/omni_time.o In file included from omni_time.cc:23: ../config.h: In functionint 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
Don. But couldnt get any leads.

Please help!


Shabbir A. wrote:

make[2]: Entering directory /usr/src/gnuradio-3.1.3/config' libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -DOMNITHREAD_NT=1 make[2]: Leaving directory/usr/src/gnuradio-3.1.3/omnithread’
Don. But couldnt get any leads.
This problem (and others) are fixed in the latest development version
git repository). I recommend that you install git under Cygwin and use
to download the latest code (per

You could also start with the 3.2.2 tarball (is there a reason you are
3.1.3?) and add patches, but many of the quick patches (when done
are more than simple hand edits and require that you run ./bootstrap
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
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
./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
    to usleep

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

  • 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

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

– Don W.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs