Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Make target not working: Cannot run program "mymake": Launching failed
Make target not working: Cannot run program "mymake": Launching failed [message #228846] Fri, 16 January 2009 22:41 Go to next message
San is currently offline SanFriend
Messages: 11
Registered: July 2009
Junior Member
Hi all,

I have Eclipse in Windows, with the Cygwin toolchain.

I have a script that I use to build (named mymake), instead of make (my
script handles some variables and it invokes make). When I run the script
from a (Cygwin) bash prompt, it works fine. The directory where the script
is located is in the PATH.

In Eclipse, I created a make target for that project, which I attempt to
use for building. I have tried several things on "Build command" line,
listed below with the corresponding output:

1- which make

-----

**** Build of configuration Cygwin GCC for project multfem ****

which make
/usr/bin/make


2- make

-----

**** Build of configuration Cygwin GCC for project multfem ****

make
make: *** No targets specified and no makefile found. Stop.

Note: this means that it is finding and executing make, i.e., behaving as
expected


3- which mymake

-----

**** Build of configuration Cygwin GCC for project multfem ****

which mymake
/cygdrive/d/Appls/make/mymake


4- mymake

-----

**** Build of configuration Cygwin GCC for project multfem ****


(Cannot run program "mymake": Launching failed)




Does anyone know why, if my script is in the PATH (as found by which
mymake) it cannot be run? It has the right permissions. To test a little
more, I had copied it in the same directory as make, and then I did

chmod --reference=make mymake
chown --reference=make mymake
chgrp --reference=make mymake

with the same result. I had previously renamed the original mymake to be
sure that the script being found in the PATH was the one located in
/usr/bin.

What makes mymake different from make, given that make can be run and
mymake not?

I went nuts about this!!

Thanks
Re: Make target not working: Cannot run program "mymake": Launching failed [message #228854 is a reply to message #228846] Sat, 17 January 2009 03:39 Go to previous messageGo to next message
Andrew Gvozdev is currently offline Andrew GvozdevFriend
Messages: 257
Registered: July 2009
Senior Member
San wrote:

> Hi all,

> I have Eclipse in Windows, with the Cygwin toolchain.

> I have a script that I use to build (named mymake), instead of make (my
> script handles some variables and it invokes make). When I run the script
> from a (Cygwin) bash prompt, it works fine. The directory where the script
> is located is in the PATH.

...
> **** Build of configuration Cygwin GCC for project multfem ****
> (Cannot run program "mymake": Launching failed)
...

> What makes mymake different from make, given that make can be run and
> mymake not?

> I went nuts about this!!

Don't go nuts yet, you'll be fine. The difference is that you run your
script from bash shell but eclipse is not. Try this way:

bash -c mymake

Andrew


> Thanks
Re: Make target not working: Cannot run program "mymake": Launching failed [message #228878 is a reply to message #228854] Sat, 17 January 2009 13:29 Go to previous messageGo to next message
San is currently offline SanFriend
Messages: 11
Registered: July 2009
Junior Member
Dear Andrew, it worked. But still, I do not understand why would 'make'
work and not 'mymake', when mymake was either in its original directory or
when it was in /usr/bin.

Thanks a lot!
Re: Make target not working: Cannot run program "mymake": Launching failed [message #228886 is a reply to message #228878] Sat, 17 January 2009 13:51 Go to previous messageGo to next message
James Blackburn is currently offline James BlackburnFriend
Messages: 36
Registered: July 2009
Member
San wrote:
> Dear Andrew, it worked. But still, I do not understand why would 'make'
> work and not 'mymake', when mymake was either in its original directory
> or when it was in /usr/bin.

Does yourmake have #!/bin/bash at the top?

James
Re: Make target not working: Cannot run program "mymake": Launching failed [message #228894 is a reply to message #228886] Sat, 17 January 2009 16:32 Go to previous messageGo to next message
Andrew Gvozdev is currently offline Andrew GvozdevFriend
Messages: 257
Registered: July 2009
Senior Member
James Blackburn wrote:

> San wrote:
>> Dear Andrew, it worked. But still, I do not understand why would 'make'
>> work and not 'mymake', when mymake was either in its original directory
>> or when it was in /usr/bin.

mymake is a script which by definition is a set of commands for a shell.
Eclipse runs it as executable program. Try to run your script from Windows
Command Prompt - it won't run either. Eclipse is just a messenger here
using Win XP to execute programs.

> Does yourmake have #!/bin/bash at the top?
This is another instruction for a Unix shell. MS Windows won't honor that.

Andrew
Re: Make target not working: Cannot run program "mymake": Launching failed [message #228901 is a reply to message #228894] Sun, 18 January 2009 13:23 Go to previous message
San is currently offline SanFriend
Messages: 11
Registered: July 2009
Junior Member
Andrew Gvozdev wrote:

> James Blackburn wrote:

>> San wrote:
>>> Dear Andrew, it worked. But still, I do not understand why would 'make'
>>> work and not 'mymake', when mymake was either in its original directory
>>> or when it was in /usr/bin.

> mymake is a script which by definition is a set of commands for a shell.
> Eclipse runs it as executable program. Try to run your script from Windows
> Command Prompt - it won't run either. Eclipse is just a messenger here
> using Win XP to execute programs.

>> Does yourmake have #!/bin/bash at the top?
> This is another instruction for a Unix shell. MS Windows won't honor that.

I think you are essentially right. From a DOS prompt, the 'make.exe' from
Cygwin can still run, but 'mymake' cannot. That is the difference.

Thanks a lot!



> Andrew
Previous Topic:c/c++ editor Hover for functions
Next Topic:adding custom information to run configuration
Goto Forum:
  


Current Time: Thu Apr 18 18:12:49 GMT 2024

Powered by FUDForum. Page generated in 0.02164 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top