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

Bug 601070

Summary: media-libs/jasper-2.0.0 with ld.gold - ../libjasper/libjasper.so.4.0.0: error: undefined reference to 'pow'
Product: Gentoo Linux Reporter: Jan-Matthias Braun <jan_braun>
Component: Current packagesAssignee: Gentoo Science Related Packages <sci>
Status: RESOLVED FIXED    
Severity: normal CC: ansla80, esigra, gentoo, ivanhoe
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 269315    
Attachments: jasper-2.0.0-add_libm.patch
ebuild-patch to include the source code patch.
full build.log on amd64
Full build log

Description Jan-Matthias Braun 2016-11-28 12:42:53 UTC
In my multilib environment, the emerge stops in the 32 bit stage with missing symbols sqrt and pow.
Comment 1 Jan-Matthias Braun 2016-11-28 12:44:03 UTC
Created attachment 454590 [details, diff]
jasper-2.0.0-add_libm.patch
Comment 2 Jan-Matthias Braun 2016-11-28 12:44:33 UTC
Created attachment 454592 [details, diff]
ebuild-patch to include the source code patch.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2016-11-28 13:14:33 UTC
1) Please attach the entire build log to this bug report.
2) Please post your `emerge --info media-libs/jasper` output in a comment.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2016-11-28 13:17:51 UTC

*** This bug has been marked as a duplicate of bug 601068 ***
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2016-11-28 13:37:41 UTC
I have tried this with all combinations of USE flags and in every case -lm is already added. So we really do need your build log and `emerge --info` output.
Comment 6 Matt Whitlock 2016-11-28 17:17:53 UTC
Created attachment 454602 [details]
full build.log on amd64

I am also seeing this failure, but I am compiling only for amd64 (no other ABIs).

Strangely, -lm seems to be specified on the link command line, yet the undefined references are still reported:

[ 93%] Linking C executable jiv
cd /var/tmp/portage/media-libs/jasper-2.0.0/work/jasper-2.0.0-abi_x86_64.amd64/src/appl && /usr/bin/cmake -E cmake_link_script CMakeFiles/jiv.dir/link.txt --verbose=1
/usr/bin/x86_64-pc-linux-gnu-gcc  -march=native -O3 -ggdb -pipe  -Wl,-O2 -Wl,--as-needed CMakeFiles/jiv.dir/jiv.c.o  -o jiv -Wl,-rpath,/var/tmp/portage/media-libs/jasper-2.0.0/work/jasper-2.0.0-abi_x86_64.amd64/src/libjasper: -rdynamic ../libjasper/libjasper.so.4.0.0 -ljpeg -lGLU -lGL -lglut -lXmu -lXi -lm
../libjasper/libjasper.so.4.0.0: error: undefined reference to 'pow'
../libjasper/libjasper.so.4.0.0: error: undefined reference to 'sqrt'
collect2: error: ld returned 1 exit status
make[2]: *** [src/appl/CMakeFiles/jiv.dir/build.make:102: src/appl/jiv] Error 1
make[2]: Leaving directory '/var/tmp/portage/media-libs/jasper-2.0.0/work/jasper-2.0.0-abi_x86_64.amd64'
make[1]: *** [CMakeFiles/Makefile2:1080: src/appl/CMakeFiles/jiv.dir/all] Error 2
make[1]: Leaving directory '/var/tmp/portage/media-libs/jasper-2.0.0/work/jasper-2.0.0-abi_x86_64.amd64'
make: *** [Makefile:161: all] Error 2
Comment 7 Matt Whitlock 2016-11-28 17:22:58 UTC
[ebuild  r  U ] media-libs/jasper-2.0.0 [1.900.26] USE="jpeg opengl (-static-libs%)" ABI_X86="(64) -32 -x32" 


Portage 2.3.2 (python 2.7.12-final-0, default/linux/amd64/13.0/desktop/plasma, gcc-5.4.0, glibc-2.23-r3, 4.8.11-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.8.11-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.3
KiB Mem:     8165852 total,   1589048 free
KiB Swap:    8388604 total,   8388328 free
Timestamp of repository gentoo: Mon, 28 Nov 2016 16:00:01 +0000
sh dash 0.5.9.1-r1
ld GNU gold (Gentoo 2.27 p1.0 2.27) 1.12
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
ccache version 3.3.3 [disabled]
app-shells/bash:          4.4_p5-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/ccache:          3.3.3::gentoo
dev-util/cmake:           3.7.0::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.22.4::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.27::gentoo
sys-devel/gcc:            5.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.8::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

local
    location: /usr/local/portage/overlay
    masters: gentoo
    priority: -2000

bitcoin
    location: /var/lib/layman/bitcoin
    sync-type: laymansync
    sync-uri: https://gitlab.com/bitcoin/gentoo.git
    masters: gentoo
    priority: -1500

fw-overlay
    location: /var/lib/layman/fw-overlay
    sync-type: laymansync
    sync-uri: https://github.com/no-hope/fw-overlay.git
    masters: gentoo
    priority: -1500

kde
    location: /var/lib/layman/kde
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/proj/kde.git
    masters: gentoo
    priority: -1500

vmware
    location: /var/lib/layman/vmware
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/vmware.git
    masters: gentoo
    priority: -1500

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

lbry
    location: /usr/local/portage/overlays/lbry
    sync-type: git
    sync-uri: https://github.com/lbryio/lbry-gentoo-overlay.git
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O3 -ggdb -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/X11/xkb /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/yp/Makefile"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dbus-1 /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O3 -ggdb -pipe"
DISTDIR="/usr/local/portage/distfiles"
EMERGE_DEFAULT_OPTS="--nospinner --unordered-display --usepkg"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.leaseweb.com/gentoo/ http://mirrors.rit.edu/gentoo/ http://mirror.lug.udel.edu/pub/gentoo/ http://gentoo.mirrors.pair.com/ http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O2 -Wl,--as-needed"
MAKEOPTS=""
PKGDIR="/usr/local/portage/packages"
PORTAGE_COMPRESS="xz"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acpi alsa amd64 berkdb branding bzip2 cairo cdda cdparanoia cdr cli consolekit cracklib crypt cups curl cxx dbus declarative dri dts dvd dvdr emboss encode exif fam ffmpeg firefox flac fontconfig gdbm gif git glamor gmp gstreamer gtk iconv icu ipv6 java jpeg kde kipi lame lcms libnotify libsamplerate lzma mad matroska mmx mmxext mng modules mp3 mp4 mpeg multilib mysql ncurses nptl nsplugin ogg opengl openmp pango pcre pdf phonon php plasma png policykit ppds qml qt3support qt4 qt5 quicktime readline sdl seccomp session smp spell sse sse2 ssl startup-notification subversion svg taglib tcmalloc theora threads tiff truetype udev udisks unicode upower usb v4l vaapi vdpau vnc vorbis vpx webkit widgets x264 xcb xcomposite xml xscreensaver xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3" 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 ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en-US en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_US en" LIRC_DEVICES="mceusb" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="arm" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="amdgpu radeon radeonsi" 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:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 8 Jan-Matthias Braun 2016-11-28 23:20:20 UTC
[ebuild   R    ] media-libs/jasper-2.0.0-r2:0/4::private  USE="jpeg opengl" ABI_X86="32 (64) (-x32)" 0 KiB

emerge --info:

Portage 2.3.2 (python 2.7.12-final-0, default/linux/amd64/13.0/desktop/plasma, gcc-6.2.0, glibc-2.23-r3, 4.8.11 x86_64)
=================================================================
System uname: Linux-4.8.11-x86_64-Intel-R-_Core-TM-_i5-3320M_CPU_@_2.60GHz-with-gentoo-2.3
KiB Mem:    16360700 total,   5858760 free
KiB Swap:   12582908 total,  12582908 free
Timestamp of repository gentoo: Mon, 28 Nov 2016 11:45:01 +0000
sh bash 4.4_p5-r1
ld GNU gold (Gentoo 2.27 p1.0 2.27) 1.12
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.4_p5-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo, 3.5.2::gentoo
dev-util/cmake:           3.7.0::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.22.4::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.27::gentoo
sys-devel/gcc:            6.2.0-r1::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.8::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: -O --quiet

Crossdev-helper-overlay
    location: /var/lib/overlays/crossdev
    masters: gentoo private
    priority: 50

kde
    location: /var/lib/layman/kde
    sync-type: git
    sync-uri: git://anongit.gentoo.org/proj/kde.git
    masters: gentoo
    priority: 50

private
    location: /var/lib/overlays/jb
    masters: gentoo
    priority: 100

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 sun-bcla-java-vm googleearth Q3AEULA Google-TOS AdobeFlash-11.x Intel-SDP skype-4.0.0.7-copyright OPERA-2014 RAR"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mtune=native -O3 -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0"
CONFIG_PROTECT_MASK="/etc/angband/gamedata/ /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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 -mtune=native -O3 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --jobs=2 --quiet-build --quiet-fail --ignore-built-slot-operator-deps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs cgroup compressdebug config-protect-if-modified distlocks fixlafiles merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp6.gwdg.de/pub/linux/gentoo/ http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://de-mirror.org/gentoo/ http://ftp.halifax.rwth-aachen.de/gentoo/"
LANG="C"
LC_ALL="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/var/tmp/binpkgs/"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="-O --quiet"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac aalib acl acpi alsa amd64 assistant audiofile avahi ayatana bash-completion bluetooth branding bzip2 c++0x cairo caps cdda cddb cdr cleartype_hinting cli cmake colord consolekit cracklib crash-reporter crossdev crypt cryptsetup cscope css cups curl cxx dbus declarative detex device-mapper dhclient dirac djvu dmx dnotify dpi dri dri3 dts dv dvb dvd dvdnav dvdr dvi2tty dvipdfm egl embedded emboss encode eps epspdf epub exceptions exif extra extras faac fam ffmpeg fftw firefox flac fontconfig foomaticdb fortran gdbm gif gimp git glamor gles gnutls gold gphoto2 gpm gps harfbuzz hdri highlight hwloc iconv icu id3tag imagemagick inotify introspection iproute2 ipv6 jbig joystick jpeg jpeg2k kde kipi ktp lame lapack laptop lastfm latex lcms libedit libmount libnotify libsysfs libv4l libv4l2 lto lzma lzo mad matroska metapost midi mjpeg mmap mmx mmxext mng modules mp3 mp4 mpeg mplayer mtp multilib musepack musicbrainz ncurses network network-cron networkmanager nls nptl ntp nut ofa offensive ogg openal opencl openexr opengl openmp orc otr pam pch pcre pcsc-lite pdf phonon plasma pm-utils png pnm policykit postproc postscript ppds pstricks pvr python qml qt3support qt4 qt5 raw readline rss scanner schroedinger sddm sdl sdl2 seccomp semantic-desktop session shm sift skype smartcard smp sndfile socks socks5 sound sox speex spell sql sse sse2 ssl startup-notification subversion svg swat syslog system-boost system-cairo system-ffmpeg system-harfbuzz system-icu system-jpeg system-jsoncpp system-libevent system-libvpx system-qt system-sqlite system-tbb t1lib taglib tcpd telepathy tex4ht theora threads tiff tls touchpad truetype twolame udev udf udisks unicode upnp upower usb v4l vaapi vcd vcdx vdpau video vorbis vpx vulkan wavpack wayland webkit webp widgets wifi win32codecs wmf x264 x265 xattr xcb xcomposite xetex xft xine xinerama xml xmp xnest xpm xrandr xscreensaver xv xvid zeroconf zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 sheets stage tables krita karbon braindump author" CAMERAS="ptp2 canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" DVB_CARDS="usb-dib0700" 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 ublox ubx" INPUT_DEVICES="synaptics evdev mtrack joystick" KERNEL="linux" L10N="de en en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en en_GB" LIRC_DEVICES="inputlirc devinput" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4 python3_5" RUBY_TARGETS="ruby23" SANE_BACKENDS="plustek genesys" USERLAND="GNU" VIDEO_CARDS="nvidia intel i965 modesetting 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"
USE_PYTHON="2.7"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 9 Jan-Matthias Braun 2016-11-28 23:21:58 UTC
Created attachment 454646 [details, diff]
Full build log

make[2]: Entering directory '/var/tmp/portage/media-libs/jasper-2.0.0-r1/work/jasper-2.0.0-abi_x86_32.x86'
[ 95%] Built target imgcmp
[ 96%] Building C object src/appl/CMakeFiles/imginfo.dir/imginfo.c.o
cd /var/tmp/portage/media-libs/jasper-2.0.0-r1/work/jasper-2.0.0-abi_x86_32.x86/src/appl && /usr/bin/x86_64-pc-linux-gnu-gcc  -m32  -I/var/tmp/portage/media-libs/jasper-2.0.0-r1/work/jasper-2.0.0-abi_x86_32.x86/src/libjasper/include -I/var/tmp/portage/media-libs/jasper-2.0.0-r1/work/jasper-2.0.0/src/libjasper/include   -DNDEBUG -march=native -mtune=native -O3 -fomit-frame-pointer -pipe   -std=gnu11 -o CMakeFiles/imginfo.dir/imginfo.c.o -c /var/tmp/portage/media-libs/jasper-2.0.0-r1/work/jasper-2.0.0/src/appl/imginfo.c
[ 98%] Linking C executable jiv
cd /var/tmp/portage/media-libs/jasper-2.0.0-r1/work/jasper-2.0.0-abi_x86_32.x86/src/appl && /usr/bin/cmake -E cmake_link_script CMakeFiles/jiv.dir/link.txt --verbose=1
/usr/bin/x86_64-pc-linux-gnu-gcc  -m32 -march=native -mtune=native -O3 -fomit-frame-pointer -pipe  -Wl,-O1 -Wl,--as-needed CMakeFiles/jiv.dir/jiv.c.o  -o jiv -Wl,-rpath,/var/tmp/portage/media-libs/jasper-2.0.0-r1/work/jasper-2.0.0-abi_x86_32.x86/src/libjasper: -rdynamic ../libjasper/libjasper.so.4.0.0 -ljpeg -lGLU -lGL -lglut -lXmu -lXi -lm 
../libjasper/libjasper.so.4.0.0: error: undefined reference to 'pow'
../libjasper/libjasper.so.4.0.0: error: undefined reference to 'sqrt'
collect2: error: ld returned 1 exit status
make[2]: *** [src/appl/CMakeFiles/jiv.dir/build.make:102: src/appl/jiv] Error 1
make[2]: Leaving directory '/var/tmp/portage/media-libs/jasper-2.0.0-r1/work/jasper-2.0.0-abi_x86_32.x86'
make[1]: *** [CMakeFiles/Makefile2:1080: src/appl/CMakeFiles/jiv.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] Linking C executable imginfo
cd /var/tmp/portage/media-libs/jasper-2.0.0-r1/work/jasper-2.0.0-abi_x86_32.x86/src/appl && /usr/bin/cmake -E cmake_link_script CMakeFiles/imginfo.dir/link.txt --verbose=1
/usr/bin/x86_64-pc-linux-gnu-gcc  -m32 -march=native -mtune=native -O3 -fomit-frame-pointer -pipe  -Wl,-O1 -Wl,--as-needed CMakeFiles/imginfo.dir/imginfo.c.o  -o imginfo -Wl,-rpath,/var/tmp/portage/media-libs/jasper-2.0.0-r1/work/jasper-2.0.0-abi_x86_32.x86/src/libjasper: -rdynamic ../libjasper/libjasper.so.4.0.0 -ljpeg -lm 
make[2]: Leaving directory '/var/tmp/portage/media-libs/jasper-2.0.0-r1/work/jasper-2.0.0-abi_x86_32.x86'
[100%] Built target imginfo
make[1]: Leaving directory '/var/tmp/portage/media-libs/jasper-2.0.0-r1/work/jasper-2.0.0-abi_x86_32.x86'
make: *** [Makefile:161: all] Error 2
Comment 10 Ivan Iraci 2016-11-29 11:27:53 UTC
I experienced the same problem.

I had to mask jasper-2.0.0.
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2016-11-29 11:34:16 UTC
Comment on attachment 454590 [details, diff]
jasper-2.0.0-add_libm.patch

This shouldn't be needed at all. There should be some (better) way to fix the order in which the ld arguments are listed.
Comment 12 Ivan Iraci 2016-11-29 11:55:52 UTC
Switching from ld.gold tp ld.bfd solves the problem for me.
Comment 13 Jan-Matthias Braun 2016-11-29 12:09:23 UTC
Ha! Thanks. I had so few new ld.gold problems in the past year, that I stopped remembering. Sorry for the noise!
Comment 14 Agostino Sarubbo gentoo-dev 2016-11-29 16:52:04 UTC
A note outside this bugreport.

The jasper's maintainer, mdadams is pretty active on the upstream place where the development happens.
I have already forwarded this bug to him, but if you will experience further bugs, feel free to inform him on github at: https://github.com/mdadams/jasper/issues
Comment 15 Agostino Sarubbo gentoo-dev 2016-11-29 23:28:48 UTC
Could someone try if at this point the 9999 version fixes the issue?
Comment 16 Jan-Matthias Braun 2016-11-30 19:14:01 UTC
(In reply to Agostino Sarubbo from comment #15)
> Could someone try if at this point the 9999 version fixes the issue?

Thanks for your support. I tried to emerge -9999, but it fails with the following messages in aclocal.out:
***** aclocal *****
***** PWD: /var/tmp/portage/media-libs/jasper-9999/work/jasper-9999
***** aclocal

aclocal-1.15: error: 'configure.ac' is required

and jasper uses cmake, as it seems.

When I go into the work dir and call cmake manually, it builds fine.
Comment 17 Agostino Sarubbo gentoo-dev 2016-11-30 19:39:15 UTC
(In reply to Jan-Matthias Braun from comment #16)
> and jasper uses cmake, as it seems.

ok. The point to my question was that upstream added something in the master, but I realized now that the 9999 was not ported to cmake :)
Comment 18 David Seifert gentoo-dev 2016-11-30 20:22:28 UTC
The upstream build system still has a number of FHS violations and other issues. I'll send in a PR soon, but I'm swamped at the moment.
Comment 19 Jan-Matthias Braun 2016-11-30 20:27:48 UTC
Then its time to say thanks everyone!

Cheers,

Jan
Comment 20 Justin Lecher (RETIRED) gentoo-dev 2016-12-03 13:46:22 UTC
commit 1b1bbaacd217d1c9bdeea2f88b52f079fad1c231
Author: Justin Lecher <jlec@gentoo.org>
Date:   Sat Dec 3 12:54:04 2016 +0100

    media-libs/jasper: Fix underlinking detected using ld.gold

    Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=601070

    Package-Manager: portage-2.3.2
    Signed-off-by: Justin Lecher <jlec@gentoo.org>

    https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b1bbaacd217d1c9bdeea2f88b52f079fad1c231