Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 894608 - dev-perl/List-MoreUtils-XS: Compilation failure with Clang
Summary: dev-perl/List-MoreUtils-XS: Compilation failure with Clang
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-02-15 17:55 UTC by gwendal grignou
Modified: 2023-03-11 17:23 UTC (History)
0 users

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


Attachments
emerge dev-perl/List-MoreUtils-XS log (dev-perl:List-MoreUtils-XS-0.430.0:20230215-175009.log,2.97 KB, text/x-log)
2023-02-15 17:55 UTC, gwendal grignou
Details
Patch to set LD to CCLD (0001-dev-perl-List-MoreUtils-XS-Fix-compilation-on-Clang-.patch,950 bytes, patch)
2023-02-15 17:57 UTC, gwendal grignou
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description gwendal grignou 2023-02-15 17:55:13 UTC
Created attachment 851262 [details]
emerge dev-perl/List-MoreUtils-XS log

dev-perl/List-MoreUtils-XS fail to emerge against CLang LD:

 * perl Makefile.PL PREFIX=/usr INSTALLDIRS=vendor INSTALLMAN3DIR=none DESTDIR=/var/tmp/portage/dev-perl/List-MoreUtils-XS-0.430.0/image
Checking whether pureperl is required... no
Checking for cc... ld.lld: error: unknown argument '-pipe'
ld.lld: error: unknown argument '-fno-strict-aliasing'
ld.lld: error: unknown argument '-Wl,-O2'
ld.lld: error: unknown argument '-Wl,--as-needed'
ld.lld: error: unknown argument '-Wl,-O2'
ld.lld: error: unknown argument '-Wl,--as-needed'

It can be fixed by explicitely setting LD to "${CCLD}", as implemented in several dev-perl ebuild, like dev-perl/File-LibMagic.
Comment 1 gwendal grignou 2023-02-15 17:57:38 UTC
Created attachment 851264 [details, diff]
Patch to set LD to CCLD

Patch similar to code discussed at https://bugs.gentoo.org/723222 (dev-perl/Data-Dump-Streamer broken by LD!=CCLD)
Comment 2 Larry the Git Cow gentoo-dev 2023-03-11 17:23:26 UTC
The bug has been closed via the following commit(s):

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

commit 6eb964b504c3aef2192403cbf383ae75d46990ff
Author:     Alfred Persson Forsberg <cat@catcream.org>
AuthorDate: 2023-03-09 00:21:37 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-03-11 17:23:20 +0000

    perl-module.eclass: Fix linking with ld.lld
    
    If LD is not specified then CCLD will be used as the linker.
    Setting CCLD to CC makes it correctly use LDFLAGS.
    
    Bug: https://bugs.gentoo.org/261375
    Closes: https://bugs.gentoo.org/882373
    Closes: https://bugs.gentoo.org/894608
    Signed-off-by: Alfred Persson Forsberg <cat@catcream.org>
    Closes: https://github.com/gentoo/gentoo/pull/30009
    Signed-off-by: Sam James <sam@gentoo.org>

 eclass/perl-module.eclass | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)