# Windows audio-in and compilation issues

**URL:** <https://www.ruby-forum.com/t/windows-audio-in-and-compilation-issues/232389>\
**Category:** GNU Radio\
**Created:** [October 7, 2014, 5:35am UTC](https://www.ruby-forum.com/t/windows-audio-in-and-compilation-issues/232389 "2014-10-07T05:35:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [October 7, 2014, 5:35am UTC](https://www.ruby-forum.com/t/windows-audio-in-and-compilation-issues/232389/1 "2014-10-07T05:35:03Z")

</div>

Dear list,

I’m having lots of problems getting Gnuradio to work in Windows to  
process signals from a soundcard audio source. Please help! This is  
what I’ve tried so far:

1. Pre-built binaries ==\> Audio source not working.

I followed the instructions in the WindowsInstall [1] wiki and  
Bhaskar11’s guide. The installation process was smooth, except that some  
of the recommended versions were no longer available, so I opted to pick  
the following replacements from the UCI repository so that I could get  
consistent compiler and matching library versions:  
numpy‑MKL‑1.8.2.win32‑py2.7.exe  
PyQt4‑4.10.4‑gpl‑Py2.7‑Qt4.8.6‑x32.exe  
PyQwt‑5.2.1‑py2.7‑x32‑pyqt4.10.4‑numpy1.8.1.exe  
PyOpenGL‑3.1.0.win32‑py2.7.exe

I tried both the recommended stable 3.6.4.1 and the latest-stable  
3.7.2.2 gnuradio binaries built by Ettus. GRC itself seems to work  
(without WX widgets in 3.7). However, I was unable to get the audio  
source working in both. Then I found bug #521 [3], which seems to  
indicate that the gr-audio windows source block does not work at this  
time.

Is there any workaround to get streaming audio sources to work? Eg, an  
external virtual audio cable that writes to a wav file or memory buffer  
that gnuradio can do streaming reads from?

1. Compile in Cygwin ==\> compilation problems

According to the WindowsTips wiki [4], the only working audio sources  
for Windows are OSS audio and !PortAudio. OSS audio is only available  
in cygwin, while PortAudio is ‘easy’ in cygwin, so I tried this approach  
by following the CygwinInstallMain wiki [5]. This was a clean cygwin  
installation with the latest packages as of last week:

cmake 2.8.9-2  
cppunit 1.12.1-2 (1.12.0-1 is not available, and hopefully the  
incompatabilities with 1.12.1 are fixed)  
gcc-g++ 4.8.3-3 (3.4.4 is not available, and hopefully the  
incompatabilities with 4.3.4 are fixed)  
python 2.7.8-1 (2.6 is not available)  
libusb1.0 1.0.19-1 (libusb-win32 is not available)

The wiki advised to compile three libraries manually.

a. Boost =\> updates to instructions

The WindowsTips wiki [6] says that boost 1.35 or later is required, and  
must be compiled as the cygwin binaries are too old or used mismatching  
compilers. This may not longer be necessary: cygwin packages currently  
list boost 1.50 and 1.53, and libboost-devel is at 1.55. I didn’t seem  
to experience any subsequent boost-related compilation issues using the  
pre-built binaries, but decided to try a custom build anyway just in  
case.

[6] recommended to build with 1.45, but boost threads in this version  
doesn’t work after gcc 4.7 [7]. So I went with the latest boost 1.56.  
This built fine, but I included additional libraries based on other  
gnuradio+boost instructions, ie.  
./bootstrap.sh  
–with-libraries=thread,date\_time,program\_options,filesystem,system,test

b. wxPython =\> compilation issues

I followed the instructions from the WxPythonCygwin wiki [8] and  
downloaded the 3.0.1.1 src. Not sure if the recommended patches are  
still required, as I got lots of warnings about redefining  
wxUSE\_DATEPICKCTRL\_GENERIC. I ran into the conflict between winsock.h  
and select.h’s select. The suggestion to rename select.h didn’t help,  
and I got other errors instead. I found a tip on another website about  
editing the winsock.h definition to match select.h’s definition, and  
found that the winsock.h definition is actually wrapped within an ifndef  
like so:

#ifndef **INSIDE\_CYGWIN**  
WINSOCK\_API\_LINKAGE int WSAAPI select(int nfds,fd\_set \*readfds,fd\_set  
\*writefds,fd\_set \*exceptfds,struct PTIMEVAL _timeout);  
 #endif /_ ! **INSIDE\_CYGWIN** \*/

Should there simply be a #define **INSIDE\_CYGWIN** or  
-D\_\_INSIDE\_CYGWIN\_\_ somewhere? Where should I put it?

c. PortAudio =\> compiles ok

While OSS audio should be sufficient for my needs, I decided to build  
PortAudio anyway. pa\_stable\_v19\_20140130.tgz compiled and installed  
cleanly.

d. Gnuradio =\> compilation issues

I’ve fulfilled all the prerequisites except wxPython which should mean I  
just lose the wx widgets. Howver, when attempting the minimal GNU Radio  
build from [5], I encountered an error with the first step:

$ make  
[0%] Generating volk\_machine\_avx\_32\_mmx.c  
/bin/sh: line 1: 4756 Aborted (core dumped)  
/usr/bin/python2 -B /usr/src/gnuradio-3.7.2/volk/gen/volk\_tmpl\_utils.py  
–input /usr/src/gnuradio-3.7.2/volk/tmpl/volk\_machine\_xxx.tmpl.c  
–output  
/usr/src/gnuradio-3.7.2/build/volk/lib/volk\_machine\_avx\_32\_mmx.c  
avx\_32\_mmx  
volk/lib/CMakeFiles/volk.dir/build.make:1651: recipe for target  
‘volk/lib/volk\_machine\_avx\_32\_mmx.c’ failed  
make[2]: \*\*\* [volk/lib/volk\_machine\_avx\_32\_mmx.c] Error 134  
CMakeFiles/Makefile2:167: recipe for target  
‘volk/lib/CMakeFiles/volk.dir/all’ failed  
make[1]: \*\*\* [volk/lib/CMakeFiles/volk.dir/all] Error 2  
Makefile:146: recipe for target ‘all’ failed  
make: \*\*\* [all] Error 2

For reference, the full cmake and make logs are at

> **[gnuradio cygwin build, volk error - Pastebin.com](https://pastebin.com/rbvV8vJJ)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

Please help, I’m stuck :-/

Thanks!  
IC

[1] [http://gnuradio.org/redmine/projects/gnuradio/wiki/WindowsInstall](http://gnuradio.org/redmine/projects/gnuradio/wiki/WindowsInstall)  
[2]  
[[Discuss-gnuradio] Successful installation of GNURadio 3.6.4.1 on Window](https://lists.gnu.org/archive/html/discuss-gnuradio/2013-12/msg00497.html)  
[3] [http://gnuradio.org/redmine/issues/521](http://gnuradio.org/redmine/issues/521)  
[4] [http://gnuradio.org/redmine/projects/gnuradio/wiki/WindowsTips/3](http://gnuradio.org/redmine/projects/gnuradio/wiki/WindowsTips/3)  
[5] [http://gnuradio.org/redmine/projects/gnuradio/wiki/CygwinInstallMain](http://gnuradio.org/redmine/projects/gnuradio/wiki/CygwinInstallMain)  
[6] [http://gnuradio.org/redmine/projects/gnuradio/wiki/WindowsTips](http://gnuradio.org/redmine/projects/gnuradio/wiki/WindowsTips)  
[7] [https://svn.boost.org/trac/boost/ticket/6165](https://svn.boost.org/trac/boost/ticket/6165)  
[8] [http://gnuradio.org/redmine/projects/gnuradio/wiki/WxPythonCygwin](http://gnuradio.org/redmine/projects/gnuradio/wiki/WxPythonCygwin)
