Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 46945 - openoffice 1.1.1 compilation fails with segmentation fault
Summary: openoffice 1.1.1 compilation fails with segmentation fault
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 46946 47077 47165 47506 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-06 04:56 UTC by Federico Fenara
Modified: 2004-04-12 17:38 UTC (History)
22 users (show)

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


Attachments
Prevents inappropriate free() (portage-2.0.50-r4-sandbox.patch,799 bytes, patch)
2004-04-11 07:32 UTC, Jason Stubbs (RETIRED)
Details | Diff
app-office/openoffice/files/1.1.1/build.patch (build.patch,327 bytes, patch)
2004-04-11 08:01 UTC, Geoffrey SCOUTHEETEN
Details | Diff
app-office/openoffice/openoffice-1.1.1.ebuild (openoffice-1.1.1.ebuild,15.82 KB, application/octet-stream)
2004-04-11 08:10 UTC, Geoffrey SCOUTHEETEN
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Federico Fenara 2004-04-06 04:56:47 UTC
Trying to upgrade app-office/openoffice-1.1.1 form version 1.1.0-r3 I get this error preventing succesful ending of the emerge.

[snip]
make[2]: Leaving directory  /var/tmp/portage/openoffice-1.1.1/work/oo_1.1.1_src/dmake'
make[1]: Leaving directory `/var/tmp/portage/openoffice-1.1.1/work/oo_1.1.1_src/dmake'
 
dmake has been successfully built
 * Building OpenOffice.org...
build.sh: line 1: 28711 Segmentation fault      /var/tmp/portage/openoffice-1.1.1/work/oo_1.1.1_src/solenv/bin/build.pl --all product=full
 
!!! ERROR: app-office/openoffice-1.1.1 failed.
!!! Function src_compile, Line 357, Exitcode 139

Reproducible: Always
Steps to Reproduce:
1. emerge app-office/openoffice-1.1.1


Actual Results:  
Emerge stops with segmentation fault.

Expected Results:  
Emerge openoffice 1.1.1 succesfully.

Portage 2.0.50-r3 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040207-r0,
2.6.4-gentoo-r1)
=================================================================
System uname: 2.6.4-gentoo-r1 i686 Intel(R) Pentium(R) 4 Mobile CPU 1.60GHz
Gentoo Base System version 1.4.3.13p1
distcc 2.13 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium4 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=pentium4 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs buildpkg ccache distcc sandbox sandox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa apm arts avi berkdb crypt cups encode esd foomaticdb gdbm gif gnome
gpm gtk gtk2 imlib java jpeg libg++ libwww mad mikmod mmx motif mpeg ncurses nls
oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang
spell ssl svga tcpd threads truetype x86 xml2 xmms xv zlib"
Comment 1 Heinrich Wendel (RETIRED) gentoo-dev 2004-04-06 05:21:59 UTC
*** Bug 46946 has been marked as a duplicate of this bug. ***
Comment 2 Heinrich Wendel (RETIRED) gentoo-dev 2004-04-06 05:22:27 UTC
try to disable sandbox
Comment 3 Federico Fenara 2004-04-06 05:50:29 UTC
Same result disabling sandbox.
Comment 4 motown 2004-04-06 06:47:43 UTC
I have exactly the same problem here. I tried compiling with different CFLAGS (since the ebuild warns about that specifically in the beginning), but to no avail.

Even CFLAGS="" emerge -u openoffice didn't work.
Comment 5 Matthias Transier 2004-04-06 06:50:16 UTC
'FEATURES="-sandbox" emerge openoffice' worked for me.
Comment 6 Matteo Settenvini 2004-04-06 07:07:28 UTC
DIsabling sandbox works also for me.
Comment 7 Imad R. Faiad 2004-04-06 07:19:00 UTC
also try clearing your ccache as follows before re-emerging:
ccache -Cz
hth
Comment 8 Federico Fenara 2004-04-06 07:23:05 UTC
My fault.
I forgot to make env-update after disabling sandbox in make.conf. Now it works for me too.
Really sorry.
Comment 9 Seemant Kulleen (RETIRED) gentoo-dev 2004-04-06 09:28:35 UTC
I got this on one of my machines, checking the other one
Comment 10 Seemant Kulleen (RETIRED) gentoo-dev 2004-04-06 10:29:51 UTC
ok, happens on both machines with ooo-xim-1.1.52

disabling sandbox seems to work
Comment 11 Andreas Proschofsky (RETIRED) gentoo-dev 2004-04-07 01:51:40 UTC
Now happens for me too, so I think this is definately not a OOo-problem, as I have tested this version before and it compiled fine. As it is Sandbox making problems I tend to point at the recent security fixes in portage.
Comment 12 Prieto 2004-04-07 05:55:23 UTC
The same here with openoffice-ximian-1.1.52 and portage-2.0.50-r3. It works only with sandbox disabled. Should someone reassign this bug?
Comment 13 Andreas Proschofsky (RETIRED) gentoo-dev 2004-04-07 06:56:49 UTC
*** Bug 47077 has been marked as a duplicate of this bug. ***
Comment 14 Seemant Kulleen (RETIRED) gentoo-dev 2004-04-07 10:10:31 UTC
no, the bug has been assigned already to the openoffice team. as you know openoffice is a HUGE package, so I'm sure suka is working on this as we speak.
Comment 15 Andreas Proschofsky (RETIRED) gentoo-dev 2004-04-07 10:26:00 UTC
@seemant: Read my earlier comment: This does NOT seem to be an OOo-problem
Comment 16 Seemant Kulleen (RETIRED) gentoo-dev 2004-04-07 10:51:22 UTC
nakano, marius, nick, jstubbs -- need your input on this please
Comment 17 Andreas Proschofsky (RETIRED) gentoo-dev 2004-04-08 01:47:13 UTC
Some further investigations: Downgrading to the old (insecure) portage-2.0.50-r1 solved the problem, the OOo-compile went over the breakpoint without problem. So we need some urgent feedback of the portage-devs, as this completly breaks all source OOo-ebuilds in gentoo atm
Comment 18 Pablo De Nápoli 2004-04-09 10:01:30 UTC
I'm having the same problem:

I'm using

Portage 2.0.50-r3 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.25)

on an athlon MD

CFLAGS="-O3 -march=athlon -funroll-loops -pipe"
Comment 19 Andreas Proschofsky (RETIRED) gentoo-dev 2004-04-11 01:38:15 UTC
Just to provide some further info, this dies while calling the following perl script (which is the OOo build script)

${S}/solenv/bin/build.pl --all -P${ECPUS} product=full
Comment 20 Nicholas Jones (RETIRED) gentoo-dev 2004-04-11 01:44:10 UTC
Can anyone nail down what exactly is happening as far as disk operations
are concerned? This is a new bug introduced into sandbox along with the
security fix... So far this has affected CVS updates inside sandbox and
openoffice.

If someone can reproduce this with sandboxshell, that'd be cool too.
Comment 21 Andreas Proschofsky (RETIRED) gentoo-dev 2004-04-11 02:01:25 UTC
Another observation: If we use the build.pl script the build works fine, if the ebuild calls dmake directly (which we don't want) it seems to go on fine
Comment 22 Andreas Proschofsky (RETIRED) gentoo-dev 2004-04-11 02:02:57 UTC
Sorry this should have been: "If we use the build.pl script the build dies"
Comment 23 Jason Stubbs (RETIRED) gentoo-dev 2004-04-11 07:25:43 UTC
*** Bug 47506 has been marked as a duplicate of this bug. ***
Comment 24 Jason Stubbs (RETIRED) gentoo-dev 2004-04-11 07:32:37 UTC
Created attachment 29077 [details, diff]
Prevents inappropriate free()

The sandboxed execve copies the envp array to my_env if LD_PRELOAD needs to
updated with the libsandbox path. After the function call, my_env is freed but
if there was no need to update LD_PRELOAD my_env points to envp. On the second
attempt at calling the real execve (due to the target being a script) envp was
not allocated and thus a segfault.
Comment 25 Jason Stubbs (RETIRED) gentoo-dev 2004-04-11 07:55:44 UTC
*** Bug 47165 has been marked as a duplicate of this bug. ***
Comment 26 Geoffrey SCOUTHEETEN 2004-04-11 08:01:30 UTC
Created attachment 29079 [details, diff]
app-office/openoffice/files/1.1.1/build.patch

This is the additional patch, it only changes ${S}/solenv/bin/build.pl . The
other patches in app-office/openoffice/files/1.1.1/ have to be kept of course
Comment 27 Geoffrey SCOUTHEETEN 2004-04-11 08:07:01 UTC
Sorry for submitting the patch first and explaining after ...
With this 'cheap' patch openoffice-1.1.1 compiles with portage-2.0.50-r3
I understand your main concern is about portage's sandbox, and that this patch doesn't solve the core of the problem, but I though you might be interested.
The ebuild is the same as the one in portage, plus the line for applying the patch.
The emerge doesn't segfault anymore however it isn't finished yet and i'll be making and other additional comment when it is and everything is ok.
Comment 28 Geoffrey SCOUTHEETEN 2004-04-11 08:10:10 UTC
Created attachment 29080 [details]
app-office/openoffice/openoffice-1.1.1.ebuild

This is the ebuild of portage plus the line that applies the small patch.
this is the only difference:
geoffrey@p4> diff -Naur
/usr/local/portage/app-office/openoffice/openoffice-1.1.1.ebuild
/usr/portage/app-office/openoffice/openoffice-1.1.1.ebuild 
--- /usr/local/portage/app-office/openoffice/openoffice-1.1.1.ebuild   
2004-04-11 16:42:13.000000000 +0200
+++ /usr/portage/app-office/openoffice/openoffice-1.1.1.ebuild	2004-04-11
13:42:30.000000000 +0200
@@ -266,8 +266,6 @@
 
	epatch ${FILESDIR}/${PV}/openoffice-java.patch
 
-	epatch ${FILESDIR}/${PV}/build.patch
-
 #	if [ ${ARCH} = "sparc" ]; then
 #		epatch ${FILESDIR}/${PV}/openoffice-1.1.0-sparc64-fix.patch
 #	fi
Comment 29 Andreas Proschofsky (RETIRED) gentoo-dev 2004-04-11 09:25:32 UTC
@Geoffrey: I've added your patch for now (until a new portage version is available). Thanks!
Comment 30 Geoffrey SCOUTHEETEN 2004-04-11 15:20:34 UTC
After several hours of compilation the answear is you can sleep well because the ebuild+patch I submitted works until the end.
@Andreas: Thanks for your confidence ;-)
Maybe we could do this for openoffice-ximian too
Comment 31 Andreas Proschofsky (RETIRED) gentoo-dev 2004-04-11 23:54:33 UTC
@Geoffrey: The patch is already in openoffice-ximian. And thanks again for testing!
Comment 32 Robin Munn 2004-04-12 13:50:11 UTC
I had been experiencing the same symptoms, but now they are gone. I don't know if it's because I updated to portage 2.0.50-r5 or because of Geoffrey's patch, but after my "emerge sync" this morning (which grabbed the openoffice-1.1.1.ebuild with Geoffrey's patch included), I can now compile OpenOffice 1.1.1 successfully. (Well, it's not finished yet, but it used to crash within the first minute and it's now been going for several hours, so I fully expect it to complete).

"emerge info" from my machine:

Portage 2.0.50-r5 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040207-r0, 2.6.4-gentoo-r1)
=================================================================
System uname: 2.6.4-gentoo-r1 i686 AMD Athlon(TM) XP 2600+
Gentoo Base System version 1.4.6
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /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"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://mirrors.tds.net/gentoo http://gentoo.netnitco.net http://gentoo.chem.wisc.edu/gentoo/ http://gentoo.seren.com/gentoo http://gentoo.mirrors.pair.com"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="3dnow X X509 alsa apache2 apm arts avi berkdb cdr clamav crypt cscope cups directfb encode esd evo fastcgi foomaticdb gdbm ggi gif gnome gphoto2 gpm gtk gtk2 guile imap imlib java jpeg kde lcms ldap libg++ libwww mad maildir mikmod mmx motif mozilla mpeg ncurses nls nptl oggvorbis opengl opie oss pam pdflib perl png postgres python qt quicktime readline ruby samba sasl sdl slang spell sse ssl svga tcltk tcpd tetex tiff truetype wmf x86 xface xml2 xmms xv zlib"
Comment 33 Andreas Proschofsky (RETIRED) gentoo-dev 2004-04-12 14:28:08 UTC
@Robin: Actually it's because of both ;-)

Closing this bug
Comment 34 Robin Munn 2004-04-12 17:38:00 UTC
Confirmed. The compile finished with no problems. This bug is squashed flat.