Issue 50599 - Building with gcc-4.0 and gcj for linux sparc
Summary: Building with gcc-4.0 and gcj for linux sparc
Status: CLOSED IRREPRODUCIBLE
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: current
Hardware: Sun Linux, all
: P3 Trivial (vote)
Target Milestone: DevTools
Assignee: sparcmoz
QA Contact: sparcmoz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-11 04:36 UTC by sparcmoz
Modified: 2006-02-23 22:14 UTC (History)
1 user (show)

See Also:
Issue Type: TASK
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
GNU linux sparc detects GNU kind of java (140.97 KB, image/png)
2005-07-01 14:39 UTC, sparcmoz
no flags Details
using ant with gcj for sparc GNU/Linux (5.43 KB, patch)
2005-07-23 11:24 UTC, sparcmoz
no flags Details | Diff
build m120 with gcc4/gcj (24.84 KB, patch)
2005-07-26 13:01 UTC, sparcmoz
no flags Details | Diff
Prevent building tests in qadevOOo (1.11 KB, patch)
2005-08-03 14:19 UTC, sparcmoz
no flags Details | Diff
building with gcc4.0/gcj4.0 (23.34 KB, patch)
2005-08-20 08:18 UTC, sparcmoz
no flags Details | Diff
All modules OOo upstream build with gcc4.0/gcj4.0 (16.69 KB, patch)
2005-09-07 14:12 UTC, sparcmoz
no flags Details | Diff
patches for building GNU/Linux sparc m129 with gcc4/gcj4 (15.75 KB, patch)
2005-09-17 14:30 UTC, sparcmoz
no flags Details | Diff
mozilla addressbook m130 gcc4/gcj (88.18 KB, image/png)
2005-09-24 23:15 UTC, sparcmoz
no flags Details
m130 patches incl mozilla build 130a (16.42 KB, patch)
2005-09-24 23:22 UTC, sparcmoz
no flags Details | Diff
m133 patches to build GNU/LinuxSparc with gcc4/gcj (20.24 KB, patch)
2005-10-14 22:46 UTC, sparcmoz
no flags Details | Diff
To build GNU Linux Sparc with gcc4/gcj4 (20.68 KB, patch)
2005-10-23 21:59 UTC, sparcmoz
no flags Details | Diff
m138 patches to build GNU/LinuxSparc with gcj/gij (18.21 KB, patch)
2005-11-11 10:51 UTC, sparcmoz
no flags Details | Diff
build GNU/Linux Sparc SRC680_m142 with gcc4.0/gcj (23.62 KB, patch)
2005-11-27 08:07 UTC, sparcmoz
no flags Details | Diff
Build m147 GNU/Linux Sparc with gcc-4.0.2/gcj (19.03 KB, patch)
2006-01-05 08:03 UTC, sparcmoz
no flags Details | Diff
gcc4.0/gcj patches for m154 - see wiki for issue numbers (21.23 KB, patch)
2006-02-04 05:49 UTC, sparcmoz
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description sparcmoz 2005-06-11 04:36:52 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
Comment 1 sparcmoz 2005-06-11 04:37:51 UTC
set target
Comment 2 sparcmoz 2005-06-23 11:31:05 UTC
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.
 
Comment 3 sparcmoz 2005-07-01 14:39:09 UTC
Created attachment 27628 [details]
GNU linux sparc detects GNU kind of java
Comment 4 sparcmoz 2005-07-23 09:59:16 UTC
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
Comment 5 sparcmoz 2005-07-23 11:24:35 UTC
Created attachment 28161 [details]
using ant with gcj for sparc GNU/Linux
Comment 6 sparcmoz 2005-07-26 13:01:01 UTC
Created attachment 28229 [details]
build m120 with gcc4/gcj
Comment 7 sparcmoz 2005-07-26 13:13:27 UTC
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 
Comment 8 sparcmoz 2005-08-02 15:48:11 UTC
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?
Comment 9 sparcmoz 2005-08-02 22:28:35 UTC
/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.
Comment 10 sparcmoz 2005-08-03 14:12:10 UTC
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.
Comment 11 sparcmoz 2005-08-03 14:19:34 UTC
Created attachment 28459 [details]
Prevent building tests in qadevOOo
Comment 12 sparcmoz 2005-08-03 22:55:58 UTC
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.
Comment 13 sparcmoz 2005-08-20 08:11:22 UTC
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.
Comment 14 sparcmoz 2005-08-20 08:18:53 UTC
Created attachment 28940 [details]
building with gcc4.0/gcj4.0
Comment 15 sparcmoz 2005-09-07 14:12:58 UTC
Created attachment 29369 [details]
All modules OOo upstream build with gcc4.0/gcj4.0
Comment 16 sparcmoz 2005-09-17 14:30:52 UTC
Created attachment 29622 [details]
patches for building GNU/Linux sparc m129 with gcc4/gcj4
Comment 17 sparcmoz 2005-09-17 14:38:25 UTC
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.
Comment 18 sparcmoz 2005-09-21 22:21:03 UTC
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

Comment 19 sparcmoz 2005-09-24 22:11:43 UTC
thanks to florian and issue 54462 the mozilla dres book is working in m130 built
with gcc4/gcj. screenshot attached.
Comment 20 sparcmoz 2005-09-24 23:15:50 UTC
Created attachment 29874 [details]
mozilla addressbook m130 gcc4/gcj
Comment 21 sparcmoz 2005-09-24 23:22:16 UTC
Created attachment 29875 [details]
m130 patches incl mozilla build 130a
Comment 22 sparcmoz 2005-10-14 22:46:55 UTC
Created attachment 30465 [details]
m133 patches to build GNU/LinuxSparc with gcc4/gcj
Comment 23 sparcmoz 2005-10-23 21:59:58 UTC
Created attachment 30754 [details]
To build GNU Linux Sparc with gcc4/gcj4
Comment 24 sparcmoz 2005-10-23 22:04:17 UTC
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
Comment 25 sparcmoz 2005-11-11 10:51:42 UTC
Created attachment 31364 [details]
m138 patches to build GNU/LinuxSparc with gcj/gij
Comment 26 sparcmoz 2005-11-27 08:07:22 UTC
Created attachment 31829 [details]
build GNU/Linux Sparc SRC680_m142 with gcc4.0/gcj
Comment 27 sparcmoz 2006-01-05 08:03:06 UTC
Created attachment 32917 [details]
Build m147 GNU/Linux Sparc with gcc-4.0.2/gcj
Comment 28 sparcmoz 2006-02-04 05:49:25 UTC
Created attachment 33841 [details]
gcc4.0/gcj patches for m154 - see wiki for issue numbers
Comment 29 sparcmoz 2006-02-23 22:13:48 UTC
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
Comment 30 sparcmoz 2006-02-23 22:14:08 UTC
.