Community
Participate
Working Groups
When trying to build an Eclipse product on Linux, the tycho build fails when trying to assemble the MacOSX packaged bits. It fails with this error: Installation failed. An error occurred while installing the items session context was:(profile=DefaultProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Install, operand=null --> [R]tycho.example.javaee.product.executable.cocoa.macosx.x86 0.0.1.v201106201435, action=org.eclipse.equinox.internal.p2.touchpoint.natives.actions.ChmodAction). The action chmod failed - file /root/github/gamerson-tycho-sandbox-18d7dd0/TYCHOJavaEEProduct/TYCHOJavaEEProduct-repository/target/products/tycho.example.javaee.product/macosx/cocoa/x86/Tycho Java EE Product/eclipse.app/Contents/MacOS/eclipse does not exist Application failed, log file location: /root/.m2/repository/org/eclipse/tycho/tycho-p2-runtime/0.13.0-SNAPSHOT/eclipse/configuration/1308605626984.log I have created 3 example maven projects that demostrate this error here: https://github.com/gamerson/tycho-sandbox/tree/master/TYCHOJavaEEProduct It works fine on Windows 7, but on Linux I get the above error. I haven't tried on a OSX machine.
Created attachment 198295 [details] example project to replicate error Here is an example project to replicate error. Need to build on linux to see error.
Created attachment 198344 [details] Updated example project to replicate I created a new example project zip that is simpler than previous project. It still replicates the bug on linux OS.
The example project now just contains a parent pom and one single eclipse-repository package. Its the same failure around the ChmodAction. Here is the exact error message shown: [INFO] Calling director with arguments: [-metadatarepository, file:/root/github/gamerson-tycho-sandbox-a08f897/TYCHOJavaEEProduct/TYCHOJavaEEProduct-repository/target/publisherRepository/,file:/root/github/gamerson-tycho-sandbox-a08f897/TYCHOJavaEEProduct/TYCHOJavaEEProduct-repository/target/targetPlatformRepository/, -artifactrepository, file:/root/github/gamerson-tycho-sandbox-a08f897/TYCHOJavaEEProduct/TYCHOJavaEEProduct-repository/target/publisherRepository/,file:/resolution-context-artifacts@/root/github/gamerson-tycho-sandbox-a08f897/TYCHOJavaEEProduct/TYCHOJavaEEProduct-repository,file:/root/.m2/repository/, -installIU, tycho.example.javaee.product, -destination, /root/github/gamerson-tycho-sandbox-a08f897/TYCHOJavaEEProduct/TYCHOJavaEEProduct-repository/target/products/tycho.example.javaee.product/macosx/cocoa/x86/Tycho Java EE Product, -profile, DefaultProfile, -profileProperties, org.eclipse.update.install.features=true, -roaming, -p2.os, macosx, -p2.ws, cocoa, -p2.arch, x86] Installing tycho.example.javaee.product 0.0.1.v201106210842. Installation failed. An error occurred while installing the items session context was:(profile=DefaultProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Install, operand=null --> [R]tycho.example.javaee.product.executable.cocoa.macosx.x86 0.0.1.v201106210842, action=org.eclipse.equinox.internal.p2.touchpoint.natives.actions.ChmodAction). The action chmod failed - file /root/github/gamerson-tycho-sandbox-a08f897/TYCHOJavaEEProduct/TYCHOJavaEEProduct-repository/target/products/tycho.example.javaee.product/macosx/cocoa/x86/Tycho Java EE Product/eclipse.app/Contents/MacOS/eclipse does not exist Application failed, log file location: /root/.m2/repository/org/eclipse/tycho/tycho-p2-runtime/0.13.0-SNAPSHOT/eclipse/configuration/1308670848520.log [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Tycho Java EE Product Parent ...................... SUCCESS [1.439s] [INFO] Tycho Java EE Product Repository .................. FAILURE [1:14.856s] [INFO] ------------------------------------------------------------------------
So it doesn't seem like the problem is with ChmodAction but rather some process before that, that is causing the files to not be there, /Tycho Java EE Product/eclipse.app/Contents/MacOS/eclipse in particular.
Are there any others out there that have a workaround on linux? I guess an easy workaround is to use Windows environment to perform the tycho build.
(In reply to comment #5) > Are there any others out there that have a workaround on linux? I guess an > easy workaround is to use Windows environment to perform the tycho build. Mount a case-insensitive file system?
(In reply to comment #4) > So it doesn't seem like the problem is with ChmodAction but rather some process > before that, that is causing the files to not be there, /Tycho Java EE > Product/eclipse.app/Contents/MacOS/eclipse in particular. In the end it looks as if the unzip (which is configured to run before the chmod) wasn't executed - but I don't think this is true. The p2 Engine recovers from failing installs so that when installing additional things, the previously existing installation is not corrupted. Therefore I think that the unzip is done successfully, then the chmod fails (because "Eclipse.app" is specified in lowercase), and then the unzip is undone.
The root cause for this issue is not bug 316028, but rather the fact that the EquinoxExecutableAction (used by the product publisher) generates a chmod instruction with a "eclipse.app/..." path. Unless changed through branding, the folder is called "Eclipse.app" - and hence the chmod command fails in case-sensitive file systems. This points to another workaround: specify a launcher name different than "" or "eclipse" in the product definition (tab "Launching"). If you wanted to call your launcher "eclipse", the closest you can get is "Eclipse" with a capital e. To fix this, this requires changes in p2, so the fix probably won't be in 0.13.
So if I set the launcher name to "eclipse" it should work on Linux? Is there a way to re-introduce the custom launcher name after the fact? Like a simple rename of the files using an ant script in the build process?
I don't think that changing the name of the launcher will work, because in my current product build I am changing the name of the launcher to a custom name that is neither "" or "eclipse" and it has the same error. I can update the test project for this to show if we need to. Any other possible workarounds?
I am able to build attached example on linux by adding name attribute (i.e. <launcher name="javaeeproduct">).
If I rename the launcher, I can't build on macosx (unless this has been fixed): https://issues.sonatype.org/browse/TYCHO-501...
(In reply to comment #12) > If I rename the launcher, I can't build on macosx (unless this has been fixed): > https://issues.sonatype.org/browse/TYCHO-501... If you still have the problem with tycho 0.13.0-SNAPSHOT, please open new bugreport and attach sample project to reproduce the problem. (this bug is specifically about building macosx rcp applications on Linux)
Once I update to Indigo I am able to now avoid this error by specifying a custom launcher now, which is what I was doing in my product anyways, so this works out good. I consider my issue resolved by moving to Indigo. But if you want to leave this open because of the default case, that is fine, either way. Thanks guys for your responses.
The underlying p2 bug should be fixed now. It hasn't made it into an p2 I-build yet, but once that build exists, I'll update the p2 binaries included by Tycho.
Note to self: also re-test fix for bug 316028
It seems that the Eclipse project (temporarily?) only produces 4.2 I-builds (see also bug 355430), so I update the tycho-bundles-target to one of these builds [1]. I suppose that for the dependencies of Tycho, there is no difference between 3.8 and 4.2. [1] https://git.eclipse.org/r/#/c/5626/
With the update of the p2 version [1], Tycho can now build un-branded product distributions for MacOS on a case-sensitive file system. (In reply to comment #16) > Note to self: also re-test fix for bug 316028 This also works (i.e. there is now an "eclipse" symlink in the root of the Mac distribution), but due to a missing Plexus feature [2], the symlink is "inlined" in the distribution archive. [1] http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/commit/?id=44a45b8f13998a4dfca3452e8bb71e42a1384d72 [2] http://jira.codehaus.org/browse/PLXCOMP-117
(In reply to comment #18) > This also works (i.e. there is now an "eclipse" symlink in the root of the Mac > distribution), but due to a missing Plexus feature [2], the symlink is > "inlined" in the distribution archive. Is there a workaround for the broken symlink in the distribution archive?
(In reply to comment #19) > (In reply to comment #18) > > This also works (i.e. there is now an "eclipse" symlink in the root of the Mac > > distribution), but due to a missing Plexus feature [2], the symlink is > > "inlined" in the distribution archive. > > Is there a workaround for the broken symlink in the distribution archive? None that I am aware of.