Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 124660 - openoffice does not build with gcc-4.1
Summary: openoffice does not build with gcc-4.1
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Office Team
: 124932 125250 (view as bug list)
Depends on:
Reported: 2006-03-02 09:57 UTC by Sebastian Bergmann (RETIRED)
Modified: 2006-04-04 07:55 UTC (History)
8 users (show)

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

pyuno-gcc345.log (pyuno-gcc345.log,64.00 KB, text/plain)
2006-03-02 13:11 UTC, Sebastian Bergmann (RETIRED)
pyuno-gcc410.log (pyuno-gcc410.log,60.04 KB, text/plain)
2006-03-02 21:44 UTC, Sebastian Bergmann (RETIRED)
Hack to disable pyuno stuff to workaround segfault. (disable-python-uno-bridge.diff,5.83 KB, patch)
2006-03-20 09:30 UTC, Hanno Zysik (geki)
Details | Diff
Diff to ${S}/patches/src680/apply file. (disable-pyuno-apply.diff,304 bytes, patch)
2006-03-20 09:31 UTC, Hanno Zysik (geki)
Details | Diff
Diff to app-office/openoffice/openoffice-2.0.2.ebuild. (openoffice-disable-pyuno.diff,629 bytes, patch)
2006-03-20 09:35 UTC, Hanno Zysik (geki)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Bergmann (RETIRED) gentoo-dev 2006-03-02 09:57:37 UTC
Building project pyuno
dmake: Executing shell macro: $(FIND) . -name "{$(subst,$($(WINVERSIONNAMES)_MAJOR),* $(subst,$(UPD)$(DLLPOSTFIX), $(SHL1TARGET)))}.xml"
Making: ../../
dmake subdmake=true  -f  depend=t ALLDPC
Making : Dependencies
touch ../../
dmake: Executing shell macro: $(FIND) . -name "{$(subst,$($(WINVERSIONNAMES)_MAJOR),* $(subst,$(UPD)$(DLLPOSTFIX), $(SHL1TARGET)))}.xml"
`../../' is up to date
dmake: Executing shell macro: $(FIND) . -name "{$(subst,$($(WINVERSIONNAMES)_MAJOR),* $(subst,$(UPD)$(DLLPOSTFIX), $(SHL1TARGET)))}.xml"
Making: ../../
dmake subdmake=true  -f  depend=t ALLDPC
Making : Dependencies
touch ../../
rm -f ../../ ../../ ../../
cd ../../ && regcomp -register -r pyuno_services.tmp -c -c -c -c -c -c -c
Segmentation fault
dmake:  Error code 139, while making '../../'
'---* *---'

ERROR: Error 65280 occurred while making /var/tmp/portage/openoffice-2.0.2_rc3-r1/work/ooo-build-oob680.3.0/build/oob680-m3/pyuno/source/loader
make: *** [stamp/build] Error 1


Portage 2.1_pre5-r2 (default-linux/x86/2005.1, gcc-4.1.0-pre20060223, glibc-2.3.6-r3, 2.6.15-gentoo-r6 i686)
System uname: 2.6.15-gentoo-r6 i686 Intel(R) Pentium(R) M processor 1500MHz
Gentoo Base System version 1.12.0_pre16
dev-lang/python:     2.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
CFLAGS="-march=pentium-m -O2 -pipe"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-march=pentium-m -O2 -pipe"
FEATURES="autoaddcvs autoconfig cvs digest distlocks fixpackages sandbox sfperms sign strict"
PORTDIR_OVERLAY="/usr/local/overlay/personal /usr/local/overlay/cvs /usr/local/overlay/gnome"
USE="x86 X a52 aac acpi alsa asf avi beagle berkdb bitmap-fonts bonjour browserplugin bzip2 cairo cdr crypt cups dbus divx4linux dvd dvdr dvdread eds emboss encode exif fame firefox flac foomaticdb fortran galago gdbm gif glitz gnome gpm gstreamer gtk gtk2 hal howl imlib ipv6 java jpeg libg++ libnotify libsexy libwww lzo mad matroska mikmod mjpeg mmx mng mono moznocompose moznoirc moznomail mozsvg mp3 mpeg ncurses nls nomotif nptl nsplugin nvidia ogg oggvorbis opengl oss pam pam_console pcre pdflib perl png python quicktime readline spell sse sse2 ssl svg tcpd theora tiff truetype truetype-fonts type1-fonts unicode usb vorbis win32codecs wmf xml2 xv xvid zlib elibc_glibc input_devices_evdev input_devices_keyboard input_devices_mouse input_devices_synaptics kernel_linux linguas_de userland_GNU video_cards_nv video_cards_nvidia"
Comment 1 SpanKY gentoo-dev 2006-03-02 10:06:11 UTC
try with a real compiler
Comment 2 Sebastian Bergmann (RETIRED) gentoo-dev 2006-03-02 10:09:01 UTC
Mark said in, and I quote, "You now have permission to file bugs for all gcc-4.1 related errors and not get yelled at.".
Comment 3 Mark Loeser (RETIRED) gentoo-dev 2006-03-02 10:32:04 UTC
The usual questions:  Does this only happen with 4.1.0?  Does it happen in the same place every single time?
Comment 4 Sebastian Bergmann (RETIRED) gentoo-dev 2006-03-02 13:10:50 UTC
I tried two times with gcc-4.1.0_pre20060223 and both times it happened in the same place.

When I try with gcc-3.4.5-r1 it seems that the target during which the segmentation fault happens is not built (see the attached pyuno-gcc345.log).
Comment 5 Sebastian Bergmann (RETIRED) gentoo-dev 2006-03-02 13:11:23 UTC
Created attachment 81136 [details]
Comment 6 Sebastian Bergmann (RETIRED) gentoo-dev 2006-03-02 21:44:53 UTC
Created attachment 81174 [details]
Comment 7 Sebastian Bergmann (RETIRED) gentoo-dev 2006-03-02 23:41:02 UTC
The problem persists with the current sys-devel/gcc-4.1.0 package.
Comment 8 Andreas Proschofsky (RETIRED) gentoo-dev 2006-03-04 06:47:01 UTC
Renaming this bug, please report this upstream and post the bug numbers here. If there is a working patch for the problems, I can add it to our build, but unfortunately atm OOo does not support gcc-4.1 out of the box. Also going to mark the other bug as duplicate of this
Comment 9 Andreas Proschofsky (RETIRED) gentoo-dev 2006-03-04 06:47:59 UTC
*** Bug 124932 has been marked as a duplicate of this bug. ***
Comment 10 Sebastian Bergmann (RETIRED) gentoo-dev 2006-03-04 06:50:44 UTC
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2006-03-06 08:22:30 UTC
*** Bug 125250 has been marked as a duplicate of this bug. ***
Comment 12 Hanno Zysik (geki) 2006-03-13 02:58:13 UTC
I know that pyuno module is very sensible to CFLAGS and segfaults or throws other errors even with gcc-4.0.x like on this forums post:
(-ffast-math was it there)

@ Sebastian:
Can you give these CFLAGS a try?
CFLAGS="-march=pentium4 -O2 -pipe"

Or pentium3 if it is an older cpu.

I have no problems to compile OOo2 with gcc-4.1 and
CFLAGS="-march=pentium4 -O2 -pipe" on a Centrino mobile.
I used 4.1.0_pre20060219 but I do not think that there are big changes to 20060223.
Comment 13 Sebastian Bergmann (RETIRED) gentoo-dev 2006-03-13 09:04:30 UTC
Same segfault with CFLAGS="-march=pentium3 -O2 -pipe".
Comment 14 John Berry 2006-03-14 04:30:40 UTC
Same segfault problem with gcc-4.02-r3. My CFLAGS : CFLAGS="-march=pentium-m -mtune=pentium-m -O2 -pipe -fomit-frame-pointer -fforce-addr -mmmx -msse -msse2"
Comment 15 Andreas Proschofsky (RETIRED) gentoo-dev 2006-03-14 06:35:18 UTC
(In reply to comment #14)
> Same segfault problem with gcc-4.02-r3. My CFLAGS : CFLAGS="-march=pentium-m
> -mtune=pentium-m -O2 -pipe -fomit-frame-pointer -fforce-addr -mmmx -msse
> -msse2"
Are you sure it actually fails at the exact same point. Cause your CFLAGS look made for build breakage, so I would guess that this is the culprit in your case...
Comment 16 Sven Roller 2006-03-17 01:57:29 UTC
In my case compilation breaks at the saame point.
Here is my emerge --info:

Portage 2.1_pre6-r3 (default-linux/x86/2006.0, gcc-4.1.0, glibc-2.4-r1, 2.6.15-archck7 i686)
System uname: 2.6.15-archck7 i686 Intel(R) Pentium(R) M processor 1600MHz
Gentoo Base System version 1.12.0_pre16
ccache version 2.3 [enabled]
dev-lang/python:     2.4.2-r1
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:, 2.16.1,,
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
CFLAGS="-O2 -march=pentium-m -fomit-frame-pointer -pipe"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/fax /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium-m -fomit-frame-pointer -pipe"
FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict"
USE="x86 X Xaw3d aalib accessibility acl acpi adabas adns alsa apache2 arts atlas audiofile avi bcmath bidi bitmap-fonts bluetooth bonobo boundschecking bzip2 bzlib calendar canna caps cdb cdr cli cpdflib cross crypt cscope ctype cups curl curlwrappers dbase dbus dbx dga dio divx4linux dri dvb dvd dvdr eds emacs-w3 emboss encode esob ethereal evo exif expat fastbuild fastcgi ffmpeg fftw flash foomaticdb force-cgi-redirect fortran freewnn frontbase fsm ftp gb gd gdbm ggi gif ginac gmp gnutls gpm gps guile hal hardenedphp hyperwave-api iconv icq idn ifc imagemagic imap imlib innodb interbase iodbc irmc jack java jikes joystick jpeg junit kde kerberos krb4 ladccs lcms ldap leim lesstif libedit libg++ libgda libwww lirc mad maildir mailwrapper mbox mcal mcve memlimit mhash mikmod milter mime ming mmap mmx mng mnogosearch motif moyilla mp3 mpeg mpi msession msn mysql nas ncurses netcdf nhc98nis nls nocd nptl nptlonly odbc offensive ofx ogg oggvorbis openal opengl oscar pam pam_console pcntl pcre pda pdflib perl pfpro pic pie plotutils png pnp portaudio posix ppds prelude python qdbm qt quicktime readline recode ruby samba sasl scanner sdl session shared sharedmem simplexml slang slp sndfile snmp soap sockets socks5 speex spell spl sqlite sse ssl svg svga sybase sybase-ct szip tcltk tcpd tetex theora tidy tiff tokenizer truetype truetype-fonts trusted type1-fonts udev unicode usb vhosts videos vorbis wavelan wddx win32codecs wmf wxwindows xface xine xml xml2 xmlrpc xosd xpm xsl xv xvid yahoo yaz zeo zlib elibc_glibc input_devices_evdev input_devices_keyboard input_devices_mouse input_devices_-acecad input_devices_-aiptek input_devices_-calcomp input_devices_-citron input_devices_-digitaledge input_devices_-dmc input_devices_-dynapro input_devices_-elo2300 input_devices_-elographics input_devices_-fpit input_devices_-hyperpen input_devices_-jamstudio input_devices_joystick input_devices_-magellan input_devices_-magictouch input_devices_-microtouch input_devices_-mutouch input_devices_-palmax input_devices_-penmount input_devices_-spaceorb input_devices_-summa input_devices_synaptics input_devices_-tek4957 input_devices_-ur98 input_devices_-vmmouse input_devices_-void kernel_linux linguas_de userland_GNU video_cards_-nvidia video_cards_-apm video_cards_-ark video_cards_ati video_cards_-chips video_cards_-cirrus video_cards_-cyrix video_cards_-dummy video_cards_-fbdev video_cards_-fglrx video_cards_-glint video_cards_-i128 video_cards_-i740 video_cards_-i810 video_cards_-imstt video_cards_-mga video_cards_-neomagic video_cards_-newport video_cards_-nsc video_cards_-nv video_cards_-rendition video_cards_-s3 video_cards_-s3virge video_cards_-savage video_cards_-siliconmotion video_cards_-sis video_cards_-sisusb video_cards_-sunbw2 video_cards_-suncg14 video_cards_-suncg3 video_cards_-suncg6 video_cards_-sunffb video_cards_-sunleo video_cards_-suntcx video_cards_-tdfx video_cards_-tga video_cards_-trident video_cards_-tseng video_cards_-v4l video_cards_-vesa video_cards_-vga video_cards_-via video_cards_-vmware video_cards_-voodoo"
Comment 17 John Berry 2006-03-17 07:47:36 UTC
(In reply to comment #15)
> Are you sure it actually fails at the exact same point. Cause your CFLAGS look
> made for build breakage, so I would guess that this is the culprit in your
> case.

Sorry for the late answer. Yeah, it seems to be the same :

Making: ../../
no ImportLibs on Mac and *nix
cp ../../
rm -f ../../ ../../ ../../
cd ../../ && regcomp -register -r pyuno_services.tmp -c -c -c -c -c -c -c
Segmentation fault
dmake: Error code 139, while making '../../'
'---* tg_merge;mk *---'

ERROR: Error 65280 occured while making /var/tmp/portage/openoffice-2.0.2/work/ooo-build-2.0.2/build/OOO_2_0_2/pyuno/source/loader
make: *** [stamp/build] Erreur 1

!!! ERROR: app-office/openoffice-2.0.2 failed.
Call stack:, line 1557:   Called dyn_compile, line 966:   Called src_compile

And I have no problems with my CFLAGS, the packages aren't more broken than for others unstable users. :-) I retried with the new gcc-4.0.3 and glibc-2.4-r1, same failure at the same point.
Comment 18 Hanno Zysik (geki) 2006-03-17 08:18:30 UTC
@ Sebastian:
You may recompile python and then openoffice with these.
CFLAGS="-march=pentium3 -O2 -pipe"

It happens on systems compiled with '-march=pentium-m' and gcc 4.0 or newer.
Nothing one could fix easily I guess. :)
Comment 19 Sebastian Bergmann (RETIRED) gentoo-dev 2006-03-17 09:49:08 UTC
I rebuilt Python with CFLAGS="-march=pentium3 -O2 -pipe" and tried to build OOo 2.0.2 with the same CFLAGS and got the same segmentation fault.
Comment 20 Hanno Zysik (geki) 2006-03-20 09:30:55 UTC
Created attachment 82678 [details, diff]
Hack to disable pyuno stuff to workaround segfault.

This is the diff to the openoffice source.
Tested with 2.0.2RC5 so it may need to be adjusted for 2.0.2 final.
I hope that not.

Anyone not using python scripts to access OOo can use this.
Others have bad luck.

A quick test starting oowriter2 and oocalc2 was successful.
Comment 21 Hanno Zysik (geki) 2006-03-20 09:31:49 UTC
Created attachment 82680 [details, diff]
Diff to ${S}/patches/src680/apply file.
Comment 22 Hanno Zysik (geki) 2006-03-20 09:35:55 UTC
Created attachment 82681 [details, diff]
Diff to app-office/openoffice/openoffice-2.0.2.ebuild.

Why I add this?
At least one can merge openoffice again.
Missing python bridge is not that important to the general user.

I hope it does not have a deeper impact.
I got a copy of openoffice with debug infos merged with this hack to reproduce strange errors if one may occur.
Comment 23 Bastiaan Jacques 2006-03-20 16:08:46 UTC
Please note that emerging openoffice-2.0.2 worked fine in my case, with gcc-4.1 and glibc-2.4.

I have the following USE flags:
  -binfilter +cairo -eds +firefox +gnome +gtk -java +kde -ldap -mozilla +xml2
And the following C{,XX}FLAGS:
  -Os -march=pentium4 -pipe

I hope this helps.
Comment 24 Hanno Zysik (geki) 2006-03-28 03:42:56 UTC
With post OOo 2.0.2 milestones I also get a segfault at that place. I did some cflags testing. It seems that gcc41 has a bug in -O2, -fpeephole2. Or, at least, some OOo2 code just dislikes that flag.

I added -fno-peephole2 cflag to build module sal and regcomp no longer segfaults.
Anyone can confirm this?
Comment 25 Andreas Proschofsky (RETIRED) gentoo-dev 2006-03-30 12:36:53 UTC
But: The last comment in points to sal-cxa-guard.diff in ooo-build being the cause (which we shouldn't need), did someone already test if this is true? (my system here is still on gcc-3.4 so can't test)
Comment 26 Sebastian Bergmann (RETIRED) gentoo-dev 2006-03-30 13:38:13 UTC
Supposedly fixed UPSTREAM:
Comment 27 Andreas Proschofsky (RETIRED) gentoo-dev 2006-03-31 23:22:21 UTC
(In reply to comment #26)
> Supposedly fixed UPSTREAM:

Yeah that's what I wrote one comment above ;)

I've now removed the faulty patch from the ebuild in portage, could someone please test, if this solves the problem for them?
Comment 28 Sebastian Bergmann (RETIRED) gentoo-dev 2006-04-04 07:55:07 UTC
Fixed in CVS, thanks.