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.
Summary: | Multi-platform support is unusable | ||
---|---|---|---|
Product: | cnd | Reporter: | shiretu <shiretu> |
Component: | Project | Assignee: | Thomas Preisler <thp> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | akrasny, apepin, dustin_mccartney, kakacek, lsl239, soldatov, sustaining, vkvashin |
Priority: | P2 | ||
Version: | 5.x | ||
Hardware: | Macintosh | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
remote
local host |
*** Issue 168542 has been marked as a duplicate of this issue. *** Yes, this is a problem. This works correctly if you use remote development. Configurations can point to different platform types and you can switch between the configurations and things works correctly, but you cannot no longer move the project from platform to platform and have different configurations for the different platforms. The problem is 'local host' is generic and doesn't say what platform it was when you generated the project. Will see if I can come up with a solution.... Problem: When remote was introduced, the build platform property (called Platform) was overtaken by the Development Host property. It works very well for remote configurations but when it is set to 'localhost', we loose information about what platform it really is meant for and we always generate all the makefiles for the platform you are on (the local host). It means you cannot have one configuration for Solaris (x86) and one for Linux in the same project without the 'other' configuration would get overridden every time you opened the project on one of the two platforms. I fixed this by using the mechanism we had in prior versions (before remote) but integrated it with the remote feature so now both features work. There is no change for remote configurations. They are managed and work exactly as before. Local configurations are also managed and work exactly as before except for yow now can control the build platform. A local configuration can be set to a certain platform and the makefiles are then generated for that platform. This setting is persistent. Some details: I exposed the internal build platform in a property (like it was in previous versions) called Target Platform. This property controls which platform the makefiles are generated for. This is not new. It's new that it is exposed and can be set by the user. If Development Host is a remote host, the property is R/O and the value is the platform of the remote host (just like today). If Development Host is 'localhost', the property can be set to any of the supported platforms as the target platform for the build. This way you can have one project with multiple configurations for building on multiple platforms. This solution is backward compatible with older projects because we already stored the build platform in the project's metadata. See attached screenshots of the properties in the two different situations. There is one limitation though: a configuration needs to be managed on the platform it is meant for. It means if you have a Solaris and a Linux configuration, you need to be on a Solaris box when you want to change the Solaris configuration and on a Linux box when you want to manage the Linux configuration. They will not override each other though. The reason you cannot manage a configuration for a different platform is a technical issue with getting access to for instance Solaris compilers and tools when being on a Linux box. This works nicely with remote but not when you are local. Still looking for a solution for this. If possible, please download a fresh build and try it out and let us know if it works for you. You can get a fresh build here: http://bits.netbeans.org/download/trunk/nightly/latest/ Created attachment 90163 [details]
remote
Created attachment 90165 [details]
local host
Hello, Tx for the efforts. I'll try it right away. Here are some details about my env and why do I need this. I'm developing a pretty large project (rtmpd.com) and I do it in NetBeans. right now I have the following directory structure: trunk sources (...) builders cmake(...) VS2008(...) Netbeans osx(...) FreeBSD(...) Linux(...) I have 14 sub-projects inside so is obvious that maintaining such a thing with separate netbeans projects for each platform will easily get out of control. cmake is for deployment and command-line build. Very versatile and truly platform independent. VS2008 is obvious... I'll try to see if I can "collapse" the content inside the NetBeans folder Integrated into 'main-golden', will be available in build *200910281401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/6bde9b5c8fc3 User: Thomas Preisler <thp@netbeans.org> Log: #168475 Multi-platform support is unusable I removed the Build Property again from the property sheet and we are back to how it was before. The only impact this (removing the property) has, is the user needs to be on a certain platform in order to create a configuration for this platform. It may not be that bad because you need to be on that platform anyway in order to modify or use the configuration. So: * for remote configurations, the platform of the remote host specifies the platform the configuration is generated for. No change here. It is how it has been since remote was introduced * for local hosts, the platform it is created for is remembered and used in two ways: 1) if you try to build/run the configuration on a different local host, you will get an error message explaining the situation. Again, no change here. It is how it has been since last release. 2) when you save a project, a configuration is now saved for the platform it was created for and not for the platform you happened to be on, which was the case prior to my fix. Now you can have one project with multiple configurations supporting multiple platforms without the local configurations getting rewritten to the platform you happen to be on every time you save the project. There is one catch though: I'm still looking into how to do 2) correctly so you can save for instance a Linux configuration on a Solaris host without having access to real toolchains for Solaris. Alexander S. gave me some very promising pointers today and I expect to fix this in a couple of days. But the main bug is fixed. That is so cool! Maybe I'm stretching my luck here... Is there a way to copy one set of configurations (my 14 projects made for OSX) and "convert" them to Linux for example? Even doing it manually (opening project files inside an editor) is better than setting up all those include folders, link dependencies, etc inside NetBeans from scratch using mouse :) Anyway, I'll try it with a bash script and a lot of search and replace. I'll keep you updated with my results. Tx again for your efforts Integrated into 'main-golden', will be available in build *200910290252* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/dec66be936fc User: Thomas Preisler <thp@netbeans.org> Log: #168475 Multi-platform support is unusable Integrated into 'main-golden', will be available in build *200910291407* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/6a4ea782750b User: Thomas Preisler <thp@netbeans.org> Log: #168475 Multi-platform support is unusable Will drop it to a P3 but still working on it. Remaining issue to resolve: being able to generate makefiles for a different platform that the current platform. I have project under Mercurial and it is created in OpenSolaris, when I open it on Linux and add new file, then I need to change platform settings for all configurations (Debug, Release and other). Because "The following configurations were not saved ..." warning is appears. *** Bug 177884 has been marked as a duplicate of this bug. *** *** Bug 178531 has been marked as a duplicate of this bug. *** The core problem is a toolchain is not known/discovered on a platform it is not designed for. For instance there is no SunStudio toolchain available when being on a Mac (I'm not talking about remote). I think what we need is access to all toolchains even in 'local' mode. It will enable you to for instance work on a Solaris/SunStudio configuration being on any platform. Unfortunately it is non-trivial to do. It is certainly not suitable for a patch. Toolchains are very dynamic in their current implementation and basically require the platform they are designed for to be discovered and installed. I will work on a simpler solution for the patch and a more general solution for 6.9. A bit of history: before 'remote' came into the picture, things worked just fine. Toolchains were static defined and always available and you could control the platform a specific configuration was meant for. There were two properties in a project. One for platform and one for toolchain. Nothing fancy or automatic. When 'remote' came along, it kind of hijacked the 'platform' concept and invented a multi-mode called 'local'. 'local' is ambiguous in the sense it means the platform you are currently on and can be anything so what platform is the configuration now meant for? Right, it cannot really be controlled the way users want. Sometime they want to keep a specific configuration as for instance Solaris even you are on a Mac. And generate makefiles for Solaris also when you are on the Mac. I kind of solved the problem with the platform (now it doesn't change it unless the user wants to) but still don't have access to the 'other' platforms toolchains in order to generate the correct makefiles. Using default toolchains works for many projects but not all and you don't know which ones, so this is not a good solution. Changeset 1: changeset 69fde7ba0320 in cnd-main details: http://hg.netbeans.org/cnd-main?cmd=changeset;node=69fde7ba0320 Integrated into 'main-golden', will be available in build *200912161400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/69fde7ba0320 User: Thomas Preisler <thp@netbeans.org> Log: #168475 Multi-platform support is unusable Changeset 2 (NOI18N): changeset aceb692b1ade in cnd-main details: http://hg.netbeans.org/cnd-main?cmd=changeset;node=aceb692b1ade Changeset 3 (warning dialog): changeset f8054826d14b in cnd-main details: http://hg.netbeans.org/cnd-main?cmd=changeset;node=f8054826d14b Thomas... Most excellent work so far! (I was examining the changesets.) :-) Cheers! Integrated into 'main-golden', will be available in build *200912170200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/aceb692b1ade User: Thomas Preisler <thp@netbeans.org> Log: #168475 Multi-platform support is unusable added missing NOI18N Integrated into 'main-golden', will be available in build *200912180200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/f8054826d14b User: Thomas Preisler <thp@netbeans.org> Log: #168475 Multi-platform support is unusable Display and manage warning dialog Marking it fixed so the changes can go into 6.8 patch 1. For patch integrater: fix consists of 3 changesets: Changeset 1: changeset 69fde7ba0320 in cnd-main details: http://hg.netbeans.org/cnd-main?cmd=changeset;node=69fde7ba0320 Changeset 2 (NOI18N): changeset aceb692b1ade in cnd-main details: http://hg.netbeans.org/cnd-main?cmd=changeset;node=aceb692b1ade Changeset 3 (warning dialog): changeset f8054826d14b in cnd-main details: http://hg.netbeans.org/cnd-main?cmd=changeset;node=f8054826d14b verified in dev trunk build 201001120200 The fix has been ported into the release68_fixes repository. http://hg.netbeans.org/release68_fixes/rev/03d08b357855 verified in patch1 candidate build |
Hello, Maybe I'm expecting the wrong things from NetBeans... I'm trying to add several Debug/Release configurations for my c++ project for different platforms: FreeBSD, Linux and Mac OS X. Netbeans becomes totally unusable. If I close the NetBeans on Linux with Debug_LINUX configuration selected and I open the project in Mac OS X, it will not compile. It complains that the selected configuration is not compatible with the current operating system. Which is correct. But it also modifies something behind the scenes because I can't compile the project on linux anymore. Now, I try to select the correct configuration (Mac OS X in this example). Still no joy... All the link dependencies between projects are either absent or wrong (references wrong platform). For all those different debug/release configuration I specifically select the correct platform in Project Properties->Build- >Development Host (which is always localhost [XXXX], where XXXX is the operating system). Am I doing something wrong? Thank you for your support