Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 902193

Summary: `crossdev -t x86_64-gentoo-linux-musl -S` gives GCC_NO_EXECUTABLES
Product: Gentoo Linux Reporter: Einstok Fair <einfair>
Component: Current packagesAssignee: Gentoo musl team <musl>
Status: UNCONFIRMED ---    
Severity: normal CC: herrtimson, i
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 886217    
Bug Blocks:    
Attachments: /var/log/portage/cross-x86_64-gentoo-linux-musl-info.log
/var/log/portage/cross-x86_64-gentoo-linux-musl-gcc-stage2.log.xz
/var/tmp/portage/cross-x86_64-gentoo-linux-musl/gcc-12.2.1_p20230121-r1/temp/gcc-config.logs.tar.xz

Description Einstok Fair 2023-03-19 20:13:51 UTC
Created attachment 858403 [details]
/var/log/portage/cross-x86_64-gentoo-linux-musl-info.log

# crossdev -t x86_64-gentoo-linux-musl -S
------------------------------------------------------------------------------------------------------------------------------------------------------------
 * crossdev version:      20220909
 * Host Portage ARCH:     amd64
 * Host Portage System:   x86_64-pc-linux-gnu (i686-pc-linux-gnu x86_64-pc-linux-gnu)
 * Target Portage ARCH:   amd64
 * Target System:         x86_64-gentoo-linux-musl
 * Stage:                 4 (C/C++ compiler)
 * USE=multilib:          no
 * Target ABIs:           default

 * binutils:              binutils-[stable]
 * gcc:                   gcc-[stable]
 * headers:               linux-headers-[stable]
 * libc:                  musl-[stable]

 * CROSSDEV_OVERLAY:      /var/db/repos/crossdev
 * PORT_LOGDIR:           /var/log/portage
 * PORTAGE_CONFIGROOT:    /
 * Portage flags:         
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -
 * leaving metadata/layout.conf alone in /var/db/repos/crossdev
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -
 * Log: /var/log/portage/cross-x86_64-gentoo-linux-musl-binutils.log
 * Emerging cross-binutils ...                                                                                                                        [ ok ]
 * Log: /var/log/portage/cross-x86_64-gentoo-linux-musl-gcc-stage1.log
 * Emerging cross-gcc-stage1 ...                                                                                                                      [ ok ]
 * Log: /var/log/portage/cross-x86_64-gentoo-linux-musl-linux-headers.log
 * Emerging cross-linux-headers ...                                                                                                                   [ ok ]
 * Log: /var/log/portage/cross-x86_64-gentoo-linux-musl-musl.log
 * Emerging cross-musl ...                                                                                                                            [ ok ]
 * Log: /var/log/portage/cross-x86_64-gentoo-linux-musl-gcc-stage2.log
 * Emerging cross-gcc-stage2 ...

 * error: gcc failed :(
 * 
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-x86_64-gentoo-linux-musl-info.log
 * /var/log/portage/cross-x86_64-gentoo-linux-musl-gcc-stage2.log.xz
 * /var/tmp/portage/cross-x86_64-gentoo-linux-musl/gcc*/temp/gcc-config.logs.tar.xz
Comment 1 Einstok Fair 2023-03-19 20:14:51 UTC
Created attachment 858405 [details]
/var/log/portage/cross-x86_64-gentoo-linux-musl-gcc-stage2.log.xz
Comment 2 Einstok Fair 2023-03-19 20:17:50 UTC
Created attachment 858407 [details]
/var/tmp/portage/cross-x86_64-gentoo-linux-musl/gcc-12.2.1_p20230121-r1/temp/gcc-config.logs.tar.xz
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-19 21:15:34 UTC
[21:12:39]  <sam_> /usr/libexec/gcc/x86_64-gentoo-linux-musl/ld: cannot find -lssp_nonshared: No such file or directory
[21:12:39]  <sam_> collect2: error: ld returned 1 exit status
Comment 4 Xiami 2023-03-24 18:08:40 UTC
I see libssp_nonshared is compiled within libssp which is not enabled by default.

The latest gcc musl patches forces -lssp_nonshared unconditionally.

But libssp USE seems to be masked for sys-devel/gcc long time ago and there is an UNMASK_WHEN_YOU_REALLY_KNOW_WHAT_YOU_ARE_DOING warning comment. (though sys-devel/gcc is not cross-*/gcc)

I'm confused. Is it safe to enable libssp for cross-x86_64-gentoo-linux-musl/gcc (cross gcc)?
Comment 5 Xiami 2023-03-26 17:50:43 UTC
I see >=musl-1.2.3-r7 now installs libssp_nonshared.a. And `crossdev -S -t x86_64-pc-linux-musl --libc 1.2.3-r7` works for me.

Stablizing musl-1.2.3-r7 should fix this?
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-26 18:18:33 UTC
(In reply to Xiami from comment #5)
> I see >=musl-1.2.3-r7 now installs libssp_nonshared.a. And `crossdev -S -t
> x86_64-pc-linux-musl --libc 1.2.3-r7` works for me.
> 
> Stablizing musl-1.2.3-r7 should fix this?

Yep, hence the dependency onf bug 886217.

(In reply to Xiami from comment #4)
> I see libssp_nonshared is compiled within libssp which is not enabled by
> default.
> 
> The latest gcc musl patches forces -lssp_nonshared unconditionally.
> 
> But libssp USE seems to be masked for sys-devel/gcc long time ago and there
> is an UNMASK_WHEN_YOU_REALLY_KNOW_WHAT_YOU_ARE_DOING warning comment.
> (though sys-devel/gcc is not cross-*/gcc)
> 
> I'm confused. Is it safe to enable libssp for
> cross-x86_64-gentoo-linux-musl/gcc (cross gcc)?

libssp_nonshared is a small shim which we install and separate from the "real" libssp, fwiw.