Bug 1129801 - Bootstrap build fails in clean build root
Summary: Bootstrap build fails in clean build root
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: tycho
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Roland Grunberg
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-13 17:11 UTC by Ryan
Modified: 2014-11-27 14:37 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-28 18:42:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Local koji root log (75.06 KB, text/x-log)
2014-08-13 17:12 UTC, Ryan
no flags Details
build from spec in Comment 4 (147.47 KB, text/x-log)
2014-08-15 17:25 UTC, Ryan
no flags Details
build from spec in Comment 4 (133.09 KB, text/x-log)
2014-08-18 21:06 UTC, Ryan
no flags Details

Description Ryan 2014-08-13 17:11:14 UTC
Description of problem:
Unable to perform a build from spec when spec global tycho_bootstrap is set to 1.  A circular build dependency exists.  Tycho BuildRequires maven-plugin-testing-harness which requires icu4j-eclipse.  In order to build icu4j-eclipse,  eclipse-pde is required, which is unavailable in my buildroot because I am trying to perform a bootstrap tycho build so I can build eclipse so I can do a full icu4j build that includes icu4j-eclipse.  Also, the global eclipse_boostrap BuildRequires icu4j-eclipse, which does not exist in a clean build root.

Version-Release number of selected component (if applicable): 0.21.0-1, but problem exists in earlier spec releases


How reproducible: Always


Steps to Reproduce:
1. Set spec global tycho_bootstrap = 1
2. Set spec global eclipse_bootstrap = 1

Actual results:
Excerpt from build.log in local Koji instance:
DEBUG util.py:283:   --> maven-plugin-testing-harness-2.1-11.el7.noarch
DEBUG util.py:283:  Error: No Package found for icu4j-eclipse
DEBUG util.py:373:  Child return code was: 1

Expected results:
Bootstrap build to complete successfully.

Additional info:

Comment 1 Ryan 2014-08-13 17:12:05 UTC
Created attachment 926538 [details]
Local koji root log

Comment 2 Ryan 2014-08-13 17:14:21 UTC
*Correction for bug description.  The excerpt is from our local koji root.log, not the build.log.  I have attached the full root.log.

Comment 3 Roland Grunberg 2014-08-14 21:12:37 UTC
I wasn't able to find any indication that maven-plugin-testing-harness requires icu4j-eclipse but Tycho clearly has a BuildRequires on it so I believe the only solution in this case is to disable the 'BuildRequires: icu4j-eclipse' when %{eclipse_bootstrap} is set to 1. We'd also need to package the icu4j-eclipse jar into the bootstrap repository. I'll have a fix for this very soon.

Comment 4 Roland Grunberg 2014-08-15 15:28:34 UTC
I've packaged a tycho srpm that has the necessary changes : https://rgrunber.fedorapeople.org/tycho/tycho-0.21.0-2.fc22.src.rpm . Can you confirm this builds for you ? There might be additional content that depends back on Eclipse (maybe not in building Tycho, but for other rpms), and it may need to be added to Tycho's bootstrapping repo.

Comment 5 Ryan 2014-08-15 17:24:15 UTC
There are some errors due to RHEL/CentOS 7 not having the newer aether-0.9.0.  I definitely consider that a separate issue and there are separate bugs to file for building aether-0.9.0x against 7.  However, you are correct about content being missing from the bootstrap repo.  I am attaching my build.log because there are a few tyco poms that fail to resolve due to them being missing in the bootstrap repo.  Unfortunately, I will be unable to confirm a successful build for any further changes you come up with until I am able to successfully build aether-0.9.0x against RHEL/CentOS 7, but I will be able to at least perform a build and confirm whether or not the tyco* poms are resolvable.  When looking at the build.log, should tycho have a BR for aether-0.9.0+ since 0.9.0 switched from Sonatype aether to Eclipse aether?

Comment 6 Ryan 2014-08-15 17:25:51 UTC
Created attachment 927187 [details]
build from spec in Comment 4

Comment 7 Roland Grunberg 2014-08-18 20:00:56 UTC
(In reply to comment #5)
> I am attaching my build.log because
> there are a few tyco poms that fail to resolve due to them being missing in the
> bootstrap repo.

If you search for "ERROR", or "COMPILATION ERROR" you'll see the build fails in tycho-core due to the aether incompatibility. As a result when the build gets to tycho-maven-plugin, it fails with :

[ERROR] Failed to execute goal on project tycho-maven-plugin: Could not resolve dependencies for project org.eclipse.tycho:tycho-maven-plugin:maven-plugin:0.21.0-SNAPSHOT: The following artifacts could not be resolved: org.eclipse.tycho:tycho-core:jar:0.21.0-SNAPSHOT, org.eclipse.tycho:tycho-p2-facade:jar:0.21.0-SNAPSHOT

The build is intentionally made to not halt on failures in the bootstrap phase so that any subsequent, independent errors may also be caught looking at the same failed log. On the other hand, this means that some errors are the result of other errors carried forward.

Since tycho-maven-plugin failed to build, I believe its pom never gets installed and so you end up seeing :

[WARNING] Failed to resolve artifact: org.eclipse.tycho:tycho-maven-plugin:pom:0.21.0-SNAPSHOT

There are a few other tycho poms that fail to resolve for the same reason.

> When looking at
> the build.log, should tycho have a BR for aether-0.9.0+ since 0.9.0 switched
> from Sonatype aether to Eclipse aether?

It should be possible to use either version of aether with some minor changs to Tycho sources.

For example, in Fedora there was an update to aether (from sonatype upstream version, to eclipse upstream version) that only required updating the package namespaces used (See http://pkgs.fedoraproject.org/cgit/tycho.git/diff/tycho.spec?id=42c8fb1cb9bbe345d137a455a582ef868d872468 , at 'Move from org.sonatype.aether to org.eclipse.aether' ). Those few lines could probably be removed and it would fix things if you prefer not to update aether.

Comment 8 Ryan 2014-08-18 21:04:45 UTC
Ah, yes, thank you for pointing that out.  That solution is much cleaner.  Alright, I did a build with your modified spec from Comment 4 and removed the three lines following the comment 'Move from org.sonatype.aether to org.eclipse.aether'.  I believe the errors I get now may be closer to what you expected in Comment 4.  I have attached the build.log.

Comment 9 Ryan 2014-08-18 21:06:11 UTC
Created attachment 928072 [details]
build from spec in Comment 4

spec from Comment 4 minus the lines following 'Move from org.sonatype.aether to org.eclipse.aether'

Comment 10 Roland Grunberg 2014-08-19 19:47:41 UTC
I don't think we've ever encountered this kind of error. It looks like it could be related to http://jira.codehaus.org/browse/MNG-5346 since maven-plugin-plugin:3.1:descriptor is running before compilation has occurred, and given that the maven plugins in tycho now uses Java 5 annotations, this fails.

The confusing part is that Tycho 0.21.0 upstream contains the proper workaround for this exact problem in the top-level pom.xml (it references MNG-5346). The only other thing I can think of is that maven-plugin-plugin 3.3 is actually needed, or that maven-compiler-plugin didn't run for some reason. It might help to add the -X flag to the xmvn command in tycho-bootstrap.sh to determine what the actual project build plan is for some that are failing.

I'll have to eventually mark this as CLOSED (NOTABUG) because this doesn't really apply to Fedora.

Comment 11 Ryan 2014-08-19 20:29:48 UTC
I think your resolution in Comment 3 is still valid in the context of performing a bootstrap build in Fedora.  Either way, I will defer to your expertise and I am content to close the bug.  Thank you very much for your time.  It was extremely helpful and appreciated.

Comment 12 Roland Grunberg 2014-08-20 17:02:41 UTC
(In reply to comment #11)
> I think your resolution in Comment 3 is still valid in the context of performing
> a bootstrap build in Fedora.

After some thought on this topic, I think it's worth fixing due to other future bootstrapping requirements.

When looking back at other secondary archs where Tycho was bootstrapped I was surprised I never needed to make this change earlier, given that icu4j it would have always required eclipse-pde to build. Then I realized that because the package itself is 'noarch', it is likely being imported directly onto other architectures. However to support other build systems that have not yet built an icu4j, this would be useful.

Thanks again for filing this.

Comment 13 Roland Grunberg 2014-10-28 18:42:12 UTC
I've pushed a fix for this at http://pkgs.fedoraproject.org/cgit/tycho.git/commit/?id=ea349edafee942a5a564576331e8ff9f4dd115dc .

Comment 14 Roland Grunberg 2014-11-26 18:32:14 UTC
Just some additional news regarding this particular topic :

(In reply to comment #0)
> In order to build
> icu4j-eclipse,  eclipse-pde is required, which is unavailable in my buildroot
> because I am trying to perform a bootstrap tycho build so I can build eclipse so
> I can do a full icu4j build that includes icu4j-eclipse.  Also, the global
> eclipse_boostrap BuildRequires icu4j-eclipse, which does not exist in a clean
> build root.

As of http://pkgs.fedoraproject.org/cgit/icu4j.git/commit/?id=736c03c493c21a1517ac0af79214bcbd8cc997eb , building 'icu4j-eclipse' no longer requires eclipse-pde, and 'icu4j-eclipse' is now provided by the main package. I'll therefore be reverting the commit in Comment #13 (only on rawhide) as it won't be necessary.


Note You need to log in before you can comment on or make changes to this bug.