Community
Participate
Working Groups
A Bundle-NativeCode manifest header than contains a selection-filter behaves in a manner similar to Eclipse-PlatformFilter. When exporting a plugins, PDE/UI removes the Eclipse-PlatformFilter from BundleDescriptions that would not have matched the environment. This allows exporting plugins that resolve on other platforms. See PluginExportOperation.shouldAddPlugin, we are explicitly removing the platform filter on the new BundleDescription. Note we are also implicitly removing Bundle-NativeCode elements by not using the factory method that sets it. The problem is in the call to super.shouldAddPlugin which checks the platformFilter. This method does not account for the native header and will return no conflict, when in fact there is one and we end up not removing the native header which will cause the export to fail. See also bug 284806
Note also that during multi-platform product export, we create a feature that contains the plugins and sets appropriate os/ws/arch entries on the feature inclusion. These os/ws/arch are set according to which configs the plugin's platform filter matches. By fixing FeatureExportOperation.shouldAddPlugin to account for the native spec during plugin export, we also fix product export to account for it as well. See FeatureExportOperation.createFeature
You want this in M1 Andrew?
Created attachment 143086 [details] patch Here is a patch that uses a utility method that we wrote in pde.build. The utility class is internal, but you are already a friend. Or you can just create your own utility. There are similar changes in pde.build that I am making and will release for M1. With this I was able to export swt.gtk.linux.x86 using the NativeCode entry similar to the one in bug 284784. I haven't yet tried exports with metadata, that will probably need additional work in p2. It would be nice to have in I think, but it wouldn't be a huge problem if this didn't make M1, especially since the p2-enabled exports probably have issues.
Chris, there is also a filter check in pde.core/TargetPlatformHelper.matchesCurrentEnvironment I don't know anything about how that is used.
Removing M2 milestone
Hi ! I am wondering if this might be also causing following strange effect we see while building an RCP on Solaris10/Sparc. We have a Bundle Fragment with: "Bundle-NativeCode: X.so;osname=sunos;processor=sparc" The Fragment works fine in a minimalistic OSGi Server. But when we now build our RCP using the PDE 3.5 it fails with: --------------- [java] [eclipse.buildScript] Some inter-plug-in dependencies have not been satisfied. [java] [eclipse.buildScript] Bundle com.versant.jvi.solaris.sparc: [java] [eclipse.buildScript] Host plug-in Bundle-NativeCode_0.0.0 has not been found. ---------------- When we now change the Fragment definition to: "Bundle-NativeCode: X.so;osname=solaris;processor=sparc" the PDE build works fine but at runtime it can't be resolved anymore. Only with: "Bundle-NativeCode: X.so;osname=sunos;osname=solaris;processor=sparc" it works fine now. cheers Christian
(In reply to comment #6) > [java] [eclipse.buildScript] Bundle com.versant.jvi.solaris.sparc: > [java] [eclipse.buildScript] Host plug-in Bundle-NativeCode_0.0.0 has not > been found. Yes you are hitting this bug. The nonsense error message is bug 284806.
I am also blocked by this bug. We cannot build bundles with native code for platforms other than the one where PDE is running.
We are using 3.5 to build our product for different platform (Linux and Windows) and architecture (x86 and x86_64) and we are now hitting this bug too. Are there any workarounds?
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.