| Summary: | Native launcher not built during first build | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Krzysztof Daniel <krzysztof.daniel> | ||||||
| Component: | Launcher | Assignee: | Mat Booth <mat.booth> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | akurtakov, cdtbog, gheorghe, igor, krzysztof.daniel, mat.booth, Silenio_Quarti, thanh.ha | ||||||
| Version: | unspecified | Flags: | thanh.ha:
review+
|
||||||
| Target Milestone: | 4.9 M2 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| See Also: |
https://git.eclipse.org/r/123178 https://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?id=6276787184cca0e010e08f14e24d646ca184a1e6 |
||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Krzysztof Daniel
Also, org.eclipse.equinox.executable is in bundles, not in features. In addition, to all that, it is necessary to adjust native launchers version in pom.xml after each change. Currently, in Fedora, I do it in a very ugly way:
sed -i -e "s/1407/1503/" rt.equinox.framework/launcher-binary-parent/pom.xml
sed -i -e "s/1500/1503/" rt.equinox.framework/bundles/org.eclipse.equinox.launcher.gtk.linux.${ARCH}/pom.xml
Following my recent discussions on eclipse-dev, I'm moving this bug from cbi to where it should belong to (equinox launchers). I'd like to find a good way to contribute it - majority of changes will be about moving existing code between bundles. Bogdan, I'd like to work on this. It's a lot of moving (native parts need to be moved out of the feature) and a few script tweaks. How would you see the cooperation here? I think attaching/reviewing patches for such a change will be a nightmare... Created attachment 233950 [details]
No refactoring patch
instead of refactoring and moving native bits out of the feature I've changed a place of build.xml invocation - now native libraries are built when a fragment is built, not as previously together with a feature.
Created attachment 233951 [details]
mylyn/context/zip
Thanh, could you double-check my work? The patch has absolutely no effect unless building native libraries - the build script is invoked from fragments, not from the feature (because feature is built last after all required plugins are build). (In reply to comment #7) > Thanh, > could you double-check my work? > > The patch has absolutely no effect unless building native libraries - the > build script is invoked from fragments, not from the feature (because > feature is built last after all required plugins are build). Sure I'll take a look this afternoon. I don't have access to a Windows box with capabilities to build source code unfortunately so I can't test that part.
However I just tested building Linux x86 and x86_64 and it appears to work. I can see it compiling things and the build succeeds.
I will try building on Mac soon.
Interestingly I thought I'd try building the Windows and Mac natives while still on Linux and found that the Windows ones fail with permission denied (can't run bat file) but the Mac one successfully builds despite compile error.
build_eclipse:
[exec] cc: error: i386: No such file or directory
[exec] cc: error: ppc: No such file or directory
[exec] cc: error: unrecognized command line optionbuild x86 and ppc
[exec] cc -O -s -mmacosx-version-min=10.3 -Wall -arch i386 -arch ppc -DMACOSX -DDEFAULT_OS="\"macosx\"" -DDEFAULT_OS_ARCH="\"x86\"" -DDEFAULT_WS="\"carbon\"" -I.. -I../motif -I/System/Library/Frameworks/JavaVM.framework/Headers -c eclipseMain.c -o eclipseMain.o
[exec] ‘-mmacosx-version-min=10.3’
[exec] cc: error: unrecognized command line option ‘-arch’
[exec] cc: error: unrecognized command line option ‘-arch’
[exec] make: *** [eclipseMain.o] Error 1
[exec] Result: 2
Actually I forgot to clear my ~/.m2/repository before running the build previously. I just ran it again with a cleaned repo and clean "~/.m2/repository" and ran into this error: [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: An Ant BuildException has occured: The following error occurred while executing this line: [ERROR] /buildroot/eclipse.platform.releng.aggregator/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml:932: The following error occurred while executing this line: [ERROR] /buildroot/eclipse.platform.releng.aggregator/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml:1010: exec returned: 2 [ERROR] around Ant part ...<ant antfile="build.xml" target="build_libraries"/>... @ 4:54 in /buildroot/eclipse.platform.releng.aggregator/eclipse.platform.swt.binaries/bundles/org.eclipse.swt.gtk.linux.x86_64/target/antrun/build-main.xml [ERROR] -> [Help 1] (In reply to comment #10) > Actually I forgot to clear my ~/.m2/repository before running the build > previously. I just ran it again with a cleaned repo and clean > "~/.m2/repository" and ran into this error: > Looks like it's failing on org.eclipse.swt.gtk.linux.x86_64 and my build hasn't reached the point yet where the launchers are built. (In reply to comment #11) > (In reply to comment #10) > > Actually I forgot to clear my ~/.m2/repository before running the build > > previously. I just ran it again with a cleaned repo and clean > > "~/.m2/repository" and ran into this error: > > > > Looks like it's failing on org.eclipse.swt.gtk.linux.x86_64 and my build > hasn't reached the point yet where the launchers are built. Oh I remember this issue now. Have to remove make_xulrunner, make_mozilla and make_xpcominit from the build.xml in order to build natives because the patches to remove these were not accepted when we submitted the CBI patches. I'm restarting my build now with the changes. Sorry for the delay. I successfully built using these patches so I think the patches are ok. I can launch Eclipse that is produced as well. Built on Mac OSX and Linux. Unfortunately the targets in SWT for make_xulrunner, make_mozilla and make_xpcominit still get in the way of the build though so someone who didn't patch that won't be able to build. (In reply to comment #13) > Sorry for the delay. I successfully built using these patches so I think the > patches are ok. I can launch Eclipse that is produced as well. > > Built on Mac OSX and Linux. > > > > Unfortunately the targets in SWT for make_xulrunner, make_mozilla and > make_xpcominit still get in the way of the build though so someone who > didn't patch that won't be able to build. I feel the problem too, but I don't see an easy way to fix it as neither whitelist nor blacklist approach can work as mozilla changes their api constantly and swt can build only with a limited number of versions and one doesn't know whether if it builds with x.y.z.1 it will build with x.y.z.2. (In reply to comment #13) > I can launch Eclipse that is produced as well. That's the most important sign :). I am afraid I did not emphasized it - but have you removed *.so before running the build? (In reply to comment #15) > (In reply to comment #13) > > I can launch Eclipse that is produced as well. > > That's the most important sign :). I am afraid I did not emphasized it - but > have you removed *.so before running the build? In which directory? I ensured that the ones in for example: rt.equinox.framework/bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64 were removed but should I have removed them from somewhere else in addition to the platform specific launcher bundles? (In reply to comment #16) > (In reply to comment #15) > > (In reply to comment #13) > > > I can launch Eclipse that is produced as well. > > > > That's the most important sign :). I am afraid I did not emphasized it - but > > have you removed *.so before running the build? > > In which directory? > > I ensured that the ones in for example: > rt.equinox.framework/bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64 > > were removed but should I have removed them from somewhere else in addition > to the platform specific launcher bundles? That's enough, as I was concerned only about launchers :) Thanks! What's the status of it? Who should I ping to get this released? New Gerrit change created: https://git.eclipse.org/r/123178 I am restarting the effort to get this problem fixed, since we still carry this patch in Fedora. Here's the latest iteration:
A quick summary of the problem I am trying to solve...
For downstream integrators like me who have to build everything from source there is an ordering problem.
Because the maven reactor orders the fragments *before* the feature, it means that the native parts are not built in time to be included in the fragments and the fragments are missing the *.so/*.dll files entirely.
For example, when I do this:
find ../rt.equinox.binaries/org.eclipse.equinox.executable/* -type f -delete
find ../rt.equinox.binaries/org.eclipse.equinox.launcher.* -name *.so -delete
mvn clean package -Pbuild-individual-bundles \
-DskipTests -Dnative=gtk.linux.x86_64
Then the resulting gtk.linux.x86_64 fragment is missing the *.so file:
$ unzip -l bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64/target/org.eclipse.equinox.launcher.gtk.linux.x86_64-1.1.700-SNAPSHOT.jar
Archive: bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64/target/org.eclipse.equinox.launcher.gtk.linux.x86_64-1.1.700-SNAPSHOT.jar
Length Date Time Name
--------- ---------- ----- ----
780 05-23-2018 15:22 META-INF/MANIFEST.MF
0 05-23-2018 15:22 META-INF/
620 04-27-2018 16:09 launcher.gtk.linux.x86_64.properties
1445 04-27-2018 16:09 about.html
--------- -------
2845 4 files
With the patch applied that I submitted to gerrit in comment #19, the build now does the Right Thing™ and the fragment correctly contains the *.so file:
$ unzip -l bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64/target/org.eclipse.equinox.launcher.gtk.linux.x86_64-1.1.700-SNAPSHOT.jar
Archive: bundles/org.eclipse.equinox.launcher.gtk.linux.x86_64/target/org.eclipse.equinox.launcher.gtk.linux.x86_64-1.1.700-SNAPSHOT.jar
Length Date Time Name
--------- ---------- ----- ----
756 05-23-2018 15:25 META-INF/MANIFEST.MF
0 05-23-2018 15:25 META-INF/
204200 05-23-2018 15:25 eclipse_1705.so
620 04-27-2018 16:09 launcher.gtk.linux.x86_64.properties
1445 04-27-2018 16:09 about.html
--------- -------
207021 5 files
Gerrit change https://git.eclipse.org/r/123178 was merged to [master]. Commit: http://git.eclipse.org/c/equinox/rt.equinox.framework.git/commit/?id=6276787184cca0e010e08f14e24d646ca184a1e6 |