Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 63938 - groff 1.19.1 fails to compile in ~x86
Summary: groff 1.19.1 fails to compile in ~x86
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 69134 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-09-13 14:20 UTC by Guillaume Castagnino
Modified: 2004-10-28 19:22 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Castagnino 2004-09-13 14:20:37 UTC
error in a sed command : broken pipe :

GROFF_COMMAND_PREFIX=''; export GROFF_COMMAND_PREFIX; GROFF_BIN_PATH=`echo /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/roff/groff /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/roff/troff /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/preproc/pic /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/preproc/eqn /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/preproc/tbl /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/preproc/grn /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/preproc/refer /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/preproc/soelim /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/preproc/html /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/devices/grops /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/devices/grohtml | sed -e 's|  *|:|g'`; export GROFF_BIN_PATH; sed -e "s;@VERSION@;1.19.1;" pic.ms | /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/roff/groff/groff -M/var/tmp/portage/groff-1.19.1/work/groff-1.19.1/tmac -M/var/tmp/portage/groff-1.19.1/work/groff-1.19.1/tmac -F/var/tmp/portage/groff-1.19.1/work/groff-1.19.1/font -F/var/tmp/portage/groff-1.19.1/work/groff-1.19.1/font -Upet -ww -Tps -ms -mwww >pic.ps
/var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/roff/groff/groff: pic: Signal 11
sed: impossible d'
Comment 1 Guillaume Castagnino 2004-09-13 14:20:37 UTC
error in a sed command : broken pipe :

GROFF_COMMAND_PREFIX=''; export GROFF_COMMAND_PREFIX; GROFF_BIN_PATH=`echo /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/roff/groff /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/roff/troff /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/preproc/pic /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/preproc/eqn /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/preproc/tbl /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/preproc/grn /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/preproc/refer /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/preproc/soelim /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/preproc/html /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/devices/grops /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/devices/grohtml | sed -e 's|  *|:|g'`; export GROFF_BIN_PATH; sed -e "s;@VERSION@;1.19.1;" pic.ms | /var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/roff/groff/groff -M/var/tmp/portage/groff-1.19.1/work/groff-1.19.1/tmac -M/var/tmp/portage/groff-1.19.1/work/groff-1.19.1/tmac -F/var/tmp/portage/groff-1.19.1/work/groff-1.19.1/font -F/var/tmp/portage/groff-1.19.1/work/groff-1.19.1/font -Upet -ww -Tps -ms -mwww >pic.ps
/var/tmp/portage/groff-1.19.1/work/groff-1.19.1/src/roff/groff/groff: pic: Signal 11
sed: impossible d'écrire 69 items à stdout: Relais brisé (pipe)
make[2]: *** [pic.ps] Erreur 2
make[2]: Leaving directory `/var/tmp/portage/groff-1.19.1/work/groff-1.19.1/doc'
make[1]: *** [doc] Erreur 2
make[1]: Leaving directory `/var/tmp/portage/groff-1.19.1/work/groff-1.19.1'
make: *** [all] Erreur 2

!!! ERROR: sys-apps/groff-1.19.1 failed.
!!! Function src_compile, Line 85, Exitcode 2
!!! (no error message)

my emerge info : 

Portage 2.0.50-r11 (default-x86-2004.2, gcc-3.4.2, glibc-2.3.4.20040808-r0, 2.6.9-rc1)
=================================================================
System uname: 2.6.9-rc1 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System version 1.5.3
distcc 2.17 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -Os -mtune=pentium4 -msse -msse2 -mmmx -mfpmath=sse,387 -fomit-frame-pointer -ffast-math -funroll-loops -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /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/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -Os -mtune=pentium4 -msse -msse2 -mmmx -mfpmath=sse,387 -fomit-frame-pointer -ffast-math -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox userpriv usersandbox"
GENTOO_MIRRORS="ftp://mir.zyrianes.net/gentoo/ http://gentoo.mirror.sdv.fr http://ftp.gentoo.skynet.be/pub/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://mirror.switch.ch/ftp/mirror/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib acpi acpi4linux alsa apache2 artswrappersuid avi berkdb bitmap-fonts cdr crypt cups dba dga directfb distribution dnd dvd encode faad fbcon ffmpeg flac foomaticdb freetype fs gd gdbm gif gimp gimpprint gphoto2 gpm gstreamer gtk gtk2 imagemagick imap imlib imlib2 ipv6 jabber java jpeg kde libcaca libg++ libwww linguas_fr mad matroska md5sum mikmod mmx monkey motif mozsvg mpeg mysql nas ncurses network nls nptl nvidia oggvorbis opengl oss pam pdflib perl png postgres print python qt quicktime readline samba sasl scanner sdl snmp speex spell sse sse2 ssl svg tcltk tcpd tetex theora tiff truetype type1 unicode usb userlocales v4l v4l2 video_cards_nvidia wxwindows x86 xchattext xml2 xmms xprint xv xvid zlib"

Reproducible: Always
Steps to Reproduce:
Comment 2 rob holland (RETIRED) gentoo-dev 2004-09-13 16:00:13 UTC
oh please. turn your cflags down and try again.
Comment 3 SpanKY gentoo-dev 2004-09-13 16:05:14 UTC
try again but with less insane CFLAGS/CXXFLAGS

for example, use just '-pipe'
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2004-09-13 16:11:39 UTC
Well, just to throw my two cents into the good ol' Signal 11 debate... before you reply back that your CFLAGS work for everything else and your hardware is of good quality, please take a moment to visit: http://www.bitwizard.nl/sig11/ and read it.

Now having read some of the information there. Try backing your CFLAGS down to something a bit more sane. One very problematic CFLAG is -mfpmath=sse,387, it's even mentioned as a bit troublesome in the GCC docs. Pick either SSE or 387 floating ops. Personally, I use SSE. Also, -msse -mmmx, -msse2 are redundant as they are set by -march=pentium4. The next CFLAG you might want to change is -Os to -O2, that occationally can fix issues.

However it is important to note that backing your CFLAGS all the way down to the safest levels (i.e. "-pipe") might not fix this problem. As the problem could be in a poorly compiled glibc or gcc or any other binary/library that the groff compile uses. Basically, signal 11 is telling you that somewhere there is a code path with a bad memory address in it due to a failure in hardware or in the compiling process from those CFLAGS.
Comment 5 Guillaume Castagnino 2004-09-13 16:25:05 UTC
Ok, the problem was "-Os", changing it to -O2 solves the problem : it compiles with CFLAGS="-march=pentium4 -O2 -mtune=pentium4 -msse -msse2 -mmmx -mfpmath=sse,387 -fomit-frame-pointer -ffast-math -funroll-loops -pipe"

(And for the redundancies, it's for ebuilds that filter some flags such -mtune or -march...)
Comment 6 SpanKY gentoo-dev 2004-09-13 16:51:56 UTC
what if you try with just -Os
Comment 7 Guillaume Castagnino 2004-09-13 17:11:56 UTC
It works with CFLAGS="-Os" but fails with CFLAGS="-march=pentium4 -Os"
Comment 8 Andrej Kacian (RETIRED) gentoo-dev 2004-09-14 05:22:14 UTC
Same here, on x86 (my CFLAGS being "-march=pentium4 -Os -pipe -fomit-frame-pointer -funroll-loops -falign-functions=4") it fails with the same error. After removing "-march=pentium4" from CFLAGS, groff compiles nicely.
Comment 9 solar (RETIRED) gentoo-dev 2004-09-14 13:24:38 UTC
How about with just CFLAGS="-march=pentium4" CXXFLAS="-march=pentium4"
Does this still fail?
Comment 10 Andrej Kacian (RETIRED) gentoo-dev 2004-09-14 13:31:29 UTC
That seems to work. I'm going to try compiling with -march=pentium4 and each flag, one at a time.
Comment 11 Andrej Kacian (RETIRED) gentoo-dev 2004-09-14 13:58:13 UTC
Ok, several other tests revealed that this bug only occurs when -march=pentium4 and -Os are in CXXFLAGS together.

BTW, I'm using gcc 3.4.2.
Comment 12 Robert Moss (RETIRED) gentoo-dev 2004-09-14 13:59:26 UTC
As far as I'm aware, gcc-3.4.x still has SSE2 issues. In particular, it is often the case that certain optimisation steps break SSE2. If you try compiling groff with CFLAGS that will ensure that all the binaries won't run on your system (so perhaps "-march=athlon-xp" or something like that) you'll see that the "Illegal instruction" error shows up at this very same point. Effectively, this means that your groff binary got lost somewhere up its own arse and thus has been miscompiled. A possible solution would be to append "-mno-sse2" to the CFLAGS (or is it CXXFLAGS?).

Also, on any architecture with a version of GCC less than 4.0-cvs on any 32-bit architecture, -mfpmath=387 is faster than -mfpmath=sse, which in turn is faster still than -mfpmath=sse,387. The fastest situation is leaving -mfpmath unset, which is also therefore the most stable (because that's what all the GCC devs use - unset). So unless you're deliberately trying to break things and slow them down, or have an AMD64 or Nocona chip, get rid of -mfpmath.
Comment 13 SpanKY gentoo-dev 2004-10-27 11:40:52 UTC
*** Bug 69134 has been marked as a duplicate of this bug. ***
Comment 14 SpanKY gentoo-dev 2004-10-28 19:22:55 UTC
groff now changes -Os into -O for everyone (previously was just alpha)