PPC Build revisited
Corey Jewett <[email protected]>
| Newsgroups | gmane.comp.java.xwt.general |
|---|---|
| Message-ID | <[email protected]> |
1) Following is the patches I've made to build a Linux-ppc binary. I've
also discovered a bug (which is why this isn't on patches), but I'm not
sure if the problem resides in XWT or gcc, the stack trace follows the
patches.
2) I cannot build a i686 gcj, so therefore I can't build x86 binaries
on PPC. I'd be much obliged if someone would try to build a PPC gcj on
x86 and let me know if it works. (Just apply the following patches and
make Linux-ppc) I will grab the latest gentoo-sources (i686) and try
again sometime next week.
3) I have intentionally renamed the Linux target to Linux-x86. I am
willing to change the shoehorn if needed to make this change permanent.
I think it's important that the binaries reflect the platform,
especially since we may want a Linux-arm or whatever in the future.
4) I don't know where the shoehorn code is so I can fix it. Adam please
advise.
5) PPC builds are also tricky because the JDK is only up to version
1.3.1 (IBM and blackdown). Which explains the changes I made to
Java2.java. Is there some way to remove Java2.java from native builds
altogether, or is it necessary in some way?
? .bootclasspath
? .headers
? .javac
? Makefile.ppc
? bin
? bin-Linux
? bin-Linux-ppc
? gcc/.binutils
? gcc/bin
? gcc/binutils-2.13
? gcc/build
? gcc/i686-pc-linux-gnu
? gcc/include
? gcc/info
? gcc/lib
? gcc/man
? gcc/powerpc-unknown-linux-gnu
? gcc/share
? gcc/src
Index: Makefile
===================================================================
RCS file: /cvs/xwt/Makefile,v
retrieving revision 1.66
diff -B -u -d -r1.66 Makefile
--- Makefile 20 Mar 2003 07:50:04 -0000 1.66
+++ Makefile 22 Mar 2003 01:18:51 -0000
@@ -27,7 +27,7 @@
jar := $(shell ((type fastjar &>/dev/null) && echo
fastjar) || echo jar)
# platforms
-all_platforms := Win32 Linux Java2
+all_platforms := Win32 Linux-x86 Linux-ppc Java2
# path
PATH := jikes-1.18/bin:$(PATH)
@@ -158,12 +158,21 @@
## Platforms
########################################################################
######
-Linux:
- echo -e "\\n=== Linux ========================================="
+Linux-x86:
+ echo -e "\\n=== Linux-x86 ========================================="
make gcj \
platform=Linux \
target=i686-pc-linux-gnu \
- target_bin=xwt.linux \
+ target_bin=xwt.linux-x86 \
+ platform_link="-L$(gcc-path)/lib -L/usr/X11R6/lib -lX11 -lXext
--static" \
+ platform_java_sources="src/org/xwt/plat/POSIX.java
src/org/xwt/plat/X11.java"
+
+Linux-ppc:
+ echo -e "\\n=== Linux-ppc ========================================="
+ make gcj \
+ platform=Linux \
+ target=powerpc-unknown-linux-gnu \
+ target_bin=xwt.linux-ppc \
platform_link="-L$(gcc-path)/lib -L/usr/X11R6/lib -lX11 -lXext
--static" \
platform_java_sources="src/org/xwt/plat/POSIX.java
src/org/xwt/plat/X11.java"
@@ -241,8 +250,11 @@
echo "stripping xwt.exe and copying it to the distribution area..."
$(strip) bin-Win32/xwt.exe -o
/var/www/master.dist.xwt.org/xwt-$(current_build).exe.unsigned
- echo "copying xwt.linux to distribution area..."
- $(strip) bin-Linux/xwt.linux -o
/var/www/master.dist.xwt.org/xwt-$(current_build).linux.unsigned
+ echo "copying xwt.linux-x86 to distribution area..."
+ $(strip) bin-Linux-x86/xwt.linux-x86 -o
/var/www/master.dist.xwt.org/xwt-$(current_build).linux-x86.unsigned
+
+ echo "copying xwt.linux-ppc to distribution area..."
+ $(strip) bin-Linux-ppc/xwt.linux-ppc -o
/var/www/master.dist.xwt.org/xwt-$(current_build).linux-ppc.unsigned
echo "creating source tarball in distribution area..."
CVSROOT=/cvs cvs export -r xwt-$(current_build) xwt
Index: src/org/xwt/XML.java
===================================================================
RCS file: /cvs/xwt/src/org/xwt/XML.java,v
retrieving revision 1.2
diff -B -u -d -r1.2 XML.java
--- src/org/xwt/XML.java 28 May 2002 16:51:58 -0000 1.2
+++ src/org/xwt/XML.java 22 Mar 2003 01:18:55 -0000
@@ -313,7 +313,7 @@
//
currentChar = (buffer.nextIn == buffer.lastIn) ?
buffer.read() : buffer.chars[buffer.nextIn++];
- final int transition;
+ int transition;
if (currentChar > ']') {
transition = state.charAt(14);
Index: src/org/xwt/plat/Java2.java
===================================================================
RCS file: /cvs/xwt/src/org/xwt/plat/Java2.java,v
retrieving revision 1.6
diff -B -u -d -r1.6 Java2.java
--- src/org/xwt/plat/Java2.java 13 Mar 2003 02:12:17 -0000 1.6
+++ src/org/xwt/plat/Java2.java 22 Mar 2003 01:18:55 -0000
@@ -104,7 +104,8 @@
protected DoubleBuffer _createDoubleBuffer(int w, int h, Surface
owner) { return new Java2DoubleBuffer(w, h); }
protected Surface _createSurface(final Box root, final boolean
framed) {
return
(Surface)java.security.AccessController.doPrivileged(new
java.security.PrivilegedAction() {
- public Object run() { return isJava14 ? new
Java14Surface(root, framed) : new Java2Surface(root, framed); }
+// public Object run() { return isJava14 ? new
Java14Surface(root, framed) : new Java2Surface(root, framed); }
+ public Object run() { return new Java2Surface(root,
framed); }
});
}
@@ -143,7 +144,7 @@
else super.syncCursor();
}
}
-
+/*
protected static class Java14Surface extends Java2Surface
implements WindowStateListener {
public Java14Surface(Box root, boolean framed) {
super(root, true);
@@ -177,7 +178,7 @@
}
}
}
-
+*/
protected static class Java2DoubleBuffer extends AWTDoubleBuffer {
private static ColorModel cm =
Toolkit.getDefaultToolkit().getColorModel();
private static Hashtable emptyHashtable = new Hashtable();
Detecting JVM...
========================================================================
===
Log: Logging enabled at Fri Mar 21 17:21:48 GMT-08:00
2003
X11: X11 DISPLAY: :0.0
X11: X11 SHM: enabled
X11: X11 Visual: ff0000 ff00 ff bits: 8 visualid: 35
depth: 24
X11: red_max / red_mult: ff 10000
X11: green_max / green_mult: ff 100
X11: blue_max / blue_mult: ff 1
X11: base_pixel: 0
Platform: XWT build: unknown
Platform: XWT VM detection: vendor = Free Software
Foundation, Inc.
Platform: version = 3.3
Platform: os = Linux [version
2.4.20-ppc-r3]
Platform: platform = GCJ Linux Binary
Platform: class = org.xwt.plat.X11
Main: argument 0: xwt-widgets/
Main: argument 1: org.charlieg.demos.celldemo
Main: loading scar image
Resources: WARNING: ignoring xwar entry with invalid name:
META-INF/MANIFEST.MF
Main: loading xwar from local filesystem
Main: instantiating org.charlieg.demos.celldemo
Main: main thread blocking on new semaphore
XWT$12: retheming from xwt.standard to
org.xwt.themes.simple
ThreadMessage: caught throwable at thread entry point; this
should never happen
ThreadMessage: java.lang.NullPointerException
ThreadMessage: at _Jv_equalUtf8Consts(_Jv_Utf8Const,
_Jv_Utf8Const) (/home/corey/devel/xwt/gcc/src/libjava/prims.cc:147)
ThreadMessage: at org.xwt.Trap.perform(java.lang.Object[])
(/home/corey/devel/xwt/src/org/xwt/Trap.java:251)
ThreadMessage: at org.xwt.Box.put(java.lang.String,
org.mozilla.javascript.Scriptable, java.lang.Object, boolean,
org.xwt.Box$RootProxy) (/home/corey/devel/xwt/src/org/xwt/Box.java:1227)
ThreadMessage: at org.xwt.Template.apply(org.xwt.Box,
org.xwt.util.Vec, org.xwt.util.Vec, org.mozilla.javascript.Function,
int, int) (/home/corey/devel/xwt/src/org/xwt/Template.java:227)
ThreadMessage: at org.xwt.Template.apply(org.xwt.Box,
org.xwt.util.Vec, org.xwt.util.Vec, org.mozilla.javascript.Function,
int, int) (/home/corey/devel/xwt/src/org/xwt/Template.java:196)
ThreadMessage: at org.xwt.Template.apply(org.xwt.Box,
org.xwt.util.Vec, org.xwt.util.Vec, org.mozilla.javascript.Function,
int, int) (/home/corey/devel/xwt/src/org/xwt/Template.java:196)
ThreadMessage: at org.xwt.Box.Box(org.xwt.Template,
org.xwt.util.Vec, org.xwt.util.Vec, org.mozilla.javascript.Function,
int, int) (/home/corey/devel/xwt/src/org/xwt/Box.java:639)
ThreadMessage: at org.xwt.Template.apply(org.xwt.Box,
org.xwt.util.Vec, org.xwt.util.Vec, org.mozilla.javascript.Function,
int, int) (/home/corey/devel/xwt/src/org/xwt/Template.java:200)
ThreadMessage: at org.xwt.Box.Box(org.xwt.Template,
org.xwt.util.Vec, org.xwt.util.Vec, org.mozilla.javascript.Function,
int, int) (/home/corey/devel/xwt/src/org/xwt/Box.java:639)
ThreadMessage: at org.xwt.Template.apply(org.xwt.Box,
org.xwt.util.Vec, org.xwt.util.Vec, org.mozilla.javascript.Function,
int, int) (/home/corey/devel/xwt/src/org/xwt/Template.java:200)
ThreadMessage: at org.xwt.Box.Box(java.lang.String,
java.lang.String[], org.mozilla.javascript.Function)
(/home/corey/devel/xwt/src/org/xwt/Box.java:658)
ThreadMessage: at
org.xwt.Main$1.call(org.mozilla.javascript.Context,
org.mozilla.javascript.Scriptable, org.mozilla.javascript.Scriptable,
java.lang.Object[]) (/home/corey/devel/xwt/src/org/xwt/Main.java:122)
ThreadMessage: at org.xwt.ThreadMessage.run()
(/home/corey/devel/xwt/src/org/xwt/ThreadMessage.java:93)
ThreadMessage: at _Jv_ThreadRun(java.lang.Thread)
(/home/corey/devel/xwt/gcc/src/libjava/java/lang/natThread.cc:301)
ThreadMessage: at really_start
(/home/corey/devel/xwt/gcc/src/libjava/posix-threads.cc:377)
ThreadMessage: at GC_start_routine
(/home/corey/devel/xwt/gcc/src/boehm-gc/linux_threads.c:1380)
ThreadMessage: at pthread_start_thread (Unknown Source)
ThreadMessage: at clone (Unknown Source)
ThreadMessage: reaping thread
MessageQueue$Message: note: executing same background thread for 1s at
xwt.standard.widgets.group:6
MessageQueue$Message: note: executing same background thread for 2s at
xwt.standard.widgets.group:6
MessageQueue$Message: note: executing same background thread for 3s at
xwt.standard.widgets.group:6
MessageQueue$Message: note: executing same background thread for 4s at
xwt.standard.widgets.group:6
MessageQueue$Message: note: executing same background thread for 5s at
xwt.standard.widgets.group:6
MessageQueue$Message: note: executing same background thread for 6s at
xwt.standard.widgets.group:6
MessageQueue$Message: note: executing same background thread for 7s at
xwt.standard.widgets.group:6
MessageQueue$Message: note: executing same background thread for 8s at
xwt.standard.widgets.group:6
(cj: The preceeding message just repeats until I ^C the program.)
Corey
_______________________________________________
http://lists.xwt.org/listinfo/dev