Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 603506 - media-gfx/pqiv-2.6 libraries not found: Didn't recognize file filename,jpg
Summary: media-gfx/pqiv-2.6 libraries not found: Didn't recognize file filename,jpg
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-22 21:11 UTC by Jay Kamat
Modified: 2017-02-23 00:43 UTC (History)
4 users (show)

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


Attachments
output of emerge --info (emergeinfo,6.19 KB, text/plain)
2016-12-22 21:11 UTC, Jay Kamat
Details
build log of emerge pqiv (buildlog,3.06 KB, text/plain)
2016-12-22 21:14 UTC, Jay Kamat
Details
pqiv-2.7.4 info (pqivinfo,6.42 KB, text/plain)
2017-02-18 17:16 UTC, Jay Kamat
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jay Kamat 2016-12-22 21:11:40 UTC
Created attachment 457152 [details]
output of emerge --info

I'm pretty new, so sorry for any mistakes.

When opening images with pqiv on testing (2.6) I get this message:
Didn't recognize file filename.jpg. Both its extension and MIME-type `image/jpeg' are unknown

During the build, several so files are placed in /usr/lib/pqiv. If these so files are moved to /usr/lib, pqiv runs as expected. Adding /usr/lib/pqiv to LD_LIBRARY_PATH also solves this issue.

I think the ebuild needs to be modified to add /usr/lib/pqiv to the library path when installing, but I'm not sure if/how to do this.
Comment 1 Jay Kamat 2016-12-22 21:14:41 UTC
Created attachment 457154 [details]
build log of emerge pqiv
Comment 2 Jay Kamat 2016-12-22 21:15:31 UTC
Portage 2.3.0 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-4.9.4, glibc-2.22-r4, 4.4.26-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.4.26-gentoo-x86_64-Intel-R-_Core-TM-_i7-6700HQ_CPU_@_2.60GHz-with-gentoo-2.3
KiB Mem:    16330916 total,  12936704 free
KiB Swap:   16692220 total,  16692220 free
Timestamp of repository gentoo: Wed, 21 Dec 2016 17:30:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
ccache version 3.2.4 [disabled]
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.22.3_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/ccache:          3.2.4::gentoo
dev-util/cmake:           3.6.3::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.22.4::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.12.6::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.4::gentoo, 5.4.0::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r4::gentoo
Repositories:

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

jm-overlay
    location: /var/lib/layman/jm-overlay
    sync-type: laymansync
    sync-uri: https://github.com/Jannis234/jm-overlay.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    sync-type: laymansync
    sync-uri: git://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

Installed sets: @steam
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/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="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo http://gentoo.osuosl.org/ http://cosmos.illinois.edu/pub/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
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 acl acpi alsa amd64 berkdb bindist bluetooth branding bzip2 cairo cdda cdr cli colord cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk iconv introspection ipv6 jpeg lcms ldap libnotify libsecret mad mmx mmxext mng modules mp3 mp4 mpeg multilib nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 readline sdl seccomp session spell sse sse2 ssl startup-notification svg systemd tcpd tiff tracker truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 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 synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="nvidia intel" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

media-gfx/pqiv-2.6::gentoo was built with the following:
USE="pdf -ffmpeg -imagemagick -libav -postscript" ABI_X86="64"
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2016-12-28 18:20:57 UTC
> media-gfx/pqiv-2.6::gentoo was built with the following:
> USE="pdf -ffmpeg -imagemagick -libav -postscript" ABI_X86="64"

You built it without any support for graphics formats. You would need to set USE=imagemagick or USE=ffmpeg for that. I would close this as INVALID or WORKSFORME if only this package had some way to warn you about this, but neither the ebuild (REQUIRED_USE?) nor metadata.xml's USE flag descriptions explain this.
Comment 4 Jay Kamat 2016-12-28 18:42:32 UTC
Adding the imagemagick and ffmpeg USE flags dosen't seem to fix the problem. I think the image backend is built by default, its just that the backend's don't get placed in a directory that pqiv can read them '/usr/lib/pqiv/'. When moving these backends to '/usr/lib/' or adding the above folder to LD_LIBRARY_PATH, pqiv works as expected (even without those USE flags set).

I do agree it could be something wrong with configuration on my part, but it's not use flags.

New Package Info from emerge --info pqiv:

=================================================================
                        Package Settings
=================================================================

media-gfx/pqiv-2.6::gentoo was built with the following:
USE="ffmpeg imagemagick pdf postscript -libav" ABI_X86="64"
Comment 5 Phillip Berndt 2017-02-18 11:10:42 UTC
Could you please check if adding compiling with LDFLAGS containing "-Wl,--disable-new-dtags" resolves this issue?

If it does, then the ebuild of both 2.6 and 2.7.4 should be patched to add this flag. I'll fix this upstream in 2.8.
Comment 6 Jay Kamat 2017-02-18 17:15:56 UTC
I'm not sure if I'm doing it right, but adding:

LDFLAGS="-Wl,--disable-new-dtags"

to my make.conf and re-emerging pqiv 2.7.4 did not solve the issue for me. Adding:

LD_LIBRARY_PATH=/usr/lib/pqiv

to the front of any pqiv command still works for me, however. 

I'm attaching a new emerge --info pqiv. Thanks for looking into this!
Comment 7 Jay Kamat 2017-02-18 17:16:47 UTC
Created attachment 464258 [details]
pqiv-2.7.4 info
Comment 8 Phillip Berndt 2017-02-22 09:01:21 UTC
No, you didn't. It says right at the bottom:

media-gfx/pqiv-2.7.4::gentoo was built with the following:
LDFLAGS="-Wl,-O1 -Wl,--as-needed"

The recommended mechanism for this is https://wiki.gentoo.org/wiki//etc/portage/package.env, I believe, but patching the ebuild and inserting the flags into the emake line seems to be the simplest approach to me, though you'll have to emerge with --digest then:

    emake VERBOSE=1 CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS} -Wl,--disable-new-dtags"

An alternative approach would be to use pqiv's current development version from the master branch. It'd actually be a great help to get feedback on whether my approach for fixing this works as expected for other users as well; if it does, I'll release pqiv 2.8 in a couple of days.
Comment 9 Jay Kamat 2017-02-22 14:34:46 UTC
Yup, I managed to add the LDFLAGS via package.env, and it works fine with

LDFLAGS="${LDFLAGS} -Wl,--disable-new-dtags"

I'll definetly be using the master version to help test it out! I don't see any problems building that with the default flags (make install) so far, but I'll open issues on your repo if I find anything.

This is slightly off topic, but it would be really nice to have a '9999' build for pqiv, so I can install the latest version of pqiv, but I'll just install it manually for now!
Comment 10 Tim Harder gentoo-dev 2017-02-23 00:43:10 UTC
Fixed in 2.7.4-r1 and live ebuild added to the tree.