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 198054 - Can't build Freeway by MinGW/MSYS if Cygwin is installed too
Summary: Can't build Freeway by MinGW/MSYS if Cygwin is installed too
Status: RESOLVED WORKSFORME
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.0
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Assignee: ilia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-25 09:49 UTC by soldatov
Modified: 2015-09-21 09:26 UTC (History)
1 user (show)

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 soldatov 2011-04-25 09:49:46 UTC
Scenario:
- Create Freeway project and select MinGW compiler (Cygwin is not in PATH)
- Build project
==> ok if IDE can't find Cygwin. build fails if IDE can find Cygwin

http://forums.netbeans.org/viewtopic.php?t=38026
Comment 1 az.pengwang 2012-04-30 22:21:11 UTC
I have the same issue.

I have some projects that are to be compiled with Cygwin, while the others need msys. Even though I changed the path search order, and I can compile the msys code in Windows CMD prompt, compiling the code in NetBeans would fail because NetBeans will find and use Cygwin as the build environment. I have to remove Cygwin from the path to bypass the issue temporarily.

Then, can the console environment be set/selected at project level via a GUI menu.
Comment 2 Leonid Lenyashin 2012-10-30 21:09:38 UTC
There was no activity on this issue for quite a long time. We apologize that the issue was not addressed so far due to lack of development resources. We might not have time in near future to fix this problem, so it is closed as WONTFIX.
If the issue is still critical for you please do not hesitate to REOPEN it.
Thank you for using our product and reporting bugs. We are really sorry that we were not able to fix this issue timely.

Regards,
CND team.
Comment 3 az.pengwang 2013-02-21 21:26:49 UTC
Yes, it's still important. I'd like to keep it in opened state so it won't get forgotten.
Comment 4 earnie 2013-05-16 15:47:04 UTC
I found this issue because of a similar problem.  My query here though is to determine how to modify the configuration so that my MSYS sh.exe is used instead of my Cygwin sh.exe.  It seems that during installation Cygwin was found on my system even though I do not and never will have the path to the Cygwin bin directory in PATH.  I cannot find a method to allow me to override the use of Cygwin's sh.exe.  I overcame my error by creating a custom Project Properties configuration and adding the following entry for the Environment column.

PATH=h:/mingw/bin;h:/msys/bin;c:/cygwin/bin

Note that I had to add the path to Cygwin's bin directory to overcome an error "Unable to start pty process: The application failed with exit code -1073741515 (0xc0000135)."

To recap, I do not want to use Cygwin's sh.exe, where do I modify the settings for the path to sh.exe?
Comment 5 ilia 2015-09-18 08:11:49 UTC
Hi, 

is this bug still reproducible in the latest NB version? I've tried the scenario from the description and env from Comment 4 and it worked fine for me.
Comment 6 soldatov 2015-09-18 08:29:48 UTC
(In reply to ilia from comment #5)
> Hi, 
> 
> is this bug still reproducible in the latest NB version? I've tried the
> scenario from the description and env from Comment 4 and it worked fine for
> me.
In modern builds if I create new source based project (qmake based project) I see "/cygdrive/c/mingw/msys/bin/make -f ..." in build log. If I rebuild this project, then I see msys's paths. Exactly NetBeans likes to mix MinGW/Msys and Cygwin tools.
Comment 7 ilia 2015-09-18 09:59:15 UTC
> In modern builds if I create new source based project (qmake based project) I see "/cygdrive/c/mingw/msys/bin/make -f ..." in build log. If I rebuild this project, then I see msys's paths. Exactly NetBeans likes to mix MinGW/Msys and Cygwin tools.

Thanks.

Steps to reproduce:
1) Create a QMake project with existing sources
2) After automatic clean&build runs the log is:


------------------------------
Clean:
cd 'C:\Users\Администратор\Documents\NetBeansProjects\QtApplication_1'
/cygdrive/C/MinGW/msys/1.0/bin/make.exe -f Makefile clean
rm build/Debug/MinGW-Windows/main.o
rm build/Debug/MinGW-Windows/QtApplication_1_resource_res.o

CLEAN SUCCESSFUL (total time: 851ms)
------------------------------


Build:
cd 'C:\Users\Администратор\Documents\NetBeansProjects\QtApplication_1'
/cygdrive/C/MinGW/msys/1.0/bin/make.exe -f Makefile
g++ -c -g3 -gdwarf-2 -g -frtti -fexceptions -mthreads -Wall -Wextra -DUNICODE -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'c:/Qt/4.8.5/include/QtCore' -I'c:/Qt/4.8.5/include/QtGui' -I'c:/Qt/4.8.5/include' -I'c:/Qt/4.8.5/include/ActiveQt' -I'.' -I'nbproject' -I'.' -I'c:/Qt/4.8.5/mkspecs/default' -o build/Debug/MinGW-Windows/main.o main.cpp
windres -i QtApplication_1_resource.rc -o build/Debug/MinGW-Windows/QtApplication_1_resource_res.o --include-dir=. -DUNICODE -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN
g++ -mthreads -Wl,-subsystem,windows -o dist/Debug/MinGW-Windows/QtApplication_1.exe build/Debug/MinGW-Windows/main.o  -L'c:/Qt/4.8.5/lib' -lmingw32 -lqtmaind build/Debug/MinGW-Windows/QtApplication_1_resource_res.o -lQtGuid4 -lQtCored4 
------------------------------


Next clean&build:
cd 'C:\Users\Администратор\Documents\NetBeansProjects\QtApplication_1'
C:\MinGW\msys\1.0\bin\make.exe -f Makefile clean
rm build/Debug/MinGW-Windows/main.o
rm build/Debug/MinGW-Windows/QtApplication_1_resource_res.o

CLEAN SUCCESSFUL (total time: 753ms)
cd 'C:\Users\Администратор\Documents\NetBeansProjects\QtApplication_1'
C:\MinGW\msys\1.0\bin\make.exe -f Makefile
g++ -c -g3 -gdwarf-2 -g -frtti -fexceptions -mthreads -Wall -Wextra -DUNICODE -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I'c:/Qt/4.8.5/include/QtCore' -I'c:/Qt/4.8.5/include/QtGui' -I'c:/Qt/4.8.5/include' -I'c:/Qt/4.8.5/include/ActiveQt' -I'.' -I'nbproject' -I'.' -I'c:/Qt/4.8.5/mkspecs/default' -o build/Debug/MinGW-Windows/main.o main.cpp
windres -i QtApplication_1_resource.rc -o build/Debug/MinGW-Windows/QtApplication_1_resource_res.o --include-dir=. -DUNICODE -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN
g++ -mthreads -Wl,-subsystem,windows -o dist/Debug/MinGW-Windows/QtApplication_1.exe build/Debug/MinGW-Windows/main.o  -L'c:/Qt/4.8.5/lib' -lmingw32 -lqtmaind build/Debug/MinGW-Windows/QtApplication_1_resource_res.o -lQtGuid4 -lQtCored4 

BUILD SUCCESSFUL (total time: 1s)
Comment 8 ilia 2015-09-21 09:26:11 UTC
Closing this bug as worksforme.

Filing a new bug with and issue described in comment 6
https://netbeans.org/bugzilla/show_bug.cgi?id=255434