gcccygwingmpm4

m4: cannot open `gcc': No such file or directory


I am trying to build GMP on Windows, using Cygwin64. I run ./configure with no troubles, but make prints some nonsense:

C:/cygwin64/bin/sh.exe ../libtool --mode=compile --tag=CC ../mpn/m4-ccas --m4="m4" gcc -c -DHAVE_CONFIG_H -I. -I..  -D__GMP_WITHIN_GMP -I.. -DOPERATION_`echo invert_limb_table | sed 's/_$//'`   -O2 -pedantic -fomit-frame-pointer -m64 -mtune=k8 -march=k8  `test -f 'invert_limb_table.asm' || echo './'`invert_limb_table.asm
libtool: compile:  ../mpn/m4-ccas "--m4=m4 gcc" -c -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_invert_limb_table -O2 -pedantic -fomit-frame-pointer -m64 -mtune=k8 -march=k8 invert_limb_table.asm -o invert_limb_table.o
m4 gcc  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_invert_limb_table invert_limb_table.asm >tmp-invert_limb_table.s

before printing m4: cannot open `gcc': No such file or directory and erroring. This is odd, as I definitely have GCC installed, which is confirmed by me being able to run gcc. What is happening here, and how can I fix it?


Solution

  • Apparently, I was using gcc from my main system, when I needed to install gcc seperately in cygwin via the setup executable and use that.