Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 673524 - sys-apps/grep: automagic dependency on dev-libs/libsigsegv
Summary: sys-apps/grep: automagic dependency on dev-libs/libsigsegv
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2018-12-21 09:23 UTC by email200202
Modified: 2021-03-22 08:59 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,3.11 KB, text/plain)
2018-12-21 09:23 UTC, email200202
Details
environment (environment,119.04 KB, text/plain)
2018-12-21 09:24 UTC, email200202
Details
emerge --info '=mail-client/thunderbird-bin-60.4.0::gentoo' (file_673524.txt,6.86 KB, text/plain)
2018-12-21 09:26 UTC, email200202
Details
emerge -pqv '=mail-client/thunderbird-bin-60.4.0::gentoo' (file_673524.txt,403 bytes, text/plain)
2018-12-21 09:27 UTC, email200202
Details

Note You need to log in before you can comment on or make changes to this bug.
Description email200202 2018-12-21 09:23:14 UTC
Created attachment 558304 [details]
build.log

Update from mail-client/thunderbird-bin-60.3.3 to mail-client/thunderbird-bin-60.4.0 with the following error message:

>>> Compiling source in /var/tmp/portage/mail-client/thunderbird-bin-60.4.0/work/thunderbird ...
>>> Source compiled.
>>> Test phase [not enabled]: mail-client/thunderbird-bin-60.4.0

>>> Install thunderbird-bin-60.4.0 into /var/tmp/portage/mail-client/thunderbird-bin-60.4.0/image/ category mail-client
grep: error while loading shared libraries: libsigsegv.so.2: cannot open shared object file: No such file or directory
 * ERROR: mail-client/thunderbird-bin-60.4.0::gentoo failed (install phase):
 *   (no error message)
 * 

Emerging dev-libs/libsigsegv package fixed the error with mail-client/thunderbird-bin.
Comment 1 email200202 2018-12-21 09:24:12 UTC
Created attachment 558306 [details]
environment
Comment 2 email200202 2018-12-21 09:26:01 UTC
Created attachment 558308 [details]
emerge --info '=mail-client/thunderbird-bin-60.4.0::gentoo'
Comment 3 email200202 2018-12-21 09:27:52 UTC
Created attachment 558312 [details]
emerge -pqv '=mail-client/thunderbird-bin-60.4.0::gentoo'
Comment 4 Thomas Deutschmann (RETIRED) gentoo-dev 2018-12-21 10:40:25 UTC
I cannot reproduce and I am very sure this failure isn't coming from thunderbird package. Instead it is an error from your system:

Please check that your system is healthy, no missing packages, no preserved libs and if you just upgraded gcc/glibc make sure you finished that progress.
Comment 5 email200202 2018-12-22 09:15:19 UTC
I agree with you: the problem seems to be not in thunderbird-bin package itself.


(1) thunderbird-bin ebuild uses grep. The grep command needs libsigsegvsys.


(2) On my system, libsigsegvsys was not installed since it is not required by any installed package (including sys-apps/grep)

# emerge -av --depclean dev-libs/libsigsegv

Calculating dependencies... done!
>>> Calculating removal order...

>>> These are the packages that would be unmerged:                                                                  

 dev-libs/libsigsegv
    selected: 2.12-r1 
   protected: none 
     omitted: none 

All selected packages: =dev-libs/libsigsegv-2.12-r1

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

Would you like to unmerge these packages? [Yes/No] y


(3) After uninstalling it, grep becomes unusable as expected:

# grep
grep: error while loading shared libraries: libsigsegv.so.2: cannot open shared object file: No such file or directory


(4) Doing emerge -avuDN world or emerge -av @preserved-rebuild did not bring the missing required package.


(5) Looking at /usr/portage/sys-apps/grep/grep-3.2.ebuild, libsigsegv is not listed as dependency.

LIB_DEPEND="pcre? ( >=dev-libs/libpcre-7.8-r1[static-libs(+)] )"
RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
    nls? ( virtual/libintl )
    virtual/libiconv"
DEPEND="${RDEPEND}
    virtual/pkgconfig
    nls? ( sys-devel/gettext )
    static? ( ${LIB_DEPEND} )"
 

(6) On another system, libsigsegvsys was installed because of another package (dev-lisp/clisp):

# emerge -av --depclean dev-libs/libsigsegv

Calculating dependencies... done!
  dev-libs/libsigsegv-2.12-r1 pulled in by:
    dev-lisp/clisp-2.49.92 requires >=dev-libs/libsigsegv-2.10

>>> No packages selected for removal by depclean
Packages installed:   2118
Packages in world:    438
Packages in system:   43
Required packages:    2118
Number removed:       0


So, may be you could not repeat the problem because you have a package which caused dev-libs/libsigsegv to be installed as dependency.
Comment 6 email200202 2018-12-22 09:16:36 UTC
I think this bug should be re-assigned to sys-apps/grep-3.2
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2018-12-22 20:00:58 UTC
When you emerge sys-apps/grep when dev-libs/libsigsegv is already installed, grep will silently link against /usr/lib64/libsigsegv.so...
Comment 8 Larry the Git Cow gentoo-dev 2018-12-22 22:49:14 UTC
The bug has been closed via the following commit(s):

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

commit 3a9ab2090d0838dbae5516153859e8a6ec62c84c
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2018-12-22 22:48:52 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2018-12-22 22:49:06 +0000

    sys-apps/grep: fix automagic dependency on dev-libs/libsigsegv
    
    Closes: https://bugs.gentoo.org/673524
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 sys-apps/grep/{grep-3.0.ebuild => grep-3.0-r1.ebuild} | 4 +++-
 sys-apps/grep/{grep-3.1.ebuild => grep-3.1-r1.ebuild} | 2 ++
 sys-apps/grep/{grep-3.3.ebuild => grep-3.3-r1.ebuild} | 2 ++
 3 files changed, 7 insertions(+), 1 deletion(-)
Comment 9 email200202 2018-12-23 11:45:05 UTC
I'm sorry for posting after it was closed but the dependency is still missing.

# equery l sys-apps/grep
 * Searching for grep in sys-apps ...
[IP-] [  ] sys-apps/grep-3.3-r1:0


# emerge -pv --depclean dev-libs/libsigsegv

Calculating dependencies... done!
>>> Calculating removal order...

>>> These are the packages that would be unmerged:

 dev-libs/libsigsegv
    selected: 2.12-r1 
   protected: none 
     omitted: none 

All selected packages: =dev-libs/libsigsegv-2.12-r1

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.
Comment 10 Thomas Deutschmann (RETIRED) gentoo-dev 2018-12-23 14:06:34 UTC
> I'm sorry for posting after it was closed but the dependency is still missing.

No. When we are fixing an "automagic" dep, we have two options:

- add the package which will be linked when available as dependency

- patch the build system to prevent linking when package is available but not wanted

In the case of grep there's no benefit in linking against dev-libs/libsigsegv so I patched the ebuild to tell grep's build system to never link against libsigsegv even when available.
Comment 11 Larry the Git Cow gentoo-dev 2021-03-19 10:45:25 UTC
The bug has been referenced in the following commit(s):

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

commit c586f62ba6c0c8b3649e9afaa3f8f0a22cc98630
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-03-19 10:44:43 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-03-19 10:44:43 +0000

    sys-apps/grep: add bug reference to libsigsegv line
    
    Bug: https://bugs.gentoo.org/673524
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/grep/grep-3.4.ebuild | 2 +-
 sys-apps/grep/grep-3.5.ebuild | 2 +-
 sys-apps/grep/grep-3.6.ebuild | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
Comment 12 Larry the Git Cow gentoo-dev 2021-03-22 08:59:10 UTC
The bug has been referenced in the following commit(s):

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

commit 9c56995f410c33050133c71a45da78f4d3ee9868
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-03-19 22:11:14 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2021-03-22 08:57:42 +0000

    sys-apps/grep: use dev-libs/libsigsegv for stack overflow handling on sparc
    
    This fixes test failures on sparc in grep 3.6, although 3.5 still fails.
    (This seems to be because of an older copy of gnulib in that version.)
    
    It seems too risky to to backport gnulib changes to grep 3.5.
    
    [Note that I ended up discovering an independent issue because filename-lineno.pl
    failed on sparc too. This ended up being a real bug in that libpcre upstream
    doesn't support JIT on sparc64 which manifested in both the test failing and
    e.g. grep -P foo dying with SIGBUS.
    
    I've therefore masked dev-libs/libpcre[jit] on sparc64 in fd573f4.]
    
    URL: https://lists.gnu.org/archive/html/bug-gnulib/2021-02/msg00002.html
    URL: https://debbugs.gnu.org/46227
    Bug: https://bugs.gentoo.org/673524
    Closes: https://bugs.gentoo.org/768135
    Signed-off-by: Sam James <sam@gentoo.org>
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 sys-apps/grep/grep-3.5.ebuild | 15 ++++++++++++---
 sys-apps/grep/grep-3.6.ebuild | 15 ++++++++++++---
 2 files changed, 24 insertions(+), 6 deletions(-)