Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 884707 - app-text/ghostscript-gpl-10.0.0-r1: x11 device unavailable
Summary: app-text/ghostscript-gpl-10.0.0-r1: x11 device unavailable
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Codec Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-07 15:03 UTC by Ed Santiago
Modified: 2022-12-07 19:08 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Santiago 2022-12-07 15:03:25 UTC
In a nutshell, gs no longer has an x11 device, which means app-text/gv doesn't work either.

    $ gs --help |grep x11   (no output)

Possible cause: /usr/lib64/ghostscript/10.00.0/X11.so is getting stripped on install, which causes base/gp_unix.c not to find `gs_shared_init`. But it's more than that, because even with `RESTRICT="strip"` there's no x11 driver available. I think gs's search path might be wrong; but I've run out of discretionary time for pursuing this further. (Yes, I confirmed via `nm` that RESTRICT works).

Easy workaround:

--- /usr/portage/app-text/ghostscript-gpl/./ghostscript-gpl-10.0.0-r1.ebuild   2022-11-25 05:10:27.000000000 -0700
+++ /opt/gentoo/portage-overlay/app-text/ghostscript-gpl/ghostscript-gpl-10.0.0-r1.ebuild       2022-12-07 07:41:28.065152500 -0700
@@ -127,7 +127,7 @@
 
        PKGCONFIG=$(type -P $(tc-getPKG_CONFIG)) \
        econf \
-               --enable-dynamic \
+               --disable-dynamic \
                --enable-freetype \
                --enable-fontconfig \
                --enable-openjpeg \


Actual solution: don't strip X11.so?
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-07 19:02:26 UTC
Looking.

Debian hit this:
"""
ghostscript (10.0.0~dfsg-8) unstable; urgency=medium

  * QA upload
  * debian/: No longer build with dynamic modules (Closes: #1023330)
    - X11 support is now part of ghostscript and ghostcript-x is a
      transitional package.

 -- Sebastian Ramacher <sramacher@debian.org>  Sun, 04 Dec 2022 16:00:05 +0100
"""

Their bug: https://bugs.debian.org/1023330
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-07 19:05:09 UTC
Upstream bug: https://bugs.ghostscript.com/show_bug.cgi?id=705895
Comment 3 Larry the Git Cow gentoo-dev 2022-12-07 19:08:20 UTC
The bug has been closed via the following commit(s):

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

commit b92cfcd38f2911fa1475cb56a920093eae75b72b
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-07 19:07:02 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-07 19:08:00 +0000

    app-text/ghostscript-gpl: don't build dynamic modules (10)
    
    It breaks app-text/gv and upstream are clear it's not really a supported
    configuration.
    
    Upstream says they were only intended for debugging anyway.
    
    Closes: https://bugs.gentoo.org/884707
    Signed-off-by: Sam James <sam@gentoo.org>

 .../ghostscript-gpl-10.0.0-r2.ebuild               | 189 +++++++++++++++++++++
 1 file changed, 189 insertions(+)