Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 163559 - app-text/poppler-0.5.4 fails due to missing libm with w/ uclibc++
Summary: app-text/poppler-0.5.4 fails due to missing libm with w/ uclibc++
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-24 07:32 UTC by Natanael Copa
Modified: 2008-08-24 13:22 UTC (History)
2 users (show)

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


Attachments
poppler-0.5.4-libm.patch (poppler-0.5.4-libm.patch,785 bytes, patch)
2007-10-15 08:27 UTC, Natanael Copa
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Natanael Copa 2007-01-24 07:32:58 UTC
When compiling poppler with uclibc the linker fails.

Reproducible: Always

Steps to Reproduce:
1. set CXX=g++-uc in /etc/make.conf to use uclibc++.
2. emerge poppler
3.

Actual Results:  
/bin/sh ../libtool --tag=CXX --mode=link g++-uc  -Wall -Wno-unused -Os -pipe   -o pdffonts  pdffonts.o parseargs.o ../poppler/libpoppler.la  -lz 
/bin/sh ../libtool --tag=CXX --mode=link g++-uc  -Wall -Wno-unused -Os -pipe   -o pdfimages  pdfimages.o ImageOutputDev.o parseargs.o ../poppler/libpoppler.la  -lz 
mkdir .libs
HtmlOutputDev.cc: In member function `void HtmlPage::dumpAsXML(FILE*, int)':
HtmlOutputDev.cc:584: warning: 'str1' might be used uninitialized in this function
g++-uc -Wall -Wno-unused -Os -pipe -o .libs/pdffonts pdffonts.o parseargs.o  ../poppler/.libs/libpoppler.so /usr/lib/libjpeg.so /usr/lib/libfontconfig.so /usr/lib/libfreetype.so /usr/lib/libexpat.so -lz
g++-uc -Wall -Wno-unused -Os -pipe -o .libs/pdfimages pdfimages.o ImageOutputDev.o parseargs.o  ../poppler/.libs/libpoppler.so /usr/lib/libjpeg.so /usr/lib/libfontconfig.so /usr/lib/libfreetype.so /usr/lib/libexpat.so -lz
../poppler/.libs/libpoppler.so: undefined reference to `fabs'
../poppler/.libs/libpoppler.so: undefined reference to `log'
../poppler/.libs/libpoppler.so: undefined reference to `sqrt'
../poppler/.libs/libpoppler.so: undefined reference to `ceil'
../poppler/.libs/libpoppler.so: undefined reference to `floor'
../poppler/.libs/libpoppler.so: undefined reference to `cos'
../poppler/.libs/libpoppler.so: undefined reference to `sin'
../poppler/.libs/libpoppler.so: undefined reference to `atan2'
../poppler/.libs/libpoppler.so: undefined reference to `pow'
../poppler/.libs/libpoppler.so: undefined reference to `log10'
../poppler/.libs/libpoppler.so: undefined reference to `acos'
collect2: ld returned 1 exit status
make[2]: *** [pdfimages] Error 1
make[2]: *** Waiting for unfinished jobs....
HtmlOutputDev.cc: In member function `void HtmlPage::dumpComplex(FILE*, int)':
HtmlOutputDev.cc:668: warning: 'str1' might be used uninitialized in this function
../poppler/.libs/libpoppler.so: undefined reference to `fabs'
../poppler/.libs/libpoppler.so: undefined reference to `log'
../poppler/.libs/libpoppler.so: undefined reference to `sqrt'
../poppler/.libs/libpoppler.so: undefined reference to `ceil'
../poppler/.libs/libpoppler.so: undefined reference to `floor'
../poppler/.libs/libpoppler.so: undefined reference to `cos'
../poppler/.libs/libpoppler.so: undefined reference to `sin'
../poppler/.libs/libpoppler.so: undefined reference to `atan2'
../poppler/.libs/libpoppler.so: undefined reference to `pow'
../poppler/.libs/libpoppler.so: undefined reference to `log10'
../poppler/.libs/libpoppler.so: undefined reference to `acos'
collect2: ld returned 1 exit status
make[2]: *** [pdffonts] Error 1
make[2]: Leaving directory `/var/tmp/portage/poppler-0.5.4/work/poppler-0.5.4/utils'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/poppler-0.5.4/work/poppler-0.5.4'
make: *** [all] Error 2

!!! ERROR: app-text/poppler-0.5.4 failed.


Expected Results:  
Successful compile

Workaround:

LDFLAGS=-lm emerge --oneshot poppler
Comment 1 Natanael Copa 2007-01-24 07:33:48 UTC
I forgot the emerge info:

Portage 2.1.1-r2 (uclibc/x86/hardened, gcc-3.4.6, uclibc-0.9.28-r2, 2.6.19-gentoo-r4 i686)
=================================================================
System uname: 2.6.19-gentoo-r4 i686 Intel(R) Pentium(R) D CPU 3.00GHz
Gentoo Base System version 1.12.6
Last Sync: Wed, 24 Jan 2007 06:30:01 +0000
distcc 2.18.3 i386-gentoo-linux-uclibc (protocols 1 and 2) (default port 3632) [disabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i386-gentoo-linux-uclibc"
CFLAGS="-march=i386 -Os -pipe -fomit-frame-pointer"
CHOST="i386-gentoo-linux-uclibc"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/bind /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-Os -pipe"
DISTDIR="/var/cache/distfiles"
FEATURES="autoconfig buildpkg distlocks metadata-transfer nodoc noinfo noman sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/var/cache/packages/default"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/alpine-portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X509 alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol bitmap-fonts bri bzip2 cli cracklib dlloader dri elibc_uclibc encode expat extensions hardened input_devices_evdev input_devices_keyboard input_devices_mouse iproute2 ipv6 jpeg kernel_linux lcd_devices_bayrad lcd_devices_cfontz lcd_devices_cfontz633 lcd_devices_glk lcd_devices_hd44780 lcd_devices_lb216 lcd_devices_lcdm001 lcd_devices_mtxorb lcd_devices_ncurses lcd_devices_text lua mad minimal misdn_cards_avmfritz misdn_cards_hfcmulti misdn_cards_hfcpci misdn_cards_hfcsmini misdn_cards_hfcsusb misdn_cards_netjetpci misdn_cards_sedlfax misdn_cards_w6692pci misdn_cards_xhfc ncurses netboot ntfs ogg oss pci pcmcia pic png pppd pri readline reflection rrdtool sensord session snmp speex spl ssl tdb truetype truetype-fonts type1-fonts uclibc uclibc++ udev usb userland_GNU userlocales video_cards_apm video_cards_ark video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_epson video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i740 video_cards_i810 video_cards_imstt video_cards_mach64 video_cards_mga video_cards_neomagic video_cards_nsc video_cards_nv video_cards_r128 video_cards_radeon video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb 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_voodoo winbind wordexp xorg zaptel zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 2 solar (RETIRED) gentoo-dev 2007-01-24 15:31:57 UTC
poppler merges fine under uClibc. 
Perhaps it's related to the use of uClibc++ vs uClibc alone.

uClibc ~ # qfile libm.so -v
sys-libs/uclibc-0.9.28-r2 (/usr/lib/libm.so)

uClibc ~ # qlist -Uve poppler
app-text/poppler-0.5.4 (zlib)
Comment 3 Natanael Copa 2007-01-24 15:36:17 UTC
can you try:

CXX=g++-uc emerge poppler
Comment 4 solar (RETIRED) gentoo-dev 2007-01-24 15:44:00 UTC
<psm> that is a usual failure with uClibc++, nothing specific to this package
<psm> libstdc++ is linked against libm.so, but libuClibc++.so not, there are many packages that need -lm
<psm> it is rather laziness of app's developer not adding explicitely -lm, if he uses libm functions
<psm> this bug should be probably converted into some generic uClibc++/libm tracker
<psm> live,evas,kaffe,dbh,tcc,faac,libmp4v2,musicbrainz are others
Comment 5 SpanKY gentoo-dev 2007-09-15 00:55:51 UTC
poppler needs fixing to link against libm
Comment 6 Stefan Schweizer (RETIRED) gentoo-dev 2007-10-14 15:21:05 UTC
Sorry, I do not have uclibc at the moment. Feel free to apply a patch if you got one :)
Comment 7 Natanael Copa 2007-10-15 08:27:27 UTC
Created attachment 133517 [details, diff]
poppler-0.5.4-libm.patch

Correct way to handle libm. I haven't managed to get eautoreconf to work, even if it works fine to just run auroreconf in $S.
Comment 8 Natanael Copa 2007-10-15 08:34:48 UTC
fwiw. problem seems to be solved in poppler-0.6.1
Comment 9 Peter Alfredsen (RETIRED) gentoo-dev 2008-08-24 13:22:31 UTC
This is reported to be fixed with newer poppler and poppler-0.5.4 is no longer in tree, closing.