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 187754 - Cannot add cross compiler toolchain
Summary: Cannot add cross compiler toolchain
Alias: None
Product: cnd
Classification: Unclassified
Component: Toolchain (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 normal (vote)
Assignee: Alexander Simon
Depends on:
Reported: 2010-06-17 21:35 UTC by neugens
Modified: 2010-10-25 10:24 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

Screenshot showing the incorrect behaviour (346.17 KB, image/png)
2010-06-17 21:36 UTC, neugens
CND from 6.8 shows correct behaviour (269.90 KB, image/png)
2010-06-18 10:11 UTC, neugens

Note You need to log in before you can comment on or make changes to this bug.
Description neugens 2010-06-17 21:35:17 UTC
NetBeans 6.9 is unable to identify cross compiler toolchain, where NB6.8 was, and doesn't permit to indicate the toolchain type, making in fact impossible to add any other toolchain than the default one.

I attach a screenshot to illustrate the problem.
Comment 1 neugens 2010-06-17 21:36:40 UTC
Created attachment 100185 [details]
Screenshot showing the incorrect behaviour
Comment 2 Alexander Simon 2010-06-18 04:29:13 UTC
Did you have gcc and g++ executable or links on executable in added folder?
Comment 3 Alexander Simon 2010-06-18 06:27:06 UTC
CodeSourcery tool collection does not supported.
If you sure that the tool collection GNU compatible you should add links:
gcc -> arm-none-linux-gnueabi-gcc
g++ -> arm-none-linux-gnueabi-g++
gdb -> arm-none-linux-gnueabi-gdb
ar -> arm-none-linux-gnueabi-ar
as -> arm-none-linux-gnueabi-as
and add tool collection again.
Other solution:
- create own tool collection descriptor (see
It would be nice if you share you experience in NB C/C++ forum ( or/and provide plug-in for Netbeans with CodeSourcery tool collection.
Comment 4 Alexander Simon 2010-06-18 06:47:23 UTC
Sorry, it is only my guess that you use CodeSourcery.
But I think that in you case my comment is also right:
- Netbeans does not support cross compiler toolchain.
- if tool collection is GNU compatible it should have gcc[.exe] and g++[.exe] executable files in the base tool collection folder.
Comment 5 neugens 2010-06-18 09:21:43 UTC
In this specific case I'm using the QNX toolchain, that NetBeans 6.8 recognises everything quite well, and if I have the options to select that the compiler is a GCC based one and the option to give the compiler executable (those are grayed out in 6.9), this is everything the IDE needs to run the toolchain and has always worked very well.
Comment 6 neugens 2010-06-18 09:27:44 UTC
Btw, WONTFIX??? As I said, the reason why we moved from Eclipse to NetBeans is exactly because NB handles (up to now) both Java *and* C cross compiler toolchain very well.

If you're serious about non fixing this, is there any way to run the old cnd with 6.9 or we have to stick forever with the old IDE?
Comment 7 Alexander Simon 2010-06-18 09:36:56 UTC
Provide please more details.
- platform
- tool collection
- step to reproduce bug
Comment 8 neugens 2010-06-18 10:10:41 UTC
- platform

NetBeans IDE 6.9 (Build 201006101454)
Java: 1.6.0_18; OpenJDK 64-Bit Server VM 14.0-b16
System: Linux version running on amd64; UTF-8; it_IT (nb)
Userdir: /home/neugens/.netbeans/6.9

[neugens@galactica kd]$ cat /etc/redhat-release 
Fedora release 13 (Goddard)


Version: 1.9.1 Source: NetBeans IDE 6.9 (Build 201006101454)  
Plugin Description
C/C++ support, including editing, projects, GDB debugger and make. There is a basic support for Fortran and Assembler (x86/64, SPARC)
Module installed: C/C++

- tool collection

QNX Software Development Platform 6.4.1

I think other toolchain may also show the problem, but I don't have any at hand, it should be possible to create some simlinks and test with a standard gcc toolchain (maybe you can try with gcc for arm if you have a Fedora or Ubuntu box at hand or perhaps with the CellBE one from IBM).

- step to reproduce bug

* Install the toolchain (sorry, this requires a license but it's free, the toolchain is GCC based)

* Install NB6.9 with cnd

* Run the IDE and create a C/C++ project (or just activate the cnd plugin)

* Add a new toolchain via Tools->Options->C/C++->Add

* Select the base directory (in my case /opt/qnx641/host/linux/x86/usr/bin/)

At this point the IDE display the message in the attached image, with the field Tool collection Family and Name grayed out.

The difference with NB 6.8 is that those fields are not grayed out at this point (attached screen-shot), so I can click on OK and then configure the paths. Then everything works fine, so this is probably a one or two liner fix somewhere, as it's really that the interface should not be grayed out.

If somebody can point me to the right place, I could try to help out on that fix too.
Comment 9 neugens 2010-06-18 10:11:44 UTC
Created attachment 100197 [details]
CND from 6.8 shows correct behaviour
Comment 10 Alexander Simon 2010-06-18 10:59:38 UTC
QA please evaluate bug as P2 and 6.9.1_CANDIDATE
Comment 11 Vladimir Voskresensky 2010-06-18 12:53:52 UTC
If we could satisfy users in 6.8 and now blocks them from usage of 6.9, I'd like to see this as regression
Comment 12 Alexander Simon 2010-06-21 09:49:09 UTC
fixed, change set:
Comment 13 Quality Engineering 2010-06-22 03:19:07 UTC
Integrated into 'main-golden', will be available in build *201006220001* on (upload may still be in progress)
User: Alexander Simon <>
Log: fixed BZ#187754 Cannot add cross compiler toolchain
Comment 14 soldatov 2010-07-16 09:21:13 UTC
Well. I checked fix. Now I can add cross compilers from /opt/qnx641/host/linux/x86/usr/bin, but I can't understood what users/developers expects from cross compilers? I expects such problems:
- I see unresolved /opt/qnx641/target/qnx6/usr/include/sys/platform.h include in MIPS mode
- I see 5 different compilers (ntoarm-g++-4.3.3, ntomips-g++-4.3.3, ntoppc-g++-4.3.3, ntosh-g++-4.3.3, ntox86-g++-4.3.3). If user are switching project from one platform to second, then code assistance can be broken.
- Undefined (for me) behaviour if user created 2 projects. For example, one on MIPS, second on PPC.
Comment 15 neugens 2010-07-16 09:36:23 UTC

Thanks for the Fix, this is great!

You can set the name of the compiler so the IDE will be able to use the correct one, including full autocompletion and correct include parsing.

In some cases, the IDE still issues a warning in the editor, but the project can be built. I've tried this with QNX, PlayStation 3, and even with OS9, and they all work very well, so, even if the cross compiler toolchain support may seem broken, it's definitely not at all: I am able to compile our VM for any target we support just via NetBeans, and some of our toolchains are just crazy :)

In my experience, NetBeans has the most advanced C/C++ support (I can't wait to see Objective C too!) available up to date.

As soon as I have finally some time back I'll share my experiences with you guys in the cnd forums.

Thanks for the great work!

Comment 16 neugens 2010-08-13 20:22:52 UTC

I just downloaded NB 6.9.1 but the problem is still there, do I have to wait for 6.10 to come up to have the fix in?

Comment 17 soldatov 2010-08-13 21:05:23 UTC
(In reply to comment #16)
> Hi,
> I just downloaded NB 6.9.1 but the problem is still there
It is expected

>, do I have to wait
> for 6.10 to come up to have the fix in?
or use nightly builds
> Thanks,
> Mario
Comment 18 fduff 2010-08-16 16:59:10 UTC
I'm using QNX 6.4.1 (on Windows XP) to develop on x86 and ppc.
I've installed NB 6.9 NightBuild (14/8/2010) and I've just tried to make NB to register the QNX toolchain, doing the following:

1. in Tools/Options/C-C++
2. Add..
3. point to "C:\QNX641\host\win32\x86\usr\bin" where I previously set some links (on a previous attempt) to ntox86-xxx.exe -- like gcc, g++, ar, as
4. the toolchain was recognised as 'unknown', selected 'MinGW' as a dummy toolchain and then it picked up all relevant binaries: gcc.exe, make.exe etc.
5. set new toolchain as default.

I've just tried compiling a sample project with that toolchain and it worked fine (clean/build). Will need to test this more through fully but it seem to be getting somewhere.

NB doesnt allow renaming toolchain from the GUI, which could be a minor improvement for next release.
Comment 19 soldatov 2010-08-23 12:44:04 UTC
Users can't add GCC cross compilers. Also some new (or very old) Sun Studio/Forte/Oracle Solaris Studio compilers can't be added. I will mark this bug as "69patch-candidate"
Comment 20 Petr Suchomel 2010-10-18 09:22:06 UTC
Backported into release692
Comment 21 soldatov 2010-10-25 10:13:15 UTC
Verified in NetBeans 6.9.1 patch 2. With patch I can add a unsupported Oracle Solaris Studio build