| Summary: | CBI build of platform native SWT code | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Technology] CBI | Reporter: | Andrea Ross <andrea.ross> | ||||||||||
| Component: | build help | Assignee: | CBI Inbox <cbi-inbox> | ||||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||||
| Severity: | major | ||||||||||||
| Priority: | P2 | CC: | akurtakov, andrea.ross, gheorghe, igor, john.arthorne, krzysztof.daniel, loskutov, pwebster, remy.suen, Silenio_Quarti, thanh.ha | ||||||||||
| Version: | 1.0 | ||||||||||||
| Target Milestone: | --- | ||||||||||||
| Hardware: | All | ||||||||||||
| OS: | All | ||||||||||||
| Whiteboard: | |||||||||||||
| Bug Depends on: | 380867, 380934, 381192 | ||||||||||||
| Bug Blocks: | 372792 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Andrea Ross
Ideally the native SWT code should be buildable with Maven by enabling a maven profile aka -P native-compile or smth like that. Calling the current build.sh or even proper maven build via native-maven-plugin should do the trick. Actually http://duns.github.com/maven-nar-plugin should allow us to directly call the make files which might be the best option. @Alexander do you think you can provide a patch that allows maven build of swt native binaries? I will try. We should first create a submodule and poms in it for the swt repos, right? Is there something in regards to this? I guess I have to clarify the previous comment. I'm looking for the best way to integrate anything I might produce into the current way CBI works. Should we add the SWT repos to the aggregator Juno_M6_R3 branch so that CBI committers can try out different poms in a branch in them? PW (In reply to comment #6) > Should we add the SWT repos to the aggregator Juno_M6_R3 branch so that CBI > committers can try out different poms in a branch in them? > > PW I'm waiting for the very same reply but probably I haven't asked it that clear :) We'll add them tomorrow. I can pull these in but just want to make sure I got everything covered. Is it just the following repositories that need to be pulled in? eclipse.platform.swt.binaries.git eclipse.platform.swt.git (is already in cbi) Do we need to add rt.equinox.binaries.git as well? Thanh, why do we go ahead and hook up the rest of the build repositories for M6 (just like we did for eclipsebuilder). I think most of them are already included, but there's the complete list used to build M6. git://git.eclipse.org/gitroot/equinox/rt.equinox.binaries.git git://git.eclipse.org/gitroot/equinox/rt.equinox.bundles.git git://git.eclipse.org/gitroot/equinox/rt.equinox.framework.git git://git.eclipse.org/gitroot/equinox/rt.equinox.incubator.git git://git.eclipse.org/gitroot/equinox/rt.equinox.p2.git git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.binaries.git git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git git://git.eclipse.org/gitroot/jdt/eclipse.jdt.debug.git git://git.eclipse.org/gitroot/jdt/eclipse.jdt.git git://git.eclipse.org/gitroot/jdt/eclipse.jdt.ui.git git://git.eclipse.org/gitroot/pde/eclipse.pde.git git://git.eclipse.org/gitroot/pde/eclipse.pde.build.git git://git.eclipse.org/gitroot/pde/eclipse.pde.ui.git git://git.eclipse.org/gitroot/platform/eclipse.platform.common.git git://git.eclipse.org/gitroot/platform/eclipse.platform.debug.git git://git.eclipse.org/gitroot/platform/eclipse.platform.git git://git.eclipse.org/gitroot/platform/eclipse.platform.releng.git git://git.eclipse.org/gitroot/platform/eclipse.platform.resources.git git://git.eclipse.org/gitroot/platform/eclipse.platform.runtime.git git://git.eclipse.org/gitroot/platform/eclipse.platform.swt.binaries.git git://git.eclipse.org/gitroot/platform/eclipse.platform.swt.git git://git.eclipse.org/gitroot/platform/eclipse.platform.team.git git://git.eclipse.org/gitroot/platform/eclipse.platform.text.git git://git.eclipse.org/gitroot/platform/eclipse.platform.ua.git git://git.eclipse.org/gitroot/platform/eclipse.platform.ui.git I updated CBI Juno_M6_R3 branch with the addition of the remaining platform repositories. Specificially: rt.equinox.binaries.git rt.equinox.incubator.git eclipse.platform.swt.binaries.git Created attachment 216389 [details]
Part I
This patch rebuilds the natvie bits of org.eclipse.swt.gtk.linux.x86_64 if they're missing. The next step is to adjust the native repo and force CBI to use the just-built bundles.
Created attachment 216654 [details]
Enable the swt.binaries repo
Created attachment 216655 [details]
Enable SWT building
So it looks like it finally works (for me). I had to split the changes into two parts. The second part is attached to this bug and it is about enabling the SWT native builds in the R4 aggregator. Nothing really fancy here. The more interesting part is in the bug 381192. To get the full CBI build it is necessary to: * have 64 bit architecture (because only this fragment is enabled) * apply all patches from this bug and bug 381192. * remove fragment that will be build from the native repo (that includes metadata regeneration). * have some luck (In reply to comment #16) > So it looks like it finally works (for me). > > I had to split the changes into two parts. The second part is attached to this > bug and it is about enabling the SWT native builds in the R4 aggregator. > Nothing really fancy here. > > The more interesting part is in the bug 381192. To get the full CBI build it is > necessary to: > * have 64 bit architecture (because only this fragment is enabled) > * apply all patches from this bug and bug 381192. > * remove fragment that will be build from the native repo (that includes > metadata regeneration). > * have some luck I applied the patches and removed the natives repo from my eclipse-parent/pom.xml but I'm running into the error below. Am I perhaps missing something? [INFO] Resolving dependencies of MavenProject: eclipse.jdt:org.eclipse.jdt:3.8.0-SNAPSHOT @ /home/user/Downloads/eclipse2/R4_platform-aggregator/eclipse.jdt/org.eclipse.jdt/pom.xml [ERROR] Internal error: java.lang.RuntimeException: Could not determine SWT implementation fragment bundle -> [Help 1] org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Could not determine SWT implementation fragment bundle at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: java.lang.RuntimeException: Could not determine SWT implementation fragment bundle at org.eclipse.tycho.p2.impl.resolver.ProjectorResolutionStrategy.fixSWT(ProjectorResolutionStrategy.java:131) at org.eclipse.tycho.p2.impl.resolver.ProjectorResolutionStrategy.resolve(ProjectorResolutionStrategy.java:90) at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveProject(P2ResolverImpl.java:118) at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveProject(P2ResolverImpl.java:76) at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.doResolvePlatform(P2TargetPlatformResolver.java:445) at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.resolveDependencies(P2TargetPlatformResolver.java:422) at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:98) at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:61) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:274) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) ... 11 more My patch is for linux gtk x86_64 fragment only. It will not work with other fragments. Here is the list of changes that I think are required: ~/cbi/R4_platform-aggregator/pom.xml - enablement of the eclipse.platform.swt.binaries module. ~/cbi/R4_platform-aggregator/eclipse.platform.swt/pom.xml - enablement of org.eclipse.swt module ~/cbi/R4_platform-aggregator/eclipse.platform.swt/bundles/org.eclipse.swt/pom.xml should be present ~/cbi/R4_platform-aggregator/eclipse.platform.swt/bundles/org.eclipse.swt/buildFragment.xml - added tasks for native builds. ~/cbi/R4_platform-aggregator/eclipse.platform.swt.binaries/pom.xml - enabled module bundles/org.eclipse.swt.gtk.linux.x86_64 ~/cbi/R4_platform-aggregator/eclipse.platform.swt.binaries/bundles/org.eclipse.swt.gtk.linux.x86_64/pom.xml actual bulding of the native bits To enable native building of the swt fragment, enable the profile using the -P build-natives switch. Than, Bug 381192 just got a whole new set of pom.xmls and build.properties. Could you try them out? I believe patches are now in nearly final shape, and once you confirm they work for you, I'll start moving them to all linux-alike platforms (although they should work also for others, too, but I am not able to test them...). (In reply to comment #19) > Than, > > Bug 381192 just got a whole new set of pom.xmls and build.properties. Could you > try them out? I believe patches are now in nearly final shape, and once you > confirm they work for you, I'll start moving them to all linux-alike platforms > (although they should work also for others, too, but I am not able to test > them...). I tried the new patches and am running into the following issue with rhino:js:jar however. Could I be missing something not included in the patches? [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (natives) on project org.eclipse.swt.gtk.linux.x86_64: Execution natives of goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run failed: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.7 or one of its dependencies could not be resolved: The following artifacts could not be resolved: rhino:js:jar:1.7R3, org.apache.ant:ant-nodeps:jar:1.8.3: Could not find artifact rhino:js:jar:1.7R3 in central (http://repo.maven.apache.org/maven2) -> [Help 1] Try to replace rhino version 1.7R3 to 1.7R2 and ant-nodeps 1.8.3 to 1.8.1. That should help. Created attachment 217276 [details]
Build all swt bundles (eclipse.platform.swt repo).
I'm tired of splitting my patches and putting them into two bugs. I'll continue my work in bug 381192 until all the ui will be build from sources, and then, if anything related to swt natives is left, I'll get back here. Patches are attached to the bug 381192. setting to CBI 1.0 Going to mark this one as closed since the work is tracked elsewhere. Feel free to re-open if I am mistaken. |