Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 800893 - sys-apps/systemd-tmpfiles-246 fails to build on x86 with ::musl gcc, undefined reference to `__stack_chk_fail_local'
Summary: sys-apps/systemd-tmpfiles-246 fails to build on x86 with ::musl gcc, undefine...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-06 18:37 UTC by Andreas K. Hüttel
Modified: 2021-09-25 17:50 UTC (History)
4 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 Andreas K. Hüttel archtester gentoo-dev 2021-07-06 18:37:12 UTC
[299/299] i686-gentoo-linux-musl-gcc  -o systemd-tmpfiles.standalone systemd-tmpfiles.standalone.p/src_tmpfiles_tmpfiles.c.o systemd-tmpfiles.standalone.p/src_shared_offline-passwd.c.o -Wl,--as-needed -Wl,--
no-undefined -Wl,-z,relro -Wl,-z,now -fstack-protector -Wl,--gc-sections -O2 -march=i686 -pipe -Wl,-O1 -Wl,--as-needed -Wl,--start-group src/shared/libsystemd-shared-246.a src/basic/libbasic.a src/basic/libb
asic-gcrypt.a src/libsystemd/libsystemd_static.a src/journal/libjournal-client.a -lacl -pthread -lacl /usr/lib/libcap.so -lcrypt /usr/lib/libmount.so -lrt -lm -ldl -Wl,--end-group
ESC[31mFAILED: ESC[0msystemd-tmpfiles.standalone 
i686-gentoo-linux-musl-gcc  -o systemd-tmpfiles.standalone systemd-tmpfiles.standalone.p/src_tmpfiles_tmpfiles.c.o systemd-tmpfiles.standalone.p/src_shared_offline-passwd.c.o -Wl,--as-needed -Wl,--no-undefin
ed -Wl,-z,relro -Wl,-z,now -fstack-protector -Wl,--gc-sections -O2 -march=i686 -pipe -Wl,-O1 -Wl,--as-needed -Wl,--start-group src/shared/libsystemd-shared-246.a src/basic/libbasic.a src/basic/libbasic-gcryp
t.a src/libsystemd/libsystemd_static.a src/journal/libjournal-client.a -lacl -pthread -lacl /usr/lib/libcap.so -lcrypt /usr/lib/libmount.so -lrt -lm -ldl -Wl,--end-group
/usr/lib/gcc/i686-gentoo-linux-musl/10.3.0/../../../../i686-gentoo-linux-musl/bin/ld: systemd-tmpfiles.standalone.p/src_tmpfiles_tmpfiles.c.o: in function `link_parent':
tmpfiles.c:(.text.link_parent+0x1d4): undefined reference to `__stack_chk_fail_local'
/usr/lib/gcc/i686-gentoo-linux-musl/10.3.0/../../../../i686-gentoo-linux-musl/bin/ld: systemd-tmpfiles.standalone.p/src_tmpfiles_tmpfiles.c.o: in function `fd_set_attribute':
tmpfiles.c:(.text.fd_set_attribute+0x446): undefined reference to `__stack_chk_fail_local'
/usr/lib/gcc/i686-gentoo-linux-musl/10.3.0/../../../../i686-gentoo-linux-musl/bin/ld: systemd-tmpfiles.standalone.p/src_tmpfiles_tmpfiles.c.o: in function `path_open_safe':
musl stage 3 build on x86 stopped with this:

tmpfiles.c:(.text.path_open_safe+0x1bb): undefined reference to `__stack_chk_fail_local'
/usr/lib/gcc/i686-gentoo-linux-musl/10.3.0/../../../../i686-gentoo-linux-musl/bin/ld: systemd-tmpfiles.standalone.p/src_tmpfiles_tmpfiles.c.o: in function `path_set_acl':
tmpfiles.c:(.text.path_set_acl+0x2c4): undefined reference to `__stack_chk_fail_local'
/usr/lib/gcc/i686-gentoo-linux-musl/10.3.0/../../../../i686-gentoo-linux-musl/bin/ld: systemd-tmpfiles.standalone.p/src_tmpfiles_tmpfiles.c.o: in function `fd_set_xattrs':
tmpfiles.c:(.text.fd_set_xattrs+0x298): undefined reference to `__stack_chk_fail_local'
/usr/lib/gcc/i686-gentoo-linux-musl/10.3.0/../../../../i686-gentoo-linux-musl/bin/ld: systemd-tmpfiles.standalone.p/src_tmpfiles_tmpfiles.c.o:tmpfiles.c:(.text.path_open_parent_safe+0x1f3): more undefined re
ferences to `__stack_chk_fail_local' follow
/usr/lib/gcc/i686-gentoo-linux-musl/10.3.0/../../../../i686-gentoo-linux-musl/bin/ld: systemd-tmpfiles.standalone: hidden symbol `__stack_chk_fail_local' isn't defined
/usr/lib/gcc/i686-gentoo-linux-musl/10.3.0/../../../../i686-gentoo-linux-musl/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
 * ERROR: sys-apps/systemd-tmpfiles-246::gentoo failed (compile phase):
 *   ninja -v -j17 -l0 -C /var/tmp/portage/sys-apps/systemd-tmpfiles-246/work/systemd-tmpfiles-246-build systemd-tmpfiles.standalone man/tmpfiles.d.5 man/systemd-tmpfiles.8 failed


This looks like https://747346.bugs.gentoo.org/attachment.cgi?id=687000 might be missing in the ::musl gcc?
Comment 1 Larry the Git Cow gentoo-dev 2021-07-06 19:00:58 UTC
The bug has been referenced in the following commit(s):

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

commit 31be81b1141d76911fbde9d927bde3d2141d80d0
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-07-06 18:59:46 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-07-06 19:00:51 +0000

    profiles/default/linux/x86/17.0/musl: mask sys-apps/systemd-tmpfiles for now
    
    Requires -fstack-protector at the moment which is broken on x86 + musl
    for the timebeing. Masked to allow stage builds to proceed.
    
    Bug: https://bugs.gentoo.org/800893
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/default/linux/x86/17.0/musl/package.mask | 8 ++++++++
 1 file changed, 8 insertions(+)
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2021-07-06 21:20:31 UTC
Another option if to use equivalent of -fno-stack-protector on i?86-*-musl* and powerpc(le?)-*-musl*.
Comment 3 Larry the Git Cow gentoo-dev 2021-09-14 02:50:19 UTC
The bug has been referenced in the following commit(s):

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

commit 48a63c983a559f87d693e606380a49c139d3e356
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-09-14 02:49:48 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-09-14 02:50:13 +0000

    profiles/default/linux/x86/17.0/musl: unmask systemd-tmpfiles
    
    There's now a patch for gcc in ::musl and we'll hopefully
    import it to ::gentoo shortly.
    
    Bug: https://bugs.gentoo.org/800893
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/default/linux/x86/17.0/musl/package.mask | 8 --------
 1 file changed, 8 deletions(-)
Comment 4 Jory A. Pratt gentoo-dev 2021-09-25 17:50:47 UTC
Gcc not links libssp_nonshared.a for all archs.