This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 79512 - MinGW mingw32-make.exe not supported
Summary: MinGW mingw32-make.exe not supported
Status: RESOLVED DUPLICATE of bug 133260
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker with 1 vote (vote)
Assignee: Thomas Preisler
URL: http://www.mingw.org/mingwfaq.shtml
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-30 17:47 UTC by pcnetbeanfan
Modified: 2008-05-14 17:36 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pcnetbeanfan 2006-06-30 17:47:07 UTC
I've installed MSYS-1.0.10 and MinGW-5.0.3
(http://sourceforge.net/forum/forum.php?forum_id=586329). Using Netbeans5.5 beta
and last C/C++ pack (http://www.netbeans.info/downloads/download.php?type=5.5b). 
The OS is Windows XP Prof 64bit.

I've created sample Hello World app (New
Project->Samples->C/C++Development->Applications->HelloApp) and tried to
compile. Nothing was modified.

The output was:

Running "make -f Makefile CONF=Debug" in C:\Work\Java\HelloWorld\helloapp

! was unexpected at this time.

make: *** [.validate-impl] Error 255


Build failed. Exit value 2.
Comment 1 _ gordonp 2006-07-10 16:02:08 UTC
Why did you lower from P2 to P5. This seems like a complete non-starter for
you?

This is similar to email sent to nbusers. Here is a response I made:

> The validate-impl target starts with "@if"... Could your problem be
> as simple as it not finding a Unix type shell ie, no bash, sh, or
> ksh)? You might try downloading cygwin and see if the problem goes
> away (our web site tells how to get cygwin).
> 
> Later in the development we plan on exploring different compilers and
> tool sets. Unfortunately, right now we're spread very thin on adding
> debugger support and code model stuff (code completion, code folding,
> and a class view). 

Since this has affected another user (unless you're the same one who posted
to nbusers), I'll look into if if I can get enough information to be able
to duplicate the problem.
Comment 2 pcnetbeanfan 2006-08-07 11:25:33 UTC
The previous priority change was done by mistake. Sorry. I would like to change
the priority to P2 again. 
Comment 3 Thomas Preisler 2006-09-26 19:28:50 UTC
I suspect some kind of setup or installation issue. The user has not replied so
I will close as "WORKFORME". Please reopen is you still see this problem.
Comment 4 shamatt 2007-03-28 02:32:09 UTC
I know this error and thought I would explain it further.

First off, this is not a NetBeans issue.  This error occurs when the MinGW 
make.exe is used instead of the MSYS make.exe.  MinGW is aware that their 
make.exe is lacking some functionality due to lack of POSIX on Win32.  To 
avoid issues like this, MinGW now names their make program "mingw32-make.exe".

To use MinGW with NetBeans, first, install both MinGW and MSYS with correct 
MSYS-to-MinGW bindings.  Both MinGW and MSYS are required and I suggest 
installing MinGW first so that MSYS can set the bindings for you.  Next, set 
your PATH to include both MinGW \bin and MSYS \bin directories.  That is it!

*** It would be nice if NetBeans would add support for mingw32-make.exe in a 
future version. This might also require replacing the POSIX commands with 
DOS/WinNT commands.  Such as MD instead of MKDIR. ***

mingw32-make.exe fails on the following code segment (I believe it cannot 
interpret the brackets):

# configuration validation
.validate-impl:
	@if [ ! -f nbproject/Makefile-${CONF}.mk ]; \
	then \
	    echo ""; \
	    echo "Error: can not find the makefile for configuration '${CONF}' 
in project ${PROJECTNAME}"; \
	    echo "See 'make help' for details."; \
	    echo "Current directory: " `pwd`; \
	    echo ""; \
	fi
	@if [ ! -f nbproject/Makefile-${CONF}.mk ]; \
	then \
	    exit 1; \
	fi

More from mingw.org:

Why is make named mingw32-make.exe?

The "native" (i.e.: MSVCRT dependent) port of make is lacking in some 
functionality and has modified functionality due to the lack of POSIX on 
Win32. There also exists a version of make in the MSYS distribution that is 
dependent on the MSYS runtime. This port operates more as make was intended to 
operate and gives less headaches during execution. Based on this, the MinGW 
developers/maintainers/packagers decided it would be best to rename the native 
version so that both the "native" version and the MSYS version could be 
present at the same time without file name collision.
Comment 5 shamatt 2007-03-28 03:15:43 UTC
One more comment about installing MinGW for use with NetBeans:

For whatever reason, the current MinGW installer doesn't install the debugger 
GDB.  You have to install this separately.  No changes to the PATH are 
required for GDB because it installs into the MinGW directory structure.

That should be it.  NetBeans should now find everything it needs as long as 
you installed the C/C++ pack and set NetBeans to GNU Compiler Collection.  If 
you change the PATH after starting NetBeans, restart NetBeans.
Comment 6 _ gordonp 2007-09-06 00:01:52 UTC
We plan on making mingw32-make the default make command with MinGW compilers. Unfortunately,
some of the other related build tool changes necessitate this happening in the 1st release
after NetBeans 6.0 (which is mostly feature frozen at this point).

We also plan on checking the Windows registry to see what compilers (and make tools) are
available and where they are.
Comment 7 avp 2007-09-09 18:29:27 UTC
Temporary workaround:

change Makefile-impl.mk
...
.validate-impl:
	if exist nbproject/Makefile-${CONF}.mk  \
	then \
	    echo ""; \
	    echo "Error: can not find the makefile for configuration '${CONF}' in project ${PROJECTNAME}"; \
	    echo "See 'make help' for details."; \
	    echo "Current directory: " `pwd`; \
	    echo ""; \
	fi
	if exists  nbproject/Makefile-${CONF}.mk \
	then \
	    exit 1; \
	fi
...

In my case XP Netbeans 6.0 Dev mingw32-make 3.80
Comment 8 _ gordonp 2007-09-10 15:44:29 UTC
While it would be nice for mingw32-make to be the default make program for MinGW (it will be
in a future release), its still very easy to use it in current sources. Just open Tools->Options
and change Make Command from "make" to "mingw32-make" and rebuild.
Comment 9 Alexander Pepin 2008-05-14 17:36:18 UTC

*** This issue has been marked as a duplicate of 133260 ***