Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 734898 - app-text/mupdf hardcode /usr/lib in .pc files (was: app-text/fbpdf-0_p20190202 fails to link with LLD because of /usr/lib in the link command line)
Summary: app-text/mupdf hardcode /usr/lib in .pc files (was: app-text/fbpdf-0_p2019020...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Johannes Huber (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: LD-is-lld, systemwide-lld
  Show dependency tree
 
Reported: 2020-07-31 06:40 UTC by Agostino Sarubbo
Modified: 2020-08-14 04:21 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,9.95 KB, text/plain)
2020-07-31 06:41 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2020-07-31 06:40:59 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: app-text/fbpdf-0_p20190202 fails to link with LLD because of /usr/lib in the link command line.
Discovered on: amd64 (internal ref: tinderbox)

NOTE:
This PR gives an idea about a fix: https://github.com/PhotoFlare/photoflare/pull/248/files.
Comment 1 Agostino Sarubbo gentoo-dev 2020-07-31 06:41:04 UTC
Created attachment 651800 [details]
build.log

build log and emerge --info
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-07-31 08:12:14 UTC
> x86_64-pc-linux-gnu-clang -o fbpdf fbpdf.o mupdf.o draw.o -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -fuse-ld=lld -Wl,--defsym=__gentoo_check_ldflags__=0 -L/usr/lib -lmupdf -lfreetype -lopenjp2 -lcrypto  -lm

fbpdf does not hardcode /usr/lib directly but uses mupfd's pkg-config files:

$ pkg-config --libs mupdf
-L/usr/lib -lmupdf -lfreetype -lopenjp2 -lcrypto

Reassigning to app-text/mupdf maintainer.
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2020-07-31 09:07:15 UTC
Wrong path seems to come from mupdf-1.10a-add-desktop-pc-xpm-files.patch patch:

--- /dev/null
+++ ./platform/debian/mupdf.pc
@@ -0,0 +1,12 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
...
Comment 4 Larry the Git Cow gentoo-dev 2020-08-14 04:21:26 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0985c4811a165c289d7cde5a81ea960077d7a235

commit 0985c4811a165c289d7cde5a81ea960077d7a235
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2020-08-14 04:09:42 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2020-08-14 04:21:22 +0000

    app-text/mupdf: security bump to 1.17.0
    
    * Debundle dev-lang/mujs again for the
      security bug (bundled copy is probably OK
      in terms of release mujs, but not a new bug
      (CVE-2020-24343).
    
    * Document bundled libs with references
      to check when bumping. Useful for both
      security@ and the maintainer.
    
    * Include extra Debian patches for improved
      cross-compilation support (mostly pkg-config).
    
    * Fix existing patch to respect libdir in pkgconfig
      file.
    
    * Fix missing || dies.
    
    Bug: https://bugs.gentoo.org/737034
    Bug: https://bugs.gentoo.org/737020
    Closes: https://bugs.gentoo.org/725672
    Closes: https://bugs.gentoo.org/734898
    Package-Manager: Portage-3.0.2, Repoman-2.3.23
    Signed-off-by: Sam James <sam@gentoo.org>

 app-text/mupdf/Manifest                            |   1 +
 .../mupdf/files/mupdf-1.17.0-cross-fixes.patch     | 103 ++++++++++++++
 app-text/mupdf/mupdf-1.17.0.ebuild                 | 153 +++++++++++++++++++++
 3 files changed, 257 insertions(+)