Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [linuxtools-dev] Eclipse Build 0.6.0?

On Tuesday, 10 August 2010, at 9:52 am, Andrew Overholt wrote:
> * Matt Whitlock <matt@xxxxxxxxxxxxx> [2010-08-09 21:19]:
> > After bringing all the dependencies up to date and jumping through the usual hoops, I get hit with this:
> 
> :)  Is there something you propose to make "the usual hoops" less
> arduous?

Currently, the Gentoo ebuild goes through these steps to build Eclipse:

	1. Set buildArch in build.properties. (Merely specifying it on the command line to ant results in a build failure.)
	2. Replace all the runtime class paths in build.properties and pdebuild.properties with the real class paths from the system.
	3. Remove from build.xml the steps that handle symlinking to dependencies. (The system-installed dependencies in Gentoo do not have OSGi metadata, so we're forced to set up unpacked bundles in Eclipse's plugins directory that contain the OSGi metadata and symlinks to the system-installed JARs.)
	4. Strip the building of libgnomeproxy from build.xml on x86 if the user has the "gnome" USE flag disabled.
	5. Strip the building of the SWT native libraries from build.xml since SWT is installed independently on Gentoo.
	6. Remove from the feature.xml files all the plugins that are for platforms (os, ws, arch) other than the host platform.
	7. Remove the doc plugins if the user has the "doc" USE flag disabled.
	8. Remove the source plugins if the user has the "source" USE flag disabled.
	9. Create the plugins for the external dependencies by copying the manifests from dependencyManifests and symlinking to the system-installed JARs. (Getting this to work requires a relatively great amount of effort to fix up all the build.xml files.)
	10. Apply the two patch files that are attached, in addition to the iterators.patch that I sent previously.
	11. Run the ant build.
	12. Redo all the dependency symlinks in the installation dir since P2 copies the referents instead of the symlinks.
	13. Create the launcher script and the desktop menu entry.

The modified build process described above is the culmination of at least 40 hours of my own work.  Finding all the little things that need to be tweaked throughout the XML files and developing the scripts to do the tweaking took a tremendous amount of work.  My conclusion is that the Eclipse build process is a nightmare.  If it weren't for your efforts with Eclipse Build, building Eclipse would be completely impossible for anyone lacking intimate internal knowledge of PDE Build, Equinox, and P2.
--- plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/buildpath/BuildPathSupport.java~	2010-05-21 10:01:31.000000000 +0000
+++ plugins/org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/buildpath/BuildPathSupport.java	2010-08-09 21:32:27.813247049 +0000
@@ -139,7 +139,7 @@
 			"org.junit", new VersionRange("[4.7.0,5.0.0)"), "junit.jar", "org.junit.source", "source-bundle/", JUnitPreferencesConstants.JUNIT4_JAVADOC); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
 	
 	private static final JUnitPluginDescription HAMCREST_CORE_PLUGIN= new JUnitPluginDescription(
-			"org.hamcrest.core", new VersionRange("[1.1.0,2.0.0)"), null, "org.hamcrest.core.source", "source-bundle/", JUnitPreferencesConstants.HAMCREST_CORE_JAVADOC); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			"org.hamcrest.core", new VersionRange("[1.1.0,2.0.0)"), "hamcrest-core.jar", "org.hamcrest.core.source", "source-bundle/", JUnitPreferencesConstants.HAMCREST_CORE_JAVADOC); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 
 	/**
 	 * @return the JUnit3 classpath container
--- features/org.eclipse.equinox.executable/library/gtk/make_linux.mak~	2010-02-08 21:14:12.000000000 +0000
+++ features/org.eclipse.equinox.executable/library/gtk/make_linux.mak	2010-08-09 21:47:30.543247031 +0000
@@ -27,7 +27,8 @@
   PROGRAM_OUTPUT=eclipse
 endif
 
-PROGRAM_LIBRARY=$(PROGRAM_OUTPUT)_$(LIB_VERSION).so
+PROGRAM_SONAME=$(PROGRAM_OUTPUT)_$(LIB_VERSION)
+PROGRAM_LIBRARY=$(PROGRAM_SONAME).so
 
 ifeq ($(DEFAULT_JAVA),)
   DEFAULT_JAVA=DEFAULT_JAVA_JNI
@@ -44,8 +45,8 @@
 #LIBS = `pkg-config --libs-only-L gtk+-2.0` -lgtk-x11-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lgdk-x11-2.0 -lpthread -ldl -lX11
 LIBS = -lpthread -ldl
 GTK_LIBS = -DGTK_LIB="\"libgtk-x11-2.0.so.0\"" -DGDK_LIB="\"libgdk-x11-2.0.so.0\"" -DPIXBUF_LIB="\"libgdk_pixbuf-2.0.so.0\"" -DGOBJ_LIB="\"libgobject-2.0.so.0\"" -DX11_LIB="\"libX11.so.6\""
-LFLAGS = ${M_ARCH} -shared -fpic -Wl,--export-dynamic 
-CFLAGS = ${M_ARCH} -g -s -Wall\
+LFLAGS = ${M_ARCH} -shared -Wl,-soname=$(PROGRAM_SONAME) -fpic -Wl,--export-dynamic 
+CFLAGS += ${M_ARCH} -Wall\
 	-fpic \
 	-DLINUX \
 	-DMOZILLA_FIX \
@@ -95,10 +96,10 @@
 	$(CC) $(CFLAGS) -c ../eclipseNix.c -o eclipseNix.o
 
 $(EXEC): $(MAIN_OBJS) $(COMMON_OBJS)
-	$(CC) ${M_ARCH} -o $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS)
+	$(CC) ${M_ARCH} $(LDFLAGS) -o $(EXEC) $(MAIN_OBJS) $(COMMON_OBJS) $(LIBS)
 	
 $(DLL): $(DLL_OBJS) $(COMMON_OBJS)
-	$(CC) $(LFLAGS) -o $(DLL) $(DLL_OBJS) $(COMMON_OBJS) $(LIBS)
+	$(CC) $(LDFLAGS) $(LFLAGS) -o $(DLL) $(DLL_OBJS) $(COMMON_OBJS) $(LIBS)
 
 install: all
 	cp $(EXEC) $(OUTPUT_DIR)

Back to the top