Can’t open perl script error in autom4te on cygwin?

Jun 20th, 2008   12:14 am

If you’re using CygWin to build some sources which use autoconf/autom4te, then you might have run in to the error:

Can't open perl script "/usr/bin/autom4te-2.61": No such file or directory
make: *** [configure] Error 2

One such cause, as I discovered, might be your Perl setup. Double check by running the autom4te script directly (it’s in /usr/bin/autom4te-*).

I use ActivePerl on Windows, and have done some tom-foolery to make CygWin use that install, instead of its own build of Perl. So now I have /usr/bin/perl which is a symlink to my ActivePerl install, and /usr/bin/cygperl (the Cygwin Perl install). ActivePerl perl is fussy about newlines, and it was this that was causing the script to fail. Changing the hashbang line in the autom4te script to point to my CygWin Perl did the trick.