Apache OpenOffice (AOO) Bugzilla – Issue 50599
Building with gcc-4.0 and gcj for linux sparc
Last modified: 2006-02-23 22:14:08 UTC
This is for tracking linux sparc port building with gcj and gcc-4.0. Building with debian unstable. Configure requires javadoc which is not available on debian? For a workaround I set $JAVADOC as path to my blackdown j2sdk-1.4.1
set target
I will abandon this for now, as ant does not work for me with gcj and I do not have time. I notice the ant manual states ant cannot be build with gcj.
Created attachment 27628 [details] GNU linux sparc detects GNU kind of java
Now I have got ant working based on patches from rene, building with (a) gcc-4.0, gcj-4.0 and java-gcj-compat from debian unstable, (b) ant from http://ant.apache.org/ Something is working as I have already built in m120 beanshell, berkeleydb, hsqldb
Created attachment 28161 [details] using ant with gcj for sparc GNU/Linux
Created attachment 28229 [details] build m120 with gcc4/gcj
For m120 patches thanks to rene for ant patches, sb for bridges, the others are mostly from issues filed by cmc. Everything is built with debian unstable gcc-4.0, gcj-4.0, gij-4.0 except I had to use blackdown j2sdk to build qadevOOo and to complete pre registered services in the installer. mozab would not build anyway. There is an upstream issue building libxml2 with gcc4, so i used system libxml2. mozilla builds Ok with one patch. Other issues related are: Issue 52439 mozilla Issue 52387 bus errors Issue 51724 testtools Issue 51545 bridges Issue 50821 libxml2 Issue 46585 import sun
qadevOOo fails to build. This is the command: /usr/bin/gij-4.0 -Dgnu.gcj.precompiled.db.path=/home/jim/ooo680/solver/680/unxlngs.pro/lib/openoffice.org.gcjdb --classpath .:./unxlngs.pro/class::/home/jim/ooo680/external/common/apache-ant-1.6.1/lib/xercesImpl.jar:/home/jim/ooo680/external/common/apache-ant-1.6.1/lib/xml-apis.jar:/home/jim/ooo680/external/common/apache-ant-1.6.1/lib/ant.jar:/lib/tools.jar:/usr/share/ant/lib/ant-launcher.jar:/usr/share/ant/lib/ant.jar -Dant.home=/usr/share/ant org.apache.tools.ant.Main -Dbuild.compiler=gcj -Dprj=. -Dprjname=OOoRunner -Ddebug=off -Doptimize=on -Dtarget=qadevOOo -Dsolar.update=on -Dout=./unxlngs.pro -Dinpath=unxlngs.pro -Dproext=".pro" -Dsolar.bin=/home/jim/ooo680/solver/680/unxlngs.pro/bin -Dsolar.jar=/home/jim/ooo680/solver/680/unxlngs.pro/bin -Dsolar.doc=/home/jim/ooo680/solver/680/unxlngs.pro/doc -Dcommon.jar=/home/jim/ooo680/solver/680/common.pro/bin -Dcommon.doc=/home/jim/ooo680/solver/680/common.pro/doc -f build.xml -emacs But this command made by hand will allow the runner to build there: jim@sun:~/ooo680/qadevOOo$ /usr/bin/gij-4.0 -classpath .:./unxlngs.pro/class:.:/home/jim/ooo680/external/common/apache-ant-1.6.1/lib/xercesImpl.jar:/home/jim/ooo680/external/common/apache-ant-1.6.1/lib/xml-apis.jar:/home/jim/ooo680/external/common/apache-ant-1.6.1/lib/ant.jar:/usr/lib/tools.jar:/usr/share/ant/lib/ant-launcher.jar:/usr/share/ant/lib/ant.jar -Dbuild.compiler=gcj -Dant.home=/usr/share/ant org.apache.tools.ant.Main -Dprj=. -Dprjname=OOoRunner -Ddebug=off -Doptimize=on -Dtarget=qadevOOo -Dsolar.update=on -Dout=./unxlngs.pro -Dinpath=unxlngs.pro -Dproext=".pro" -Dsolar.bin=/home/jim/ooo680/solver/680/unxlngs.pro/bin -Dsolar.jar=/home/jim/ooo680/solver/680/unxlngs.pro/bin -Dsolar.doc=/home/jim/ooo680/solver/680/unxlngs.pro/doc -Dcommon.jar=/home/jim/ooo680/solver/680/common.pro/bin -Dcommon.doc=/home/jim/ooo680/solver/680/common.pro/doc -f build.xml -emacs This is only proof of concept. More research is needed to see why the build environment works with other ant projects but not this one. Is it only the precompiled stuff? Why does it hurt only here?
/home/jim/ooo680/qadevOOo/tests/java/ifc/ucb/_XSimpleFileAccess.java:405: warning: The method 'getYear'in class 'java.util.Date' has been deprecated. log.println("Expected: "+lastMod.getYear()); ^ gcj: Internal error: Killed (program jc1) Please submit a full bug report. See <URL:http://gcc.gnu.org/bugs.html> for instructions. For Debian GNU/Linux specific bug reporting instructions, see <URL:file:///usr/share/doc/gcc-4.0/README.Bugs>. BUILD FAILED /home/jim/ooo680/qadevOOo/build.xml:34: Compile failed; see the compiler error output for details. Total time: 54 minutes 57 seconds <snip> But no error output is found, yet.
Building the tests in qadevOOo with gcj4/gij4 will fill my swap space (500mb) and then the compiler will crash, so the attached patch will avoid building those tests. This is not a solution, but it saves me some time now.
Created attachment 28459 [details] Prevent building tests in qadevOOo
To build qadevOOo complete unpatched, I addded another 500mb swap space. Total memory is 256mb ram + 1024mb swap. Now qadevOOo can build, with 250mb swap to spare. Total memory required to build qadevOOo is about 1gb. Still need 2 steps, first build, then submit the gij command by hand.
All built OK now with apacahe-ant.1.6.5 and debian/unstable gcc-4.0/gcj-4.0, but there are errors building the installer in pregistering components, which have been ignored for the upload version openoffice.org1.9.122. Using SRC680_m123 with patches attached.
Created attachment 28940 [details] building with gcc4.0/gcj4.0
Created attachment 29369 [details] All modules OOo upstream build with gcc4.0/gcj4.0
Created attachment 29622 [details] patches for building GNU/Linux sparc m129 with gcc4/gcj4
m129 was built with latest gcc4.0.2 prerelease from cvs sources and using export JAVADOC=/usr/local/bin/gjdoc ./configure --disable-mozilla --with-system-libxml --with-jdk-home=/usr/local --with-java=gij also ant is /usr/local/apache-ant-1.6.5 Although building on debian, I use my own versions in /usr/local for ant, gjdoc and gcc so I can better see what is happening.
Building m130 on GNU/linux sparc gcj/gc4 ant is in /usr/local/apache-ant-1.6.5 gjdoc is in /usr/local/bin/gjdoc there is no java, especially no /usr/bin/java gcc,gij etc is in /usr/local/bin/gcc etc to build gcc/gcj jim@sun:~/gcc/build$ ../configure --prefix=/usr/local --enable-java-awt=gtk,xlib not using package specific workarounds such as java-gcj-compat the following is required: export JAVADOC=/usr/local/bin/gjdoc export JAVA=/usr/local/bin/gij to configure OOo ./configure --with-system-libxml \ --with-java=gij \ --with-jdk-home=/usr/local \ --disable-mozilla the CACHEJAR (see patches) requires > 700m RAM+swap to build qadevOOo
thanks to florian and issue 54462 the mozilla dres book is working in m130 built with gcc4/gcj. screenshot attached.
Created attachment 29874 [details] mozilla addressbook m130 gcc4/gcj
Created attachment 29875 [details] m130 patches incl mozilla build 130a
Created attachment 30465 [details] m133 patches to build GNU/LinuxSparc with gcc4/gcj
Created attachment 30754 [details] To build GNU Linux Sparc with gcc4/gcj4
mozilla is ok now so no need to --disable-mozilla to configure OOo with the attached patches ./configure --with-system-libxml \ --with-java=gij \ --with-jdk-home=/usr/local
Created attachment 31364 [details] m138 patches to build GNU/LinuxSparc with gcj/gij
Created attachment 31829 [details] build GNU/Linux Sparc SRC680_m142 with gcc4.0/gcj
Created attachment 32917 [details] Build m147 GNU/Linux Sparc with gcc-4.0.2/gcj
Created attachment 33841 [details] gcc4.0/gcj patches for m154 - see wiki for issue numbers
A build guide for gcc4/gcj is now maintained on the wiki find the link here: http://wiki.services.openoffice.org/wiki/Building#Vanilla_Up-stream_builds
.