<?xml version="1.0"?>
<rss version="2.0.">
  <channel>
    <title>Advogato blog for twisti</title>
    <link>http://www.advogato.org/person/twisti/</link>
    <description>Advogato blog for twisti</description>
    <language>en-us</language>
    <generator>mod_virgule</generator>
    <pubDate>Sat, 17 May 2008 17:22:17 GMT</pubDate>
    <item>
      <pubDate>Wed, 19 Mar 2008 15:28:02 GMT</pubDate>
      <title>19 Mar 2008</title>
      <link>http://www.advogato.org/person/twisti/diary.html?start=11</link>
      <guid>http://www.advogato.org/person/twisti/diary.html?start=11</guid>
      <description>&lt;b&gt;OpenJDK on ARM&lt;/b&gt;&#xD;
&#xD;
&lt;p&gt; &lt;p&gt;Today I pulled myself together and tried to build IcedTea&#xD;
for ARM again.  I had two options: to build it natively on&#xD;
an ARM board or try to cross-compile it.  I decided to try&#xD;
the cross-compile approach.&#xD;
&#xD;
&lt;p&gt; &lt;p&gt;The build did not fully finish, because I don't have ALSA&#xD;
libraries in my cross-build enviroment, so I just took an&#xD;
j2re-image from an x86_64 build and replaced&#xD;
&#xD;
&lt;p&gt; &lt;pre&gt;bin/java&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; &lt;p&gt;with the cross-compiled one and copied&#xD;
&#xD;
&lt;p&gt; &lt;pre&gt;openjdk/control/build/linux-arm/lib/arm/&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; &lt;p&gt;into the x86_64 j2re-image.&#xD;
&#xD;
&lt;p&gt; &lt;b&gt;And it works!!!&lt;/b&gt;&#xD;
&#xD;
&lt;p&gt; &lt;pre&gt;&#xD;
$ uname -m&#xD;
armv5tejl&#xD;
$ java -version&#xD;
java version "1.6.0"&#xD;
IcedTea Runtime Environment (build 1.6.0-b06)&#xD;
CACAO (build 0.98+svn, JIT mode)&#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; (btw. this output calls 10273 Java methods)&#xD;
&#xD;
&lt;p&gt; Now I'm testing applications like DaCapo and most&#xD;
benchmarks of DaCapo already pass in small size.</description>
    </item>
    <item>
      <pubDate>Thu, 17 Jan 2008 12:37:38 GMT</pubDate>
      <title>17 Jan 2008</title>
      <link>http://www.advogato.org/person/twisti/diary.html?start=10</link>
      <guid>http://www.advogato.org/person/twisti/diary.html?start=10</guid>
      <description>&lt;b&gt;IcedTea on Alpha&lt;/b&gt;&#xD;
&#xD;
&lt;p&gt; After some &lt;a href="http://mail.openjdk.java.net/pipermail/build-dev/2008-January/000697.html" &gt;problems&lt;/a&gt;&#xD;
with the architecture define in&#xD;
OpenJDK's build system, today I got the stuff built.  At&#xD;
least the ECJ-poured one:&#xD;
&#xD;
&lt;p&gt; &lt;pre&gt;&#xD;
$ uname -m&#xD;
alpha&#xD;
$ openjdk-ecj/build/linux-alpha/bin/java -version&#xD;
java version "1.7.0"&#xD;
IcedTea Runtime Environment (build 1.7.0-b24)&#xD;
CACAO (build 0.98+svn, JIT mode)&#xD;
$ openjdk-ecj/build/linux-alpha/bin/java -cp ~/cacao/ HelloWorld&#xD;
Hello World!&#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; Let's see if I get the whole stuff built...</description>
    </item>
    <item>
      <pubDate>Sun, 16 Sep 2007 15:01:20 GMT</pubDate>
      <title>16 Sep 2007</title>
      <link>http://www.advogato.org/person/twisti/diary.html?start=9</link>
      <guid>http://www.advogato.org/person/twisti/diary.html?start=9</guid>
      <description>&lt;b&gt;undefined reference to `__tls_get_addr'&lt;/b&gt;&#xD;
&#xD;
&lt;p&gt; I had some problems to get IcedTea compiled on our i386,&#xD;
x86_64 and powerpc64 boxes.  It turned out to be the &lt;tt&gt;-z&#xD;
def&lt;/tt&gt; linker option and the glibc version used.  A little&#xD;
google'ing revealed the fix.  Just add the AS_NEEDED&#xD;
directive as shown below:&#xD;
&#xD;
&lt;p&gt; &lt;pre&gt;&#xD;
$ cat /usr/lib64/libc.so &#xD;
/* GNU ld script&#xD;
   Use the shared library, but some functions are only in&#xD;
   the static library, so try that secondarily.  */&#xD;
OUTPUT_FORMAT(elf64-powerpc)&#xD;
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED (&#xD;
/lib/ld64.so.1 ) )&#xD;
&lt;/pre&gt;&#xD;
</description>
    </item>
    <item>
      <pubDate>Wed, 5 Sep 2007 12:08:07 GMT</pubDate>
      <title>5 Sep 2007</title>
      <link>http://www.advogato.org/person/twisti/diary.html?start=8</link>
      <guid>http://www.advogato.org/person/twisti/diary.html?start=8</guid>
      <description>&lt;b&gt;HotSpot's verifier no verifying&lt;/b&gt;&#xD;
&#xD;
&lt;p&gt; Yesterday I found the problem why we get a VerifyError when&#xD;
running Eclipse with CACAO-OpenJDK, while HotSpot does not.&#xD;
 It's again the &lt;tt&gt;MagicAccessorImpl&lt;/tt&gt; class.&#xD;
&#xD;
&lt;p&gt; Snippet from &lt;tt&gt;sun/reflect/MagicAccessorImpl.java&lt;/tt&gt; (I&#xD;
overlooked that when debugging the access-check bug):&#xD;
&#xD;
&lt;p&gt; &lt;pre&gt;&#xD;
    The bug fix for 4486457 also necessitated disabling&#xD;
    verification for this class and all subclasses, as&#xD;
opposed to just&#xD;
    SerializationConstructorAccessorImpl and subclasses, to&#xD;
avoid&#xD;
    having to indicate to the VM which of these&#xD;
dynamically-generated&#xD;
    stub classes were known to be able to pass the verifier. &#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; Finding these magics is really a pain...</description>
    </item>
    <item>
      <pubDate>Wed, 29 Aug 2007 21:39:12 GMT</pubDate>
      <title>29 Aug 2007</title>
      <link>http://www.advogato.org/person/twisti/diary.html?start=7</link>
      <guid>http://www.advogato.org/person/twisti/diary.html?start=7</guid>
      <description>&lt;b&gt;IcedTea completely built and running on PowerPC&lt;/b&gt;&#xD;
&#xD;
&lt;p&gt; Today I finally made it to build a complete j2sdk-image on&#xD;
powerpc.  As IcedTea has support for FreeType, I could run&#xD;
my first GUI application:&#xD;
&#xD;
&lt;p&gt; &lt;a&#xD;
href="http://www.complang.tuwien.ac.at/cacaojvm/screenshots/frozenbubble-0.9.5-powerpc-linux-icedtea.png"&gt;&lt;img&#xD;
src="http://www.complang.tuwien.ac.at/cacaojvm/screenshots/frozenbubble-0.9.5-powerpc-linux-icedtea.png"&#xD;
width="640" height="480"&gt;&lt;/a&gt;&#xD;
&#xD;
&lt;p&gt; This is soooo cool and exciting, I hope I can sleep now :-)</description>
    </item>
    <item>
      <pubDate>Sun, 19 Aug 2007 16:08:25 GMT</pubDate>
      <title>19 Aug 2007</title>
      <link>http://www.advogato.org/person/twisti/diary.html?start=6</link>
      <guid>http://www.advogato.org/person/twisti/diary.html?start=6</guid>
      <description>&lt;b&gt;OpenJDK on s390&lt;/b&gt;&#xD;
&#xD;
&lt;p&gt; Peter Molnar got &lt;a href="http://peter.wm.sk/p/" &gt;OpenJDK&#xD;
running on s390&lt;/a&gt;.  This is exciting :-)</description>
    </item>
    <item>
      <pubDate>Mon, 30 Jul 2007 11:15:04 GMT</pubDate>
      <title>30 Jul 2007</title>
      <link>http://www.advogato.org/person/twisti/diary.html?start=5</link>
      <guid>http://www.advogato.org/person/twisti/diary.html?start=5</guid>
      <description>&lt;b&gt;OpenJDK: Eclipse&lt;/b&gt;&#xD;
&#xD;
&lt;p&gt; No comment.&#xD;
&#xD;
&lt;p&gt; &lt;a&#xD;
href="http://www.complang.tuwien.ac.at/cacaojvm/screenshots/eclipse-3.3-powerpc-linux-openjdk.png"&gt;&lt;img&#xD;
src="http://www.complang.tuwien.ac.at/cacaojvm/screenshots/eclipse-3.3-powerpc-linux-openjdk.png"&#xD;
 width="640"&gt;&lt;/a&gt;</description>
    </item>
    <item>
      <pubDate>Sun, 29 Jul 2007 21:20:41 GMT</pubDate>
      <title>29 Jul 2007</title>
      <link>http://www.advogato.org/person/twisti/diary.html?start=4</link>
      <guid>http://www.advogato.org/person/twisti/diary.html?start=4</guid>
      <description>&lt;b&gt;OpenJDK: Getting closer to a full build&lt;/b&gt;&#xD;
&#xD;
&lt;p&gt; On friday I found the bug why Boehm always crashed with&#xD;
OpenJDK's wrappers.  The problem is that the wrappers create&#xD;
a thread which then runs the VM.  Boehm doesn't like that. &#xD;
But it can simply be removed:&#xD;
&#xD;
&lt;p&gt; &lt;pre&gt;&#xD;
Index: j2se/src/share/bin/java.c&#xD;
===================================================================&#xD;
--- j2se/src/share/bin/java.c   (revision 244)&#xD;
+++ j2se/src/share/bin/java.c   (working copy)&#xD;
@@ -367,7 +367,8 @@ main(int argc, char ** argv)&#xD;
       args.classname = classname;&#xD;
       args.ifn = ifn;&#xD;
 &#xD;
-      return ContinueInNewThread(JavaMain, threadStackSize,&#xD;
(void*)&amp;amp;args, ret);&#xD;
+/*       return ContinueInNewThread(JavaMain,&#xD;
threadStackSize, (void*)&amp;amp;args, ret); */&#xD;
+      return JavaMain((void*)&amp;amp;args);&#xD;
     }&#xD;
 }&#xD;
 &#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; With that patch we can use OpenJDK's wrappers with CACAO's&#xD;
libjvm:&#xD;
&#xD;
&lt;p&gt; &lt;pre&gt;&#xD;
$ java -version&#xD;
LOG: [0x30021b70] JVM_GetStackAccessControlContext:&#xD;
IMPLEMENT ME!&#xD;
LOG: [0x30021b70] JVM_GetStackAccessControlContext:&#xD;
IMPLEMENT ME!&#xD;
LOG: [0x30021b70] JVM_FindSignal: name=HUP&#xD;
LOG: [0x30021b70] JVM_RegisterSignal: sig=0, handler=0x2,&#xD;
IMPLEMENT ME!&#xD;
LOG: [0x30021b70] JVM_FindSignal: name=INT&#xD;
LOG: [0x30021b70] JVM_RegisterSignal: sig=0, handler=0x2,&#xD;
IMPLEMENT ME!&#xD;
LOG: [0x30021b70] JVM_FindSignal: name=TERM&#xD;
LOG: [0x30021b70] JVM_RegisterSignal: sig=0, handler=0x2,&#xD;
IMPLEMENT ME!&#xD;
LOG: [0x30021b70] JVM_GetStackAccessControlContext:&#xD;
IMPLEMENT ME!&#xD;
LOG: [0x30021b70] JVM_GetStackAccessControlContext:&#xD;
IMPLEMENT ME!&#xD;
openjdk version "1.7.0-internal-fastdebug"&#xD;
OpenJDK Runtime Environment (build&#xD;
1.7.0-internal-fastdebug-twisti_29_jul_2007_18_33-b00)&#xD;
CACAO (build 0.98+svn, JIT mode)&#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; WOOHOO! :-)&#xD;
&#xD;
&lt;p&gt; That means we can build OpenJDK with its own tools, by&#xD;
providing a CACAO-Sun build to OpenJDK with&#xD;
ALT_HOTSPOT_IMPORT_PATH. Then CACAO's libjvm gets imported&#xD;
and all tools like &lt;tt&gt;javac&lt;/tt&gt;, &lt;tt&gt;javah&lt;/tt&gt; or&#xD;
&lt;tt&gt;rmic&lt;/tt&gt; are called from the currently builing OpenJDK.&#xD;
&#xD;
&lt;p&gt; With some small &lt;a&#xD;
href="https://c1.complang.tuwien.ac.at/cacaowiki/OpenJDK"&gt;patches&#xD;
&lt;/a&gt; and the help of &lt;a&#xD;
href="http://icedtea.classpath.org/wiki/"&gt;IcedTea&lt;/a&gt; I get a&#xD;
fully compiled and working j2re-image on my powerpc-linux box!!!&#xD;
&#xD;
&lt;p&gt; That is _really_ cool!&#xD;
&#xD;
&lt;p&gt; j2sdk-image is currently failing because of missing&#xD;
annotations support.  But the student working on CACAO's&#xD;
annotations support already has a working implementation for&#xD;
OpenJDK and it will be (hopefully) commited tomorrow. That&#xD;
probably means a new blog soon...</description>
    </item>
    <item>
      <pubDate>Wed, 27 Jun 2007 21:33:14 GMT</pubDate>
      <title>27 Jun 2007</title>
      <link>http://www.advogato.org/person/twisti/diary.html?start=3</link>
      <guid>http://www.advogato.org/person/twisti/diary.html?start=3</guid>
      <description>&lt;b&gt;Wanna Eclipse on s390?&lt;/b&gt;&#xD;
&#xD;
&lt;p&gt; Peter Molnar, a student of the Vienna University of&#xD;
Technology who is doing his thesis on CACAO, did the&#xD;
undoable.  But see for &lt;a&#xD;
href="http://peter.wm.sk/p/"&gt;yourself&lt;/a&gt;.</description>
    </item>
    <item>
      <pubDate>Fri, 22 Jun 2007 11:32:01 GMT</pubDate>
      <title>22 Jun 2007</title>
      <link>http://www.advogato.org/person/twisti/diary.html?start=2</link>
      <guid>http://www.advogato.org/person/twisti/diary.html?start=2</guid>
      <description>&lt;b&gt;Portable OpenJDK&lt;/b&gt;&#xD;
&#xD;
&lt;p&gt; Here is another output of the prop testcase:&#xD;
&#xD;
&lt;p&gt; &lt;pre&gt;&#xD;
$ cacao prop&#xD;
LOG: [0x30020bd0] JVM_GetStackAccessControlContext:&#xD;
IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x1008a0f0, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x1008aa50, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x1008cc30, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x1008c690, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x10094d20, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x10094a50, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x1008aa50, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x10094870, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x100944b0, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x100942d0, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x10046690, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_FindSignal: name=HUP&#xD;
LOG: [0x30020bd0] JVM_RegisterSignal: sig=0, handler=0x2,&#xD;
IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_FindSignal: name=INT&#xD;
LOG: [0x30020bd0] JVM_RegisterSignal: sig=0, handler=0x2,&#xD;
IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_FindSignal: name=TERM&#xD;
LOG: [0x30020bd0] JVM_RegisterSignal: sig=0, handler=0x2,&#xD;
IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x100aaa50, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_GetStackAccessControlContext:&#xD;
IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x100acf00, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x100ad4b0, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x100ad3c0, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x100b03c0, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_GetStackAccessControlContext:&#xD;
IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x100baa50, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x100baa50, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x100ba3c0, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x100ba0f0, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x100cc960, IMPLEMENT ME!&#xD;
LOG: [0x30020bd0] JVM_DesiredAssertionStatus:&#xD;
cls=0x100d0c30, IMPLEMENT ME!&#xD;
#all properties:&#xD;
#Fri Jun 22 12:30:16 GMT+01:00 2007&#xD;
java.runtime.name=OpenJDK Runtime Environment&#xD;
sun.boot.library.path=/home/twisti/cacao/sun/openjdk/jdk/control/build/linux-ppc-fastdebug/lib/ppc/&#xD;
java.vm.version=0.98+svn&#xD;
java.vm.vendor=CACAO Team&#xD;
java.vendor.url=http\://java.sun.com/&#xD;
path.separator=\:&#xD;
java.vm.name=CACAO&#xD;
file.encoding.pkg=sun.io&#xD;
user.country=US&#xD;
sun.os.patch.level=unknown&#xD;
java.vm.specification.name=Java Virtual Machine Specification&#xD;
user.dir=/home/twisti/cacao/cacao-sun/tests&#xD;
java.runtime.version=1.7.0-internal-fastdebug-twisti_21_jun_2007_21_30-b00&#xD;
java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment&#xD;
os.arch=ppc&#xD;
java.io.tmpdir=/tmp&#xD;
line.separator=\n&#xD;
java.vm.specification.vendor=Sun Microsystems Inc.&#xD;
os.name=Linux&#xD;
sun.jnu.encoding=ANSI_X3.4-1968&#xD;
java.specification.name=Java Platform API Specification&#xD;
java.class.version=50.0&#xD;
os.version=2.6.18-4-powerpc&#xD;
user.home=/home/twisti&#xD;
user.timezone=GMT+01\:00&#xD;
java.awt.printerjob=sun.print.PSPrinterJob&#xD;
file.encoding=ANSI_X3.4-1968&#xD;
java.specification.version=1.7&#xD;
java.class.path=.&#xD;
user.name=twisti&#xD;
java.vm.specification.version=1.0&#xD;
sun.arch.data.model=32&#xD;
java.home=/home/twisti/tmp/cacao-sun/jre&#xD;
user.language=en&#xD;
java.specification.vendor=Sun Microsystems Inc.&#xD;
java.version=1.7.0-internal-fastdebug&#xD;
sun.boot.class.path=/home/twisti/cacao/sun/openjdk/jdk/control/build/linux-ppc-fastdebug/classes/&#xD;
java.boot.class.path=/home/twisti/cacao/sun/openjdk/jdk/control/build/linux-ppc-fastdebug/classes/&#xD;
java.vendor=Sun Microsystems Inc.&#xD;
file.separator=/&#xD;
java.vendor.url.bug=http\://java.sun.com/cgi-bin/bugreport.cgi&#xD;
sun.io.unicode.encoding=UnicodeBig&#xD;
sun.cpu.endian=big&#xD;
sun.desktop=gnome&#xD;
sun.cpu.isalist=&#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt; For those who are saying now: "Hey!  That's the same output&#xD;
as the last one with the same unimplemented functions!",&#xD;
look at the output again! (hint: &lt;tt&gt;os.arch&lt;/tt&gt;!!!).&#xD;
&#xD;
&lt;p&gt; I built the OpenJDK completely with CACAO and free GNU&#xD;
Classpath tools.  But the build is not complete, there is&#xD;
still some stuff missing and I need to figure out why it&#xD;
does not work.  But it's enough to run a bunch of programs&#xD;
on Java 1.7 on PowerPC (and maybe other architectures, will&#xD;
try that) :-)&#xD;
&#xD;
&lt;p&gt; I will write down more detailed information about how to&#xD;
build this whole thing &lt;a&#xD;
href="https://c1.complang.tuwien.ac.at/cacaowiki/OpenJDK"&gt;here&lt;/a&gt;.</description>
    </item>
  </channel>
</rss>
