Summary: | sys-libs/newlib-3.3.0-r1 won't compile for spu-elf target due to thread errors | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michał Dec <moog621> |
Component: | Current packages | Assignee: | Luca Barbato <lu_zero> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | jstein, toolchain |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Compilation log of newlib for spu-elf on amd64
Compilation log of newlib for spu-elf on ppc64 (PS3) |
Description
Michał Dec
2020-07-11 14:00:08 UTC
Created attachment 648906 [details]
Compilation log of newlib for spu-elf on amd64
Created attachment 648910 [details]
Compilation log of newlib for spu-elf on ppc64 (PS3)
I have reconstructed newlib-2.5.0.ebuild from https://gitweb.gentoo.org/repo/gentoo.git/diff/sys-libs/newlib/newlib-2.5.0.ebuild?id=ae8fe4521b047d71437f98218ff595715f41cfc9 and used it as a toolchain ingredient. This seems to have mitigated the compilation failure. This bug is also reproducible with: - newlib-2.5.0.20171222 - newlib-2.5.0.20170922 - newlib-2.5.0.20170818 - newlib-2.5.0.20170720 - newlib-2.5.0.20170623 The latest newlib-2.5.0 that seems to be working is newlib-2.5.0.20170519. I can't remember how much time I spent hacking the 3.3.0-r1 ebuild but for what it's worth here's the diff between last working and first broken version https://github.com/grepwood/newlib/commit/831b6666af1f83ac173b491a5c191246203ddc37 Maybe if more eyes are set on this, we can find the offending code. Let's post build error for completeness: """ spu-elf-gcc -B/var/tmp/portage/cross-spu-elf/newlib-3.3.0-r1/work/build/spu-elf/mea64/newlib/ -isystem /var/tmp/portage/cross-spu-elf/newlib-3.3.0-r1/work/build/spu-elf/mea64/newlib/targ-include -isystem /var/tmp/portage/cross-spu-elf/newlib-3.3.0-r1/work/newlib-3.3.0/newlib/libc/include -B/var/tmp/portage/cross-spu-elf/newlib-3.3.0-r1/work/build/spu-elf/mea64/libgloss/spu -L/var/tmp/portage/cross-spu-elf/newlib-3.3.0-r1/work/build/spu-elf/mea64/libgloss/libnosys -L/var/tmp/portage/cross-spu-elf/newlib-3.3.0-r1/work/newlib-3.3.0/libgloss/spu -mea64 -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"3.3.0\" -DPACKAGE_STRING=\"newlib\ 3.3.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I/var/tmp/portage/cross-spu-elf/newlib-3.3.0-r1/work/newlib-3.3.0/newlib/libc/argz -fno-builtin -D_POSIX_MODE -DREENTRANT_SYSCALLS_PROVIDED -DMISSING_SYSCALL_NAMES -ffunction-sections -fdata-sections -D__NO_SYSCALLS__ -DMISSING_SYSCALL_NAMES -DHAVE_INIT_FINI -O2 -pipe -ggdb -ffunction-sections -fdata-sections -U_FORTIFY_SOURCE -mea64 -c -o lib_a-argz_add_sep.o `test -f 'argz_add_sep.c' || echo '/var/tmp/portage/cross-spu-elf/newlib-3.3.0-r1/work/newlib-3.3.0/newlib/libc/argz/'`argz_add_sep.c ,,, In file included from /var/tmp/portage/cross-spu-elf/newlib-3.3.0-r1/work/newlib-3.3.0/newlib/libc/include/sys/types.h:223, from /var/tmp/portage/cross-spu-elf/newlib-3.3.0-r1/work/newlib-3.3.0/newlib/libc/argz/argz_add_sep.c:8: /var/tmp/portage/cross-spu-elf/newlib-3.3.0-r1/work/newlib-3.3.0/newlib/libc/include/sys/_pthreadtypes.h:68:22: error: field ‘schedparam’ has incomplete type 68 | struct sched_param schedparam; | ^~~~~~~~~~ """ Note that spu-elf target was removed in gcc-10 release. Expect the rest of ecosystem to degrade quickly without a fresh compiler. I suspect that in patch you have posted a few type and function declataions changed. Probably due to guard change like: --- a/newlib/libc/include/sys/_pthreadtypes.h +++ b/newlib/libc/include/sys/_pthreadtypes.h @@ -18,7 +18,7 @@ #ifndef _SYS__PTHREADTYPES_H_ #define _SYS__PTHREADTYPES_H_ -#if defined(_POSIX_THREADS) +#if defined(_POSIX_THREADS) || __POSIX_VISIBLE >= 199506 (In reply to Sergei Trofimovich (RETIRED) from comment #7) > Note that spu-elf target was removed in gcc-10 release. Expect the rest of > ecosystem to degrade quickly without a fresh compiler. > Degrading this bug now too. |