title: Understanding chocolatey gcc compiler error on Windows
body: <p>I am trying to compile <a href="https://github.com/PortAudio/portaudio" rel="nofollow noreferrer">PortAudio</a> using the <a href="https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources" rel="nofollow noreferrer">GitHub-hosted <code>windows-latest</code> runner</a>.</p>
  <p>I use the following code to compile (see <a href="https://github.com/shanebishop/pyaudio-build-wheel/blob/4c24abe195bc081437f68dc6709ed3e8cdf2b0b6/build.sh" rel="nofollow noreferrer">here</a> for the full script):</p>
  <pre><code>curl -sSLO https://github.com/PortAudio/portaudio/archive/refs/tags/v19.7.0.zip
  unzip -q v19.7.0.zip
  cd portaudio-19.7.0
  ./configure \
      --with-winapi=wasapi --enable-static=yes --enable-shared=no \
      CC=&quot;$(command -v gcc)&quot; CXX=&quot;$(command -v g++)&quot;
  make
  </code></pre>
  <p>Here is the output in GitHub Actions from the <code>make</code> command onwards:</p>
  <pre><code>+ make
  gcc.exe: fatal error: no input files
  compilation terminated.
  mkdir lib
  mingw32-make: *** [makefile:228: src/common/pa_allocation.lo] Error 1
  mkdir -p src/common src/hostapi/alsa src/hostapi/asihpi src/hostapi/asio src/hostapi/coreaudio src/hostapi/dsound src/hostapi/jack src/hostapi/oss src/hostapi/skeleton src/hostapi/wasapi src/hostapi/wdmks src/hostapi/wmme src/os/unix src/os/win
  touch lib-stamp
  C:/Program Files/Git/usr/bin/sh.exe ./libtool --mode=compile /c/ProgramData/Chocolatey/bin/gcc -c -g -O2 -DPA_LITTLE_ENDIAN -I./include -I./src/common -I./src/os/win -DPA_USE_WMME=0 -DPA_USE_ASIO=0 -DPA_USE_WDMKS=0 -DPA_USE_DS=0 -DPA_USE_WASAPI=0 -UPA_USE_WASAPI -DPA_USE_WASAPI=1 -mthreads -DPACKAGE_NAME=\&quot;\&quot; -DPACKAGE_TARNAME=\&quot;\&quot; -DPACKAGE_VERSION=\&quot;\&quot; -DPACKAGE_STRING=\&quot;\&quot; -DPACKAGE_BUGREPORT=\&quot;\&quot; -DPACKAGE_URL=\&quot;\&quot; -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DLT_OBJDIR=\&quot;.libs/\&quot; -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=4 -DHAVE_CLOCK_GETTIME=1 -DHAVE_NANOSLEEP=1 src/common/pa_allocation.c -o src/common/pa_allocation.lo
  libtool: compile:  /c/ProgramData/Chocolatey/bin/gcc -c -g -O2 -DPA_LITTLE_ENDIAN -I./include -I./src/common -I./src/os/win -DPA_USE_WMME=0 -DPA_USE_ASIO=0 -DPA_USE_WDMKS=0 -DPA_USE_DS=0 -DPA_USE_WASAPI=0 -UPA_USE_WASAPI -DPA_USE_WASAPI=1 -mthreads &quot;-DPACKAGE_NAME=\\\&quot; -DPACKAGE_TARNAME=\&quot;\&quot; -DPACKAGE_VERSION=\&quot;\&quot; -DPACKAGE_STRING=\&quot;\&quot; -DPACKAGE_BUGREPORT=\&quot;\&quot; -DPACKAGE_URL=\&quot;\&quot; -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DLT_OBJDIR=\&quot;.libs/\&quot; -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=4 -DHAVE_CLOCK_GETTIME=1 -DHAVE_NANOSLEEP=1 src/common/pa_allocation.c -o src/common/pa_allocation.lo&quot; -o pa_allocation.o
  Error: Process completed with exit code 1.
  </code></pre>
  <p>The full build output can be viewed <a href="https://github.com/shanebishop/pyaudio-build-wheel/runs/7187074951?check_suite_focus=true" rel="nofollow noreferrer">here</a>.</p>
  <p>You can see in the output above that the <code>CC</code> I specified is one installed by <a href="https://chocolatey.org/" rel="nofollow noreferrer">Chocolatey</a> installed at <code>/c/ProgramData/Chocolatey/bin/gcc</code>.</p>
  <p>I also tried compiling without specifying <code>CC</code> or <code>CXX</code> when I run the <code>./configure</code> command, but <a href="https://github.com/shanebishop/pyaudio-build-wheel/runs/7187010540?check_suite_focus=true" rel="nofollow noreferrer">the build also fails</a>.</p>
  <p>The <code>libtool</code> command doesn't have any error output, so I don't know why the <code>libtool</code> command failed.</p>
  <p>I also don't understand why there is a <code>gcc.exe: fatal error: no input files</code> error in the output of <code>make</code>, since I specify <code>CC</code> in when I run <code>./configure</code>.</p>
  <p>I am looking for help understanding why this problems are occurring, and help fixing these problems.</p>