Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 359033

Summary: app-office/gnucash-2.4.4 links against system gnucash, instead of the one it's building
Product: Gentoo Linux Reporter: Chris Smith <chris>
Component: Current packagesAssignee: GNOME Office (OBSOLETE) <gnome-office+disabled>
Status: RESOLVED FIXED    
Severity: normal CC: Adrian.Bassett, again, aklhfex, binki, bogo.mipps, chris.burroughs, fkrogh, flameeyes, gottlieb, ian, mschiff, steven, tetromino, yamadharma, zzam
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://bugzilla.gnome.org/show_bug.cgi?id=644897
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 344059    

Description Chris Smith 2011-03-15 15:12:48 UTC
app-office/gnucash-2.4.4 fails to compile

Reproducible: Always

Steps to Reproduce:
1.emerge =app-office/gnucash-2.4.4
2.
3.
Actual Results:  
libtool: link: x86_64-pc-linux-gnu-gcc -Wdeclaration-after-statement -march=native -fomit-frame-pointer -pipe -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused -Wl,-O1 -g -o .libs/gnucash gnucash-bin.o -pthread -pthread -Wl,--export-dynamic -pthread -pthread  -Wl,--as-needed ../../src/libqof/qof/.libs/libgnc-qof.so ../../src/core-utils/.libs/libgnc-core-utils.so ../../src/engine/.libs/libgncmod-engine.so ../../src/gnome/.libs/libgnc-gnome.so ../../src/gnome-utils/.libs/libgncmod-gnome-utils.so ../../src/app-utils/.libs/libgncmod-app-utils.so ../../src/gnc-module/.libs/libgnc-module.so -L/usr/lib64 /usr/lib64/libguile.so /usr/lib64/libgmp.so -lcrypt /usr/lib64/libltdl.so /usr/lib64/libgnomeui-2.so /usr/lib64/libSM.so /usr/lib64/libICE.so /usr/lib64/libbonoboui-2.so /usr/lib64/libgnomevfs-2.so /usr/lib64/libgnomecanvas-2.so /usr/lib64/libgnome-2.so /usr/lib64/libpopt.so /usr/lib64/libbonobo-2.so /usr/lib64/libbonobo-activation.so /usr/lib64/libORBit-2.so /usr/lib64/libart_lgpl_2.so /usr/lib64/libgconf-2.so /usr/lib64/libgtk-x11-2.0.so /usr/lib64/libgdk-x11-2.0.so /usr/lib64/libatk-1.0.so /usr/lib64/libgio-2.0.so /usr/lib64/libpangoft2-1.0.so /usr/lib64/libpangocairo-1.0.so /usr/lib64/libgdk_pixbuf-2.0.so /usr/lib64/libcairo.so /usr/lib64/libpng14.so /usr/lib64/libpango-1.0.so /usr/lib64/libfreetype.so /usr/lib64/libfontconfig.so /usr/lib64/libgobject-2.0.so /usr/lib64/libgmodule-2.0.so /usr/lib64/libgthread-2.0.so -lrt /usr/lib64/libglib-2.0.so -lm -pthread -Wl,-rpath -Wl,/usr/lib64/gnucash
/usr/lib64/gnucash/libgncmod-report-gnome.so: undefined reference to `gnc_html_export'
/usr/lib64/gnucash/libgncmod-report-gnome.so: undefined reference to `gnc_html_copy'
/usr/lib64/gnucash/libgncmod-report-gnome.so: undefined reference to `gnc_html_new'
collect2: ld returned 1 exit status


Expected Results:  
should emerge and run normally

emerge --info
Portage 2.1.9.43 (default/linux/amd64/10.0, gcc-4.5.2, glibc-2.13-r2, 2.6.37-gentoo-r2 x86_64)
=================================================================
System uname: Linux-2.6.37-gentoo-r2-x86_64-Intel-R-_Core-TM-2_CPU_6600_@_2.40GHz-with-gentoo-2.0.1
Timestamp of tree: Tue, 15 Mar 2011 14:15:01 +0000
app-shells/bash:     4.2_p7
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.7.1-r1, 3.1.3-r1
dev-util/cmake:      2.8.4
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.7.0
sys-apps/sandbox:    2.5
sys-devel/autoconf:  2.13, 2.68
sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.21.51.0.7
sys-devel/gcc:       4.5.2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.4-r1
sys-devel/make:      3.82
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -fomit-frame-pointer -pipe"
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"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US en"
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="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync21.us.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi addressbook alsa amd64 amr apache2 audiofile avahi avi bash-completion berkdb bzip2 cairo caps cdaudio cddb cdparanoia cdr cdrdao chm cli consolekit cracklib crypt cups curl cxx dbus designer-plugin devicekit djvu dri dts dv dvb dvd dvdr dvdread ebook encode exif fam ffmpeg flac fortran gdbm gif glitz gmp gnome gphoto2 gpm gps graphite gstreamer gtk gtk2 htmlhandbook iconv icu ieee1394 imagemagick imap imlib ipv6 jack java jpeg jpeg2k kpathsea lame lcd lcms ldap libffi libnotify mad marble midi mmap mmx modules mozcalendar mozilla mp3 mudflap multilib musicbrainz ncurses nepomuk nls nodrm nptl nptlonly nsplugin nvidia ofx ogg oggvorbis opencore-amr openexr opengl openmp pam pcre pdf perl png policykit pppd pulseaudio python quicktime readline samba sasl scanner sdl semantic-desktop session slp smp sndfile spell sse sse2 ssl subversion svg sysfs tcltk theora threads tiff tk transparency truetype unicode usb utf8 vcd vim-syntax vorbis wav wavpack wmf x264 xattr xcomposite xine xml xorg xscreensaver xv xvid xvmc zlib" ALSA_CARDS="hda-intel hdsp" 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" CAMERAS="*" 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2011-03-15 15:24:20 UTC
> /usr/lib64/gnucash/libgncmod-report-gnome.so: undefined reference to
> `gnc_html_export'
> /usr/lib64/gnucash/libgncmod-report-gnome.so: undefined reference to
> `gnc_html_copy'
> /usr/lib64/gnucash/libgncmod-report-gnome.so: undefined reference to
> `gnc_html_new'

Looks like it's trying to link against system gnucash instead of the one you are building now.    Try this:

# emerge -C gnucash
# emerge gnucash

Or you can also verify which package file libgncmod-report-gnome.so belongs to, and just uninstall that:

# emerge portage-utils
# qfile libgncmod-report-gnome.so

Either way, this looks like a valid bug... It shouldn't be linking to system gnucash but the copy in $WORKDIR instead.
Comment 2 Gilles Dartiguelongue (RETIRED) gentoo-dev 2011-03-15 15:50:35 UTC
Guess my patch work from 2.4.0 didn't get fully ported to 2.4.4 :(
Comment 3 Chris Smith 2011-03-15 16:24:29 UTC
(In reply to comment #1)
> Looks like it's trying to link against system gnucash instead of the one you
> are building now.    Try this:
> 
> # emerge -C gnucash
> # emerge gnucash

Different failure:

libtool: install: /usr/bin/install -c .libs/libgnc-backend-xml-utils.lai /var/tmp/portage/app-office/gnucash-2.4.4/image//usr/lib64/libgnc-backend-xml-utils.la
libtool: install: warning: remember to run `libtool --finish /usr/lib64'
make[5]: Leaving directory `/var/tmp/portage/app-office/gnucash-2.4.4/work/gnucash-2.4.4/src/backend/xml'
make[4]: *** [install-am] Error 2
Comment 4 Chris Smith 2011-03-15 16:41:17 UTC
(In reply to comment #3)
> (In reply to comment #1)
> > Looks like it's trying to link against system gnucash instead of the one you
> > are building now.    Try this:
> > 
> > # emerge -C gnucash
> > # emerge gnucash
> 
> Different failure:
> 
> libtool: install: /usr/bin/install -c .libs/libgnc-backend-xml-utils.lai
> /var/tmp/portage/app-office/gnucash-2.4.4/image//usr/lib64/libgnc-backend-xml-utils.la
> libtool: install: warning: remember to run `libtool --finish /usr/lib64'
> make[5]: Leaving directory
> `/var/tmp/portage/app-office/gnucash-2.4.4/work/gnucash-2.4.4/src/backend/xml'
> make[4]: *** [install-am] Error 2

Can work around this with -j1 (but shouldn't have to).
Comment 5 Rafał Mużyło 2011-03-15 17:03:20 UTC
As for comment 3: you've failed to paste the actual error.

Attach full build log and config.log of original problem.

Most likely, one of Makefile.am has wrong linking order.
Comment 6 Gilles Dartiguelongue (RETIRED) gentoo-dev 2011-03-15 17:11:49 UTC
Please use another bug report for parallel build failure as it clearly isn't the same thing as the summary of this one, thanks.
Comment 7 Rafał Mużyło 2011-03-15 17:15:26 UTC
After looking briefly at a few  of Makefile.am, I'd say first suspect would be src/libqof/qof/Makefile.am - seems moving $(top_builddir)/lib/libc/libc-missing.la to the front of the list could help.
Comment 8 Bogo Mipps 2011-03-16 01:52:01 UTC
Same problem for me on amd64.  Here are actual errors in my case:

/usr/lib64/gnucash/libgncmod-report-gnome.so: undefined reference to `gnc_html_export'
/usr/lib64/gnucash/libgncmod-report-gnome.so: undefined reference to `gnc_html_copy'
/usr/lib64/gnucash/libgncmod-report-gnome.so: undefined reference to `gnc_html_new'

I see you've requested build log from reporter: my emerge info follows, and build log is available if required:

Portage 2.2.0_alpha27 (default/linux/amd64/10.0/desktop, gcc-4.4.5, glibc-2.11.3-r0, 2.6.36-gentoo-r5 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.36-gentoo-r5-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4400+-with-gentoo-2.0.1
Timestamp of tree: Tue, 15 Mar 2011 22:15:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.6.6-r2
dev-util/cmake:      2.8.4
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.7.0
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.5
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
Repositories: gentoo kde-sunset kde sunrise enlightenment
Installed sets: 
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 sun-bcla-java-vm AdobeFlash-10.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/mnt/nfs_portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --with-bdeps y"
FEATURES="assume-digests binpkg-logs buildpkg distlocks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
FFLAGS=""
GENTOO_MIRRORS="ftp://ftp.swin.edu.au/gentoo ftp://mirror.pacific.net.au/linux/Gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/mnt/nfs_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="/var/tmp"
PORTDIR="/mnt/nfs_portage"
PORTDIR_OVERLAY="/var/lib/layman/kde-sunset /var/lib/layman/kde /var/lib/layman/sunrise /var/lib/layman/enlightenment"
SYNC="rsync://rsync.au.gentoo.org/gentoo-portage"
USE="32bit X a52 aac acl acpi alsa amd64 apache2 berkdb bluetooth branding bzip2 cairo cdr cleartype cli consolekit corefonts cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac gdbm gdu gif git gpm hal iconv jpeg kde lcms ldap libnotify mad mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib mysql ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png policykit postgres ppds pppd python qt3support qt4 readline sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype udev unicode usb vorbis x264 xbase xcb xcomposite xml xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="hda-intel" 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" CAMERAS="canon ptp2" 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="keyboard mouse evdev" 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="nvidia" 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, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 9 Gilles Dartiguelongue (RETIRED) gentoo-dev 2011-03-16 12:45:39 UTC
*** Bug 359141 has been marked as a duplicate of this bug. ***
Comment 10 Juergen Rose 2011-03-19 13:25:14 UTC
I had the same issue. And 

# emerge -C gnucash
# emerge gnucash

solved the issue.
Comment 11 Fred Krogh 2011-03-19 14:44:52 UTC
(In reply to comment #10)
> I had the same issue. And 
> 
> # emerge -C gnucash
> # emerge gnucash
> 
> solved the issue.

This failed when I tried it earlier.  But now it works.
Comment 12 Adrian Bassett 2011-03-19 14:52:01 UTC
> This failed when I tried it earlier.  But now it works.

This was my experience, too.
Comment 13 Bogo Mipps 2011-03-21 01:20:06 UTC
Same for me ...
Comment 14 Zeno Davatz 2011-03-28 15:09:10 UTC
Same for me.

# emerge -C gnucash
# emerge gnucash

solved the issue.
Comment 15 Rafał Mużyło 2011-04-07 20:46:24 UTC
*** Bug 362519 has been marked as a duplicate of this bug. ***
Comment 16 Rob 2011-04-10 18:50:04 UTC
(In reply to comment #10)
> I had the same issue. And 
> 
> # emerge -C gnucash
> # emerge gnucash
> 
> solved the issue.

Same issue and solution here.
Comment 17 Gilles Dartiguelongue (RETIRED) gentoo-dev 2011-04-19 06:48:48 UTC
+*gnucash-2.4.5 (19 Apr 2011)
+
+  19 Apr 2011; Gilles Dartiguelongue <eva@gentoo.org> +gnucash-2.4.5.ebuild,
+  +files/gnucash-2.4.5-link-system-libs.patch:
+  Version bump. Fix linking against already installed gnucash libraries, bug
+  #359033.
+

Thanks for reporting. If the problem persists, please open a new bug report
with emerge --info and full build.log.