Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error trying to exec 'as': execvp: No such file or directory

When trying to build I get this error:

$ make CC=i686-w64-mingw32-gcc
  CC    aes.c
i686-w64-mingw32-gcc: error trying to exec 'as': execvp: No such file or directory
like image 614
Zombo Avatar asked Apr 23 '12 03:04

Zombo


1 Answers

Set PATH to /usr/bin instead of /bin

There is a known caveat where calling the compiler directly as /bin/x86_64-w64-mingw32-gcc will fail, use /usr/bin/x86_64-w64-mingw32-gcc instead and make sure that your PATH variable has /usr/bin before /bin.

mingw-w64.sourceforge.net

This is caused by a mounting problem. On linux you have /bin and /usr/bin, no big deal. On Cygwin you have C:\cygwin\bin. Then mount points are set like this.

C:\cygwin\bin on /usr/bin
C:\cygwin on /

So technically you could represent C:\cygwin\bin with /bin or /usr/bin, although as stated above the former will not work.

like image 88
2 revs Avatar answered Sep 23 '22 10:09

2 revs