Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cbi-dev] "native" Eclipse Platform Build

Hi Andrew, Thanh,

thank you for the help!
I've joined the cbi-dev mailing list as suggested.

Right now I've just followed the steps in the wiki for building 4.x
natives but the build fails.

I'm using maven 3.0.4 I've installed locally and jdk 1.7.0_04 from Oracle.
Both are configured and are in the path. JAVA_HOME is also properly set.
My home system is Kubuntu 12.04 64 bit, but I plan to re-produce the build
on RHEL 5.8 64 bit, so any help is welcome.

Please note that I didn't started with fetching the "natives" p2
repository as this "natives" is exactly the reason for me to build eclipse
  from scratch. But it looks like maven still insists to see it, see the
error logs below...

Could you please shed some light how one can debug the maven build/play
with the arguments. E.g. where is the place in the maven build where the
-Dnative=linux.gtk.x86_64 argument is consumed?

Here are my steps:

$ java -version
java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b20)
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode)

$ mvn -version
Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100)
Maven home: /opt/java/libs/apache-maven-3.0.4
Java version: 1.7.0_04, vendor: Oracle Corporation
Java home: /usr/lib/jvm/jdk1.7.0_04/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-26-generic", arch: "amd64", family:
"unix"

$ ls -l ~/.m2/settings.xml
ls: cannot access /home/andrei/.m2/settings.xml: No such file or directory

export MAVEN_OPTS=-Xmx512m
mkdir ~/workspace_sdk_build
cd ~/workspace_sdk_build
git clone -b Juno_RC4_R4 --recurse-submodules \
git://git.eclipse.org/gitroot/cbi/platform-aggregator.git
R4_platform-aggregator

cd R4_platform-aggregator
git fetch origin
git checkout -b Juno_RC4_R4 origin/Juno_RC4_R4
git pull --recurse-submodules
git submodule update

mvn -f eclipse-parent/pom.xml \
     clean install \
     -Dmaven.repo.local=/var/tmp/lts/R4_localrepo

mvn clean install \
      -Dmaven.repo.local=/var/tmp/lts/R4_localrepo \
      -Dmaven.test.skip=true -Dnative=linux.gtk.x86_64

[INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject:
eclipse.jdt:org.eclipse.jdt:3.8.0-SNAPSHOT @
/home/andrei/workspace_sdk_build/R4_platform-aggregator/eclipse.jdt/org.eclipse.jdt/pom.xml
[INFO] Adding repository
http://download.eclipse.org/tools/orbit/downloads/drops/R20120526062928/repository
[INFO] Adding repository
http://download.eclipse.org/tools/orbit/downloads/drops/R20120526062928/repository
[INFO] Adding repository http://download.eclipse.org/rt/ecf/3.5.6/site.p2
[INFO] Adding repository http://download.eclipse.org/rt/ecf/3.5.6/site.p2
[INFO] Adding repository
http://www.eclipse.org/external/jetty/updates/jetty-bundles-8.x/8.1.3.v20120522
[INFO] Adding repository
http://www.eclipse.org/external/jetty/updates/jetty-bundles-8.x/8.1.3.v20120522
[INFO] Adding repository
http://download.eclipse.org/modeling/emf/emf/updates/2.8milestones
[INFO] Adding repository
http://download.eclipse.org/modeling/emf/emf/updates/2.8milestones
[INFO] Adding repository http://download.eclipse.org/egit/updates
[INFO] Adding repository http://download.eclipse.org/egit/updates
[INFO] Adding repository file:/var/tmp/lts/natives
[ERROR] Internal error: java.lang.RuntimeException:
org.eclipse.equinox.p2.core.ProvisionException: No repository found at
file:/var/tmp/lts/natives. -> [Help 1]
org.apache.maven.InternalErrorException: Internal error:
java.lang.RuntimeException:
org.eclipse.equinox.p2.core.ProvisionException: No repository found at
file:/var/tmp/lts/natives.
          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:57)
          at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:601)
          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:
org.eclipse.equinox.p2.core.ProvisionException: No repository found at
file:/var/tmp/lts/natives.
          at
org.eclipse.tycho.p2.target.TargetPlatformBuilderImpl.addP2Repository(TargetPlatformBuilderImpl.java:245)
          at
org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.addEntireP2RepositoryToTargetPlatform(P2TargetPlatformResolver.java:316)
          at
org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.computeTargetPlatform(P2TargetPlatformResolver.java:205)
          at
org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:89)
          at
org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:64)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:274)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
          ... 11 more
Caused by: org.eclipse.equinox.p2.core.ProvisionException: No repository
found at file:/var/tmp/lts/natives.
          at
org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.fail(AbstractRepositoryManager.java:393)
          at
org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:675)
          at
org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:96)
          at
org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:92)
          at
org.eclipse.tycho.p2.remote.RemoteMetadataRepositoryManager.loadRepository(RemoteMetadataRepositoryManager.java:82)
          at
org.eclipse.tycho.p2.target.TargetPlatformBuilderImpl.addP2Repository(TargetPlatformBuilderImpl.java:232)
          ... 17 more
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the
-e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/InternalErrorException

So I've restarted the build as suggested with -e -D switch:

mvn clean install -e -X -Dmaven.repo.local=/var/tmp/lts/R4_localrepo
-Dmaven.test.skip=true -Dnative=linux.gtk.x86_64

Now the end of the long output looks like:

[INFO] Adding repository file:/var/tmp/lts/natives
!SESSION 2012-07-03 23:00:21.324
-----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_04
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -eclipse.keyring
/tmp/tycho4090549123955706824secure_storage
Command-line arguments:  -eclipse.keyring
/tmp/tycho4090549123955706824secure_storage -debug -consoleLog

!ENTRY org.eclipse.equinox.p2.metadata.repository 4 0 2012-07-03
23:00:21.325
!MESSAGE Unexpected error loading extension:
org.eclipse.equinox.p2.updatesite.metadataRepository
!STACK 0
java.lang.ClassCastException:
org.eclipse.tycho.p2.remote.RemoteMetadataRepositoryManager cannot be cast
to
org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager
          at
org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository.setProperty(LocalMetadataRepository.java:327)
          at
org.eclipse.equinox.p2.repository.spi.AbstractRepository.setProperty(AbstractRepository.java:189)
          at
org.eclipse.equinox.internal.p2.updatesite.metadata.UpdateSiteMetadataRepositoryFactory.resetCache(UpdateSiteMetadataRepositoryFactory.java:81)
          at
org.eclipse.equinox.internal.p2.updatesite.metadata.UpdateSiteMetadataRepositoryFactory.load(UpdateSiteMetadataRepositoryFactory.java:61)
          at
org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.factoryLoad(MetadataRepositoryManager.java:57)
          at
org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:758)
          at
org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:651)
          at
org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:96)
          at
org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:92)
          at
org.eclipse.tycho.p2.remote.RemoteMetadataRepositoryManager.loadRepository(RemoteMetadataRepositoryManager.java:82)
          at
org.eclipse.tycho.p2.target.TargetPlatformBuilderImpl.addP2Repository(TargetPlatformBuilderImpl.java:232)
          at
org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.addEntireP2RepositoryToTargetPlatform(P2TargetPlatformResolver.java:316)
          at
org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.computeTargetPlatform(P2TargetPlatformResolver.java:205)
          at
org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:89)
          at
org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:64)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:274)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
          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:57)
          at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:601)
          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)
[ERROR] Internal error: java.lang.RuntimeException:
org.eclipse.equinox.p2.core.ProvisionException: No repository found at
file:/var/tmp/lts/natives. -> [Help 1]
org.apache.maven.InternalErrorException: Internal error:
java.lang.RuntimeException:
org.eclipse.equinox.p2.core.ProvisionException: No repository found at
file:/var/tmp/lts/natives.
          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:57)
          at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:601)
          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:
org.eclipse.equinox.p2.core.ProvisionException: No repository found at
file:/var/tmp/lts/natives.
          at
org.eclipse.tycho.p2.target.TargetPlatformBuilderImpl.addP2Repository(TargetPlatformBuilderImpl.java:245)
          at
org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.addEntireP2RepositoryToTargetPlatform(P2TargetPlatformResolver.java:316)
          at
org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.computeTargetPlatform(P2TargetPlatformResolver.java:205)
          at
org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:89)
          at
org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:64)
          at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:274)
          at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
          ... 11 more
Caused by: org.eclipse.equinox.p2.core.ProvisionException: No repository
found at file:/var/tmp/lts/natives.
          at
org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.fail(AbstractRepositoryManager.java:393)
          at
org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:675)
          at
org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:96)
          at
org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:92)
          at
org.eclipse.tycho.p2.remote.RemoteMetadataRepositoryManager.loadRepository(RemoteMetadataRepositoryManager.java:82)
          at
org.eclipse.tycho.p2.target.TargetPlatformBuilderImpl.addP2Repository(TargetPlatformBuilderImpl.java:232)
          ... 17 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/InternalErrorException

Any idea?


On Tue, 03 Jul 2012 18:41:54 +0200, Thanh Ha <thanh.ha@xxxxxxxxxxx> wrote:

Hi Andrey,

The native build is currently only enabled in the R4 platform
repository. You should be able to use the instructions at [1] more
specifically at [2] using the -Dnative=linux.gtk.x86_64 parameter to
build the natives for your system.

[1] http://wiki.eclipse.org/CBI/Eclipse_Platform_Build
[2] http://wiki.eclipse.org/CBI/Eclipse_Platform_Build#Eclipse_4.x_Branch


Thanh

On 07/03/2012 12:35 PM, Andrew Ross wrote:
Hi Andrey,

Your timing is excellent. Red Hat recently contributed code that
enables building the native components such as SWT & Equinox
launchers. Thanh Ha (cc:'d) can provide the instructions to trigger
the native build. It'll be on the wiki page soon.

I encourage you to use the cbi-dev list for support with the
Maven/Tycho build of the platform after that.

Also, I should point out that the Eclipse platform is not going to be
using this particular build until SR1 (Sept. 28th). This may be fine
for your debugging though.

Andrew

On 06/29/2012 04:47 PM, Andrey Loskutov wrote:
Hi Ross,

I'm trying to build "Classic Eclipse SDK 3.8" from scratch and was
looking for pointers. The page [1] looks very promising, except one
very important but missing step: how to build "native binaries and
bundles that wrap them". But "native" part is exact the reason why we
trying to re-build Eclipse 3.8 (see [2]). Do you have any pointers
for me related to the native build? We have RHEL 5.8 64 bit as target
platform. Many thanks in advance.

[1] http://wiki.eclipse.org/CBI/Eclipse_Platform_Build
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=383890

--
Kind regards,
Mit freundlichen Grüßen
Andrey Loskutov

+Andrey: http://plus.google.com/u/0/113794713998126448910


Back to the top