Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 922372 - sys-apps/ripgrep-14.1.0 fails to compile (MUSL-SYSTEM): = note: ld: cannot find -lpcre2-8: No such file or directory
Summary: sys-apps/ripgrep-14.1.0 fails to compile (MUSL-SYSTEM): = note: ld: cannot fi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-18 09:51 UTC by Agostino Sarubbo
Modified: 2024-09-30 02:41 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,103.62 KB, text/plain)
2024-01-18 09:51 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 2024-01-18 09:51:15 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: sys-apps/ripgrep-14.1.0 fails to compile (MUSL-SYSTEM).
Discovered on: amd64 (internal ref: tinderbox_musl)

NOTE:
(MUSL-SYSTEM) in the summary means that bug was found on a machine that runs MUSL libc but this bug MAY or MAY NOT BE related to musl.
Comment 1 Agostino Sarubbo gentoo-dev 2024-01-18 09:51:17 UTC
Created attachment 882524 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2024-01-18 09:51:18 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


  = note: /usr/lib/gcc/x86_64-gentoo-linux-musl/13/../../../../x86_64-gentoo-linux-musl/bin/ld: cannot find -lpcre2-8: No such file or directory
error: linking with `cc` failed: exit status: 1
Comment 3 Brahmajit Das 2024-01-18 09:59:00 UTC
@Sam suggested enabling "static-libs" USE flag for dev-libs/libpcre2 and it made building sys-apps/ripgrep possible without any issues.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-19 05:21:05 UTC
Something goes wrong with the static logic for PCRE2_SYS_STATIC but I don't get what/why.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-19 05:22:12 UTC
(In reply to Sam James from comment #4)
> Something goes wrong with the static logic for PCRE2_SYS_STATIC but I don't
> get what/why.

i.e. we're supposed to be able to override that for musl
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-26 09:00:27 UTC
Sigh:

# Do the same for MUSL targets. At the time of writing (2023-10-23), this is
# the default. But the plan is for the default to change to dynamic linking.
# The whole point of MUSL with respect to ripgrep is to create a fully
# statically linked executable.
#
# See: https://github.com/rust-lang/compiler-team/issues/422
# See: https://github.com/rust-lang/compiler-team/issues/422#issuecomment-812135847
[target.x86_64-unknown-linux-musl]
rustflags = [
  "-C", "target-feature=+crt-static",
  "-C", "link-self-contained=yes",
]
Comment 7 Larry the Git Cow gentoo-dev 2024-03-26 10:49:11 UTC
The bug has been closed via the following commit(s):

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

commit ba6c5e1f302f053bfc7c143f2b4cc0b5ab3ab575
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-03-26 09:02:52 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-03-26 10:49:04 +0000

    sys-apps/ripgrep: Do not force static linking on musl
    
    Closes: https://bugs.gentoo.org/922372
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-apps/ripgrep/ripgrep-14.1.0.ebuild | 6 ++++++
 1 file changed, 6 insertions(+)