Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 351513 - =sys-apps/groff-1.20.1-r3 fails to compile with older gcc
Summary: =sys-apps/groff-1.20.1-r3 fails to compile with older gcc
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL: http://www.gentoo.org/doc/en/gcc-upgr...
Whiteboard:
Keywords:
: 354195 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-13 03:46 UTC by Nick Solon
Modified: 2011-04-07 22:08 UTC (History)
2 users (show)

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


Attachments
emerge --info, et al (system.info,4.31 KB, text/plain)
2011-02-09 17:10 UTC, Dave Kemper
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Solon 2011-01-13 03:46:02 UTC
After a very recent "emerge --sync" and "emerge -uD world", the only package which fails is sys-apps/groff-1.20.1-r3.  My current verions is groff-1.20.1-r1.  I can't find any obvious hints or helpful information on forums, bugzilla or the Groff website.  The error output is displayed below and it revolves around several undefined references.

Reproducible: Always

Steps to Reproduce:
1. Run emerge --sync to get latest portage tree
2. Run emerge -uD groff for latest stable build
3. Failed emerge

Actual Results:  
Emerge fails

Expected Results:  
Should compile and link successfully.

Make runs successfully until it encounters this part:


make[2]: Entering directory `/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/roff/troff'
i686-pc-linux-gnu-g++ -I. -I. -I/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/include -I/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/include -DHAVE_CONFIG_H -O2 -march=athlon-xp -pipe -fomit-frame-pointer  -c  dictionary.cpp
i686-pc-linux-gnu-g++ -I. -I. -I/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/include -I/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/include -DHAVE_CONFIG_H -O2 -march=athlon-xp -pipe -fomit-frame-pointer  -c  div.cpp
i686-pc-linux-gnu-g++ -I. -I. -I/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/include -I/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/include -DHAVE_CONFIG_H -O2 -march=athlon-xp -pipe -fomit-frame-pointer  -c  env.cpp
i686-pc-linux-gnu-g++ -I. -I. -I/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/include -I/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/include -DHAVE_CONFIG_H -O2 -march=athlon-xp -pipe -fomit-frame-pointer  -c  input.cpp
Making majorminor.cpp
i686-pc-linux-gnu-g++ -I. -I. -I/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/include -I/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/include -DHAVE_CONFIG_H -O2 -march=athlon-xp -pipe -fomit-frame-pointer  -c  majorminor.cpp
i686-pc-linux-gnu-g++ -I. -I. -I/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/include -I/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/include -DHAVE_CONFIG_H -O2 -march=athlon-xp -pipe -fomit-frame-pointer  -c  mtsm.cpp
i686-pc-linux-gnu-g++ -I. -I. -I/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/include -I/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/include -DHAVE_CONFIG_H -O2 -march=athlon-xp -pipe -fomit-frame-pointer  -c  node.cpp
i686-pc-linux-gnu-g++ -I. -I. -I/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/include -I/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/include -DHAVE_CONFIG_H -O2 -march=athlon-xp -pipe -fomit-frame-pointer  -c  number.cpp
i686-pc-linux-gnu-g++ -I. -I. -I/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/include -I/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/include -DHAVE_CONFIG_H -O2 -march=athlon-xp -pipe -fomit-frame-pointer  -c  reg.cpp
i686-pc-linux-gnu-g++ -O2 -march=athlon-xp -pipe -fomit-frame-pointer -Wl,-O1 -Wl,--as-needed -o troff dictionary.o div.o env.o input.o majorminor.o mtsm.o node.o number.o reg.o /storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/libs/libgroff/libgroff.a   -lm
div.o: In function `extra_size_node::~extra_size_node()':
div.cpp:(.text._ZN15extra_size_nodeD0Ev[extra_size_node::~extra_size_node()]+0x12): undefined reference to `node::~node()'
div.o: In function `extra_size_node::~extra_size_node()':
div.cpp:(.text._ZN15extra_size_nodeD1Ev[extra_size_node::~extra_size_node()]+0xb): undefined reference to `node::~node()'
div.o: In function `vertical_size_node::~vertical_size_node()':
div.cpp:(.text._ZN18vertical_size_nodeD0Ev[vertical_size_node::~vertical_size_node()]+0x12): undefined reference to `node::~node()'
div.o: In function `vertical_size_node::~vertical_size_node()':
div.cpp:(.text._ZN18vertical_size_nodeD1Ev[vertical_size_node::~vertical_size_node()]+0xb): undefined reference to `node::~node()'
input.o: In function `token_node::token_node(token const&)':
input.cpp:(.text+0x1244): undefined reference to `node::~node()'
input.o:input.cpp:(.text+0x1da4): more undefined references to `node::~node()' follow
collect2: ld returned 1 exit status
make[2]: *** [troff] Error 1
make[2]: Leaving directory `/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1/src/roff/troff'
make[1]: *** [src/roff/troff] Error 2
make[1]: Leaving directory `/storage/temp/portage/sys-apps/groff-1.20.1-r3/work/groff-1.20.1'
make: *** [all] Error 2
emake failed
 * ERROR: sys-apps/groff-1.20.1-r3 failed:
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  56:  Called src_compile
 *   environment, line 2891:  Called die
 * The specific snippet of code:
 *       emake || die
Comment 1 Nick Solon 2011-01-13 03:48:25 UTC
Oh, I've set my MAKEOPTS="-j1" just to rule that out.
Comment 2 Nick Solon 2011-01-13 17:11:20 UTC
The only useful tidbit available is in a Groff mailing list:
http://lists.gnu.org/archive/html/bug-groff/2010-02/msg00003.html

*****************************************************************

> DESCRIPTION OF INCORRECT BEHAVIOUR:
> /groff-current/src/roff/troff/node.h:277: undefined reference to
> `node::~node()'
> 
> SUGGESTED FIX: ??? I note differences from initial release of 1.20.1
> are small, but that compiles.

Remove the `inline' keyword as described in the last entry of the
PROBLEMS file.  I haven't had time yet to fix this.

Werner

*****************************************************************

I was unable to find the entry in the PROBLEMS file as described above.
Comment 3 Jory A. Pratt gentoo-dev 2011-01-14 20:47:14 UTC
your emerge --info is missing please add it to the report.
Comment 4 Nick Solon 2011-01-14 20:48:50 UTC
Portage 2.1.9.25 (default/linux/x86/10.0/desktop, gcc-4.1.2, glibc-2.11.2-r3, 2.6.31-gentoo-r10 i686)
=================================================================                                                                                                                       
System uname: Linux-2.6.31-gentoo-r10-i686-AMD_Athlon-TM-_XP_2600+-with-gentoo-1.12.14                                                                                                  
Timestamp of tree: Thu, 13 Jan 2011 01:45:01 +0000                                                                                                                                      
app-shells/bash:     4.1_p7                                                                                                                                                             
dev-java/java-config: 2.1.11-r1                                                                                                                                                         
dev-lang/python:     2.4.4-r13, 2.5.4-r3, 2.6.6-r1, 3.1.2-r4                                                                                                                            
dev-util/cmake:      2.8.1-r2                                                                                                                                                           
sys-apps/baselayout: 1.12.14-r1                                                                                                                                                         
sys-apps/sandbox:    2.4                                                                                                                                                                
sys-devel/autoconf:  2.13::<unknown repository>, 2.65-r1                                                                                                                                
sys-devel/automake:  1.4_p6::<unknown repository>, 1.5::<unknown repository>, 1.6.3::<unknown repository>, 1.7.9-r1::<unknown repository>, 1.8.5-r3::<unknown repository>, 1.9.6-r3, 1.10.3, 1.11.1                                                                                                                                                                             
sys-devel/binutils:  2.20.1-r1                                                                                                                                                          
sys-devel/gcc:       4.1.2, 4.3.4, 4.4.4-r2                                                                                                                                             
sys-devel/gcc-config: 1.4.1                                                                                                                                                             
sys-devel/libtool:   2.2.10                                                                                                                                                             
sys-devel/make:      3.81-r2                                                                                                                                                            
virtual/os-headers:  2.6.30-r1 (sys-kernel/linux-headers)                                                                                                                               
ACCEPT_KEYWORDS="x86"                                                                                                                                                                   
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/storage/temp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi aiglx alsa berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dga dri dts dv dvd dvdr emboss encode exif extras fam ffmpeg firefox flac fortran gdbm gdu gif gnome gnutls gpm gtk gtk2 iconv imlib ipv6 jpeg kde kde4 lcms ldap libnotify mad mikmod mmx mng modules mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly nsplugins ogg opengl openmp oscar pam pango pcre pdf perl png policykit ppds pppd python qt3support qt4 readline sdl session spell sql sqlite3 sse ssl startup-notification svg sysfs tcpd theora tiff truetype truetype-fonts type1-fonts udev unicode usb vorbis wavpack webkit win32codecs x264 x86 xcb xcomposite xml xorg xulrunner xv xvid yahoo zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 5 Nick Solon 2011-01-15 00:05:47 UTC
From Groff buglist:  

"This is a g++ compiler bug, AFAIK.  Please look up the groff mailing list archive for a simple solution.

Werner"

http://www.mail-archive.com/groff@gnu.org/msg04878.html
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2011-01-18 18:22:59 UTC
sys-devel/gcc:       4.1.2, 4.3.4, 4.4.4-r2

Maybe it's time to switch to a newer GCC version.
Comment 7 Nick Solon 2011-01-18 22:52:38 UTC
Thanks!  Yes, upgrading to gcc-4.4.4 does resolve the issue.  Groff was the last package I would expect to break under an older GCC ;-)
Comment 8 Dave Kemper 2011-02-03 21:31:54 UTC
If groff-1.20.1-r3 requires a particular gcc version, shouldn't this be made an explicit dependency?
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2011-02-09 16:06:20 UTC
*** Bug 354195 has been marked as a duplicate of this bug. ***
Comment 10 Dave Kemper 2011-02-09 17:10:14 UTC
Created attachment 261933 [details]
emerge --info, et al
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2011-02-09 17:17:23 UTC
(In reply to comment #10)
> Created an attachment (id=261933) [details]
> emerge --info, et al

I am sure upgrading all those system packages would solve the issue.
Comment 12 Samuli Suominen (RETIRED) gentoo-dev 2011-02-09 17:23:37 UTC
not required, just use latest stable gcc and the issue is closed
Comment 13 Dave Kemper 2011-02-09 18:17:40 UTC
(In reply to comment #11)
> I am sure upgrading all those system packages would solve the issue.

I am sure that upgrading just gcc would solve the issue, as reported in comment #7.

The point is that emerge is unaware of this gcc dependency.  Making >=sys-devel/gcc-4.4.4 a groff-1.20.1-r3 dependency is a trivially easy way to prevent users from hitting this snag.

The larger point is that the groff code is doing something that does not appear to be valid C++, but that gcc-4.4.4 happens to accept anyway.  Back-versions of gcc would build groff just fine if its code were correct.  So the right way to solve the problem is to fix the invalid groff code.  (This may have already been done; there is a groff 1.21 out there, though it's not in portage yet.)
Comment 14 Dave Kemper 2011-02-09 21:13:45 UTC
(In reply to comment #13)
> the right way to
> solve the problem is to fix the invalid groff code.  (This may have already
> been done; there is a groff 1.21 out there, though it's not in portage yet.)

Ah, it turns out sys-apps/groff-1.21 is in portage after all; it's just masked on x86.  It built and installed successfully with the command:

ACCEPT_KEYWORDS='~x86' emerge sys-apps/groff

using the same gcc (4.1.1-r3) that fails to build sys-apps/groff-1.20.1-r3.

I see a couple possible ways to handle this:

1.  Mask sys-apps/groff-1.20.1-r3, since the compilation problem is due to a coding error specific to this release.

2.  Make gcc-4.4.4 a dependency of =sys-apps/groff-1.20.1-r3, since gcc-4.4.4 is more forgiving of the particular coding error in groff-1.20.1-r3.
Comment 15 Dave Kemper 2011-02-09 21:19:34 UTC
Oh, and in light of the above, the summary of this bug should be modified to say "=sys-apps/groff-1.20.1-r3 fails..." rather than ">=sys-apps/groff-1.20.1-r3 fails...", but that's apparently another thing Bugzilla won't let me update.
Comment 16 Ivan Kocienski 2011-04-07 22:08:06 UTC
Found this

http://d.hatena.ne.jp/meech/20100811/1281477968

which seems to describe these steps to fix (worked for me)

- edit /usr/portage/sys-apps/groff/files/groff-1.20.1-Thtml-mem-leak.patch
  take out the inline
- run digest on ebuild
  ebuild groff-1.20.1-r3.ebuild digest

now emerge groff -1