Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 408303 - media-gfx/imageworsener-0.9.8 - ./.libs/libimageworsener.so: undefined reference to `{ceil,sin,exp,cos,pow,floor}'
Summary: media-gfx/imageworsener-0.9.8 - ./.libs/libimageworsener.so: undefined refere...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Samuli Suominen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: underlinking
  Show dependency tree
 
Reported: 2012-03-15 10:06 UTC by Piotr Szymaniak
Modified: 2014-03-27 12:12 UTC (History)
1 user (show)

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


Attachments
Build.log (Build.log,15.89 KB, text/plain)
2012-03-15 10:06 UTC, Piotr Szymaniak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Szymaniak 2012-03-15 10:06:51 UTC
Created attachment 305459 [details]
Build.log

libtool: compile:  i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -Os -march=pentium4 -pipe -fomit-frame-pointer -c src/imagew-main.c -o src/imagew-main.o >/dev/null 2>&1
/bin/sh ./libtool --tag=CC   --mode=link i686-pc-linux-gnu-gcc  -Os -march=pentium4 -pipe -fomit-frame-pointer -release 0.9.8 -Wl,-O1 -Wl,--as-needed -o libimageworsener.la -rpath /usr/lib src/imagew-api.lo src/imagew-gif.lo src/imagew-miff.lo src/imagew-resize.lo src/imagew-webp.lo src/imagew-bmp.lo src/imagew-jpeg.lo src/imagew-opt.lo src/imagew-tiff.lo src/imagew-zlib.lo src/imagew-main.lo src/imagew-png.lo src/imagew-util.lo  -lz
libtool: link: i686-pc-linux-gnu-gcc -shared  -fPIC -DPIC  src/.libs/imagew-api.o src/.libs/imagew-gif.o src/.libs/imagew-miff.o src/.libs/imagew-resize.o src/.libs/imagew-webp.o src/.libs/imagew-bmp.o src/.libs/imagew-jpeg.o src/.libs/imagew-opt.o src/.libs/imagew-tiff.o src/.libs/imagew-zlib.o src/.libs/imagew-main.o src/.libs/imagew-png.o src/.libs/imagew-util.o   -lz  -Os -march=pentium4 -Wl,-O1 -Wl,--as-needed   -Wl,-soname -Wl,libimageworsener-0.9.8.so -o .libs/libimageworsener-0.9.8.so
libtool: link: (cd ".libs" && rm -f "libimageworsener.so" && ln -s "libimageworsener-0.9.8.so" "libimageworsener.so")
libtool: link: i686-pc-linux-gnu-ar cru .libs/libimageworsener.a  src/imagew-api.o src/imagew-gif.o src/imagew-miff.o src/imagew-resize.o src/imagew-webp.o src/imagew-bmp.o src/imagew-jpeg.o src/imagew-opt.o src/imagew-tiff.o src/imagew-zlib.o src/imagew-main.o src/imagew-png.o src/imagew-util.o
libtool: link: i686-pc-linux-gnu-ranlib .libs/libimageworsener.a
libtool: link: ( cd ".libs" && rm -f "libimageworsener.la" && ln -s "../libimageworsener.la" "libimageworsener.la" )
/bin/sh ./libtool --tag=CC   --mode=link i686-pc-linux-gnu-gcc  -Os -march=pentium4 -pipe -fomit-frame-pointer  -Wl,-O1 -Wl,--as-needed -o imagew src/imagew-cmd.o libimageworsener.la -lz
libtool: link: i686-pc-linux-gnu-gcc -Os -march=pentium4 -pipe -fomit-frame-pointer -Wl,-O1 -Wl,--as-needed -o .libs/imagew src/imagew-cmd.o  ./.libs/libimageworsener.so -lz
./.libs/libimageworsener.so: undefined reference to `ceil'
./.libs/libimageworsener.so: undefined reference to `sin'
./.libs/libimageworsener.so: undefined reference to `exp'
./.libs/libimageworsener.so: undefined reference to `cos'
./.libs/libimageworsener.so: undefined reference to `pow'
./.libs/libimageworsener.so: undefined reference to `floor'
collect2: ld returned 1 exit status
make[1]: *** [imagew] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-gfx/imageworsener-0.9.8/work/imageworsener-0.9.8'
make: *** [all] Error 2
 * ERROR: media-gfx/imageworsener-0.9.8 failed (compile phase):
 *   emake failed
Comment 1 Piotr Szymaniak 2012-03-15 10:07:11 UTC
Portage 2.2.0_alpha90 (default/linux/x86/10.0, gcc-4.6.2, glibc-2.14.1-r2, 3.2.7 i686)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.2.7-i686-Intel-R-_Pentium-R-_4_CPU_2.60GHz-with-gentoo-2.1
Timestamp of tree: Tue, 13 Mar 2012 22:45:01 +0000
distcc 3.1 i686-pc-linux-gnu [disabled]
ccache version 3.1.7 [disabled]
app-shells/bash:          4.2_p24
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/ccache:          3.1.7
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.9.3
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.3
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.2
sys-devel/gcc-config:     1.5.1
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.2-r1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r2
Repositories: gentoo roslin neurogeek
Installed sets:
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=pentium4 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-Os -march=pentium4 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.ift.uni.wroc.pl/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/root/roslin /root/neurogeek"
SYNC="rsync://rsync1.pl.gentoo.org/gentoo-portage"
USE="acl berkdb bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv ipv6 modules mudflap nls nptl nptlonly openmp pam pcre pppd readline session ssl sysfs tcpd unicode x86 xorg 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" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="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" LINGUAS="en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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 2 Piotr Szymaniak 2012-03-15 10:07:24 UTC
[ebuild  N    ] media-gfx/imageworsener-0.9.8  USE="zlib -jpeg -png -test -webp"
Comment 3 Sebastian Pipping gentoo-dev 2012-03-15 20:33:09 UTC
Thanks for reporting! Should be fixed now.

+  15 Mar 2012; Sebastian Pipping <sping@gentoo.org> imageworsener-0.9.8.ebuild,
+  +files/imageworsener-0.9.8-libm.patch:
+  Fix underlinking, reported by Piotr Szymaniak (bug #408303)
+
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2012-03-15 20:43:37 UTC
> Index: imageworsener-0.9.8-libm.patch
> ===================================================================
> --- Makefile.am	2012-03-15 21:25:45.539774759 +0100
> +++ Makefile.am	2012-03-15 21:25:32.090942892 +0100
> @@ -1,6 +1,6 @@
>   lib_LTLIBRARIES=libimageworsener.la
>   libimageworsener_la_SOURCES=src/imagew-api.c src/imagew-gif.c  src/imagew-miff.c src/imagew-resize.c src/imagew-webp.c src/imagew-bmp.c  src/imagew-jpeg.c src/imagew-opt.c src/imagew-tiff.c src/imagew-zlib.c  src/imagew-main.c src/imagew-png.c src/imagew-util.c
> -libimageworsener_la_LDFLAGS=-release 0.9.8
> +libimageworsener_la_LDFLAGS=-lm -release 0.9.8

libraries don't belong to LDFLAGS, you want something like:

libimageworsener_la_LIBADD=-lm

instead
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2012-03-15 20:45:07 UTC
"While using autotools, the dependent library has to be checked in the configure (this should already be the case to specify the dependencies in the pkg-config data file or in the script provided) and then the variable carrying this value should be added to the LIBADD variable for the library to be built."

From http://www.gentoo.org/proj/en/qa/asneeded.xml
Comment 6 Sebastian Pipping gentoo-dev 2012-03-15 20:55:28 UTC
+  15 Mar 2012; Sebastian Pipping <sping@gentoo.org>
+  files/imageworsener-0.9.8-libm.patch:
+  Use _LIBADD rather than _LDFLAGS as advised by Samuli (bug #408303, comment
+  4)
+

Updated patch sent to upstream, too.
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2012-03-15 21:02:36 UTC
thanks, that will work but however is not portable.   since you are pushing this to upstream you might want to convert this to:

configure.ac:

AC_CHECK_LIB([m], [cos], LIBM="-lm")
AC_SUBST([LIBM])

followed by Makefile.am entry of:

libimageworsener_la_LIBADD=$(LIBM)
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2012-03-15 21:03:27 UTC
(In reply to comment #7)
> thanks, that will work but however is not portable.   since you are pushing
> this to upstream you might want to convert this to:
> 
> configure.ac:
> 
> AC_CHECK_LIB([m], [cos], LIBM="-lm")
> AC_SUBST([LIBM])
> 
> followed by Makefile.am entry of:
> 
> libimageworsener_la_LIBADD=$(LIBM)

... because there are systems where mathlib is actually part of the libc and the functions are inside of it, and there is no separate libm
Comment 9 Sebastian Pipping gentoo-dev 2012-03-15 21:12:38 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > thanks, that will work but however is not portable.   since you are pushing
> > this to upstream you might want to convert this to:
> > 
> > configure.ac:
> > 
> > AC_CHECK_LIB([m], [cos], LIBM="-lm")
> > AC_SUBST([LIBM])
> > 
> > followed by Makefile.am entry of:
> > 
> > libimageworsener_la_LIBADD=$(LIBM)

Wouldn't that need to be ...=@LIBM@, instead ?

> 
> ... because there are systems where mathlib is actually part of the libc and
> the functions are inside of it, and there is no separate libm

Please take of the next round.  I'll happily communicate with upstream after.
Comment 10 Sebastian Pipping gentoo-dev 2012-03-15 21:13:03 UTC
-of +over