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 156145 - freebsd make / gmake doesnt work
Summary: freebsd make / gmake doesnt work
Status: RESOLVED WONTFIX
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: Other Other
: P3 blocker (vote)
Assignee: Thomas Preisler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-30 03:38 UTC by lsantagostini
Modified: 2009-10-03 11:46 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lsantagostini 2008-12-30 03:38:45 UTC
Hi all.
Im using NetBeans 6.5 to do some C/C++ programs.
The error is that in FreeBSD cant make the make works fine, i have tried changing it for gmake but it didnt work.
Here is the output 

Running "/usr/bin/make  -f Makefile CONF=Debug" in /root/NetBeansProjects/Application_1

/usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf
Error expanding embedded variable.
*** Error code 2

Stop in /root/NetBeansProjects/Application_1.

Build failed. Exit value 1.

I have probed the netbeans 6.5 from the freebsd ports systems and netbeans plattforfm independent from the downloads
page obtaining the same result.
Comment 1 Thomas Preisler 2009-01-14 22:52:37 UTC
What result do you get if you try building from command line?

I believe Mac OS is derived from FreeBSD so it is a bit of surprise if it doesn't work on FreeBSD. It works fine on Macs.

I'm looking for a system I can test on......
Comment 2 Thomas Preisler 2009-01-15 20:29:29 UTC
From Leonardo

The point is:

If i change from the config make (/usr/bin/make) by /usr/local/bin/gmake all works fine.
But this changes i cant do make it permanent. (at least in freebsd) with linux there is no problem becouse make works
pretty.

Comment 3 Thomas Preisler 2009-01-15 20:38:07 UTC
Here is what I understand so far:

Doesn't work with /usr/bin/make 
Does work with /usr/local/bin/gmake

It looks like /usr/bin/make doesn't work with our generated makefiles. From searching the web it seems standard make on
FreeBSD is not compatible with GNU make and that is causing the problems and is also the reason why gmake is available
on FreeBSD.

The fix is to change the tool-chain to use gmake instead of standard make. Go to Options->C/C++ and type
/usr/local/bin/gmake into the Make command. Then gmake will be used instead of make.
Comment 4 seva 2009-08-03 09:23:02 UTC
Actually the issue is that netbeans does not save settings.
Just change /usr/bin/make to /usr/local/bin/gmake and restart netbearns. You'll see settings changed back to /usr/bin/make.

As a workaround for FreeBSD users, create a link to gmake from /usr/bin as follows:
cd /usr/bin && ln -s /usr/local/bin/gmake gmake
Then netbeans will find and use /usr/bin/gmake.
Not a clean fix, yet seems working fine. (And looking at internet forums, it seems I'm not the only one using it.)