Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 29998 - patch to compile openoffice 1.0.3 with gcc 3.3.1
Summary: patch to compile openoffice 1.0.3 with gcc 3.3.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-30 07:24 UTC by Joseph Nievelt
Modified: 2003-12-07 17:04 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Here is the list of changes (changes,3.25 KB, text/plain)
2003-09-30 07:27 UTC, Joseph Nievelt
Details
The modified ebuild used (openoffice-1.0.3-r1-new.ebuild,21.45 KB, text/plain)
2003-09-30 07:28 UTC, Joseph Nievelt
Details
Here is the actual patch (ooo-gcc3.3.1.diff,88.35 KB, patch)
2003-09-30 07:29 UTC, Joseph Nievelt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Nievelt 2003-09-30 07:24:11 UTC
I haven't had too many problems with gcc 3.3.1 (certainly no stability issues),
but I really needed to recompile ooo, so here's the patch I made/used to do it.

NOTE:  This patch has not been tested for stability even by myself.  All I know
is that it compiles, and oowriter runs to a degree.  It may not even completely
work for you.  I'm submitting it here in hopes that others can look at it and
make a real patch.

How to apply (assuming gcc 3.3.1 installed):
% mv openoffice-1.0.3-r1-new.ebuild
/usr/portage/app-office/openoffice/openoffice-1.0.3-r1.ebuild
% ebuild /usr/portage/app-office/openoffice/openoffice-1.0.3-r1.ebuild unpack
% mv ooo-gcc3.3.1.diff /var/tmp/portage/openoffice-1.0.3-r1
% patch -p0 -i ooo-gcc3.3.1.diff
% ebuild /usr/portage/app-office/openoffice/openoffice-1.0.3-r1.ebuild compile
% ebuild /usr/portage/app-office/openoffice/openoffice-1.0.3-r1.ebuild install
% ebuild /usr/portage/app-office/openoffice/openoffice-1.0.3-r1.ebuild qmerge

What got changed:
All of the changes are in the attached file 'changes'.  Most of them fall into
one of two categories:
1. Using ## improperly.  gcc 3.3 will error if it finds something like A##.b or
A##::b or A##, or A##) etc.  The pasting must yield a valid token.  The cases
like this I just removed the ##.
2. Invalid cast to non-const reference.  When a value is returned from a
function, and if it was a temporary value return (I think), gcc will error.  In
most cases I simply did an explicit cast to reference.

Some of the #2 changes I'm not so sure about, and I don't have a lot of
confidence in the other changes this patch makes, so if anyone knows the code
well enough, please fix it :).

What didn't get changed:
Of course my compiler only included things from certain #if directives.  Someone
else who has the right macros defined differently may find more errors of type 1
and 2 above, or possibly new ones all together.  That is, I made the minimal set
of fixes to make ooo compile on my gentoo installation.

Reproducible: Always
Steps to Reproduce:





Portage 2.0.49-r7 (default-x86-1.4, gcc-3.3.1, glibc-2.3.2-r1, 2.6.0-test5-mm4)
=================================================================
System uname: 2.6.0-test5-mm4 i686 AMD Athlon(tm) XP
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox ccache autoaddcvs"
GENTOO_MIRRORS="http://lug.mtu.edu/gentoo/
ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/
ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://gentoo.oregonstate.edu
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="apm cups encode foomaticdb libg++ mad mikmod quicktime spell xv gtkhtml
gdbm berkdb tetex bonobo svga guile tcpd pam imlib gtk motif X kde -gnome
-gnome2 -slang 3dnow -sse2 nls aalib arts avi cdr crypt dvd esd gif gpm icc java
jpeg ldap libwww memlimit mmx mozilla mpeg mpi ncurses oav oggvorbis opengl oss
pdflib perl png python qt readline samba sdl sse ssl truetype usb xml xml2 xmms
zlib x86 ~x86 alsa tcltk"
Comment 1 Joseph Nievelt 2003-09-30 07:27:33 UTC
Created attachment 18533 [details]
Here is the list of changes
Comment 2 Joseph Nievelt 2003-09-30 07:28:17 UTC
Created attachment 18534 [details]
The modified ebuild used
Comment 3 Joseph Nievelt 2003-09-30 07:29:04 UTC
Created attachment 18535 [details, diff]
Here is the actual patch
Comment 4 Joseph Nievelt 2003-09-30 07:34:12 UTC
Forgot to comment: the ebuild is changed only as specified in the changes
file.  you can do a diff before overwriting (or maybe not overwriting) to
verify this.
Comment 5 Paul de Vrieze (RETIRED) gentoo-dev 2003-10-02 04:54:14 UTC
Ok, I will keep this bug open for some time. As you might know openoffice
1.1 is released, and I will be making an ebuild for it available shortly.
If there are more people that can testify on the stability of the patch I
will put it in portage. However I think that you will be happy running 1.1.0
as it is really a lot snappier.
Comment 6 Simon Cooper 2003-10-04 02:46:27 UTC
the patch doesnt work on 1.1 final.
Comment 7 Joseph Nievelt 2003-10-04 03:51:55 UTC
I believe the only file that needs to be changed for 1.1 final is  tools/source/solar/solar.c.
 I still get a segfault on this, and I'm not sure why.  The rest of the changes
seem to be taken care of.  If anyone knows the proper fix I think it will
work with 3.3.1 (although I'm not sure).
Comment 8 Paul de Vrieze (RETIRED) gentoo-dev 2003-10-04 04:30:43 UTC
It should compile without patches on gcc-3.3.1-r3. At least I compiled it
with this gcc. The 1.0.3 patch should not work with 1.1. There are substantial
code changes
Comment 9 Joseph Nievelt 2003-10-04 10:27:25 UTC
I commented out the line that gets me that segfault (testing for writing
to NULL) and it seems to work just fine (I've compiled and installed.  I'm
not sure what should be done with this, though.
Comment 10 Don Seiler (RETIRED) gentoo-dev 2003-10-13 09:03:54 UTC
When will openoffice-1.1.0 be supported for gcc-3.3.1-r4?
Comment 11 Paul de Vrieze (RETIRED) gentoo-dev 2003-10-13 11:12:47 UTC
openoffice-1.1.0 should just compile with gcc-3.3.1-r4
Comment 12 Martin Holzer (RETIRED) gentoo-dev 2003-12-07 17:04:30 UTC
closing with stable OO 1.0.0