Created attachment 607316 [details] compressed build log from arm this was compiled using gcc and llvm-libunwind-9.0.1 output from the build log: cat /var/tmp/portage/sys-libs/libcxxabi-9.0.1/temp/build.log | grep error: -b1 36162-/var/tmp/portage/sys-libs/libcxxabi-9.0.1/work/libcxxabi/src/cxa_personality.cpp: In function 'void __cxxabiv1::scan_eh_tab(__cxxabiv1::{anonymous}::scan_results&, _Unwind_Action, bool, _Unwind_Control_Block*, _Unwind_Context*)': 36392:/var/tmp/portage/sys-libs/libcxxabi-9.0.1/work/libcxxabi/src/cxa_personality.cpp:573:22: error: '_URC_FATAL_PHASE1_ERROR' was not declared in this scope 36545- 573 | results.reason = _URC_FATAL_PHASE1_ERROR; 36599- | ^~~~~~~~~~~~~~~~~~~~~~~ 36652:/var/tmp/portage/sys-libs/libcxxabi-9.0.1/work/libcxxabi/src/cxa_personality.cpp:593:30: error: '_URC_FATAL_PHASE2_ERROR' was not declared in this scope 36805- 593 | results.reason = _URC_FATAL_PHASE2_ERROR; -- 36928-/var/tmp/portage/sys-libs/libcxxabi-9.0.1/work/libcxxabi/src/cxa_personality.cpp: In function '_Unwind_Reason_Code __cxxabiv1::__gxx_personality_v0(_Unwind_State, _Unwind_Control_Block*, _Unwind_Context*)': 37135:/var/tmp/portage/sys-libs/libcxxabi-9.0.1/work/libcxxabi/src/cxa_personality.cpp:1098:16: error: '_URC_FATAL_PHASE1_ERROR' was not declared in this scope 37289- 1098 | return _URC_FATAL_PHASE1_ERROR; 37337- | ^~~~~~~~~~~~~~~~~~~~~~~ 37384:/var/tmp/portage/sys-libs/libcxxabi-9.0.1/work/libcxxabi/src/cxa_personality.cpp:1111:11: error: invalid conversion from 'int' to '_Unwind_State' [-fpermissive] 37545- 1111 | state &= ~_US_FORCE_UNWIND; -- 38053-/var/tmp/portage/sys-libs/libcxxabi-9.0.1/work/libcxxabi/src/cxa_personality.cpp:1114:12: warning: enumeration value '_US_END_OF_STACK' not handled in switch [-Wswitch] 38222:/var/tmp/portage/sys-libs/libcxxabi-9.0.1/work/libcxxabi/src/cxa_personality.cpp:1191:12: error: '_URC_FATAL_PHASE1_ERROR' was not declared in this scope relying on sys-libs/libunwind doesn't work either and fails with a different error.
Created attachment 607318 [details] output from emerge --info
I got this error during the arch test but for lack of time I didn't report it. I'm wondering why it was marked stable (our error or it fails on certain arm platform?)
it seems that _URC_FATAL_PHASE1_ERROR isn't implemented are you a dev and can pick this up to upstream? Because I can't really :-S
Is this using sys-libs/libunwind or sys-libs/llvm-libunwind? Could you try the other for comparison?
the initial log is with llvm-libunwind-9.0.1, here's with sys-libs/libunwind-1.2.1-r3: cat /var/tmp/portage/sys-libs/libcxxabi-9.0.1/temp/build.log | grep error: -b1 36161-/var/tmp/portage/sys-libs/libcxxabi-9.0.1/work/libcxxabi/src/cxa_personality.cpp: In function 'void __cxxabiv1::scan_eh_tab(__cxxabiv1::{anonymous}::scan_results&, _Unwind_Action, bool, _Unwind_Control_Block*, _Unwind_Context*)': 36391:/var/tmp/portage/sys-libs/libcxxabi-9.0.1/work/libcxxabi/src/cxa_personality.cpp:573:22: error: '_URC_FATAL_PHASE1_ERROR' was not declared in this scope 36544- 573 | results.reason = _URC_FATAL_PHASE1_ERROR; 36598- | ^~~~~~~~~~~~~~~~~~~~~~~ 36651:/var/tmp/portage/sys-libs/libcxxabi-9.0.1/work/libcxxabi/src/cxa_personality.cpp:593:30: error: '_URC_FATAL_PHASE2_ERROR' was not declared in this scope 36804- 593 | results.reason = _URC_FATAL_PHASE2_ERROR; -- 36927-/var/tmp/portage/sys-libs/libcxxabi-9.0.1/work/libcxxabi/src/cxa_personality.cpp: In function '_Unwind_Reason_Code __cxxabiv1::__gxx_personality_v0(_Unwind_State, _Unwind_Control_Block*, _Unwind_Context*)': 37134:/var/tmp/portage/sys-libs/libcxxabi-9.0.1/work/libcxxabi/src/cxa_personality.cpp:1098:16: error: '_URC_FATAL_PHASE1_ERROR' was not declared in this scope 37288- 1098 | return _URC_FATAL_PHASE1_ERROR; 37336- | ^~~~~~~~~~~~~~~~~~~~~~~ 37383:/var/tmp/portage/sys-libs/libcxxabi-9.0.1/work/libcxxabi/src/cxa_personality.cpp:1111:11: error: invalid conversion from 'int' to '_Unwind_State' [-fpermissive] 37544- 1111 | state &= ~_US_FORCE_UNWIND; -- 38052-/var/tmp/portage/sys-libs/libcxxabi-9.0.1/work/libcxxabi/src/cxa_personality.cpp:1114:12: warning: enumeration value '_US_END_OF_STACK' not handled in switch [-Wswitch] 38221:/var/tmp/portage/sys-libs/libcxxabi-9.0.1/work/libcxxabi/src/cxa_personality.cpp:1191:12: error: '_URC_FATAL_PHASE1_ERROR' was not declared in this scope 38375- 1191 | return _URC_FATAL_PHASE1_ERROR; which seems identical to me?
Created attachment 607322 [details] compressed build log from arm with gnu libunwind
Could you try building with clang (CC=clang CXX=clang++)?
This is most likely going to work, as fedora ships their binaries of libcxx{abi} for arm built with clang by default, but I don't have clang emerged at the moment. Do you really need this for confirmation? I mean, it takes some 20hrs to build it, including a lot of swapping :-S
Well, my guess is that gcc ships and uses broken unwind.h.
Ok, I started to emerge clang now, results not before tomorrow. @Agostino Sarubbo if you happen to have clang already available, could you please provide the proof that it works with CC=clang and CXX=clang++ ?
Created attachment 608796 [details] compressed build log with CC=clang and CXX=clang++ seems to work with clang, so can you imagine to introduce a clang use flag just as in compiler-rt, merely to mitigate the problem?
Still an issue with 10.0.1.
only the gcc backend is broken, you can use clang as a workaround I'm unable to fix the bug upstream, so it might be a good idea to set clang useflag for mitigation?
Still with 11.1.0.
(In reply to Sam James from comment #14) > Still with 11.1.0. ...and 13.0.0.
I was able to compile libcxxabi-13.0.1 with llvm-libunwind and gcc-9.5.0 toolchain! :D relevant part of emerge --info ld GNU ld (Gentoo 2.38 p4) 2.38 app-misc/pax-utils: 1.3.4::gentoo app-shells/bash: 5.1_p16-r1::gentoo dev-lang/perl: 5.34.1-r3::gentoo dev-lang/python: 3.10.6_p2::gentoo dev-lang/rust: 1.59.0::smaeul dev-util/cmake: 3.22.4::gentoo dev-util/meson: 0.62.2::gentoo sys-apps/baselayout: 2.8::gentoo sys-apps/openrc: 0.44.10::gentoo sys-apps/sandbox: 2.25::gentoo sys-devel/autoconf: 2.13-r2::gentoo, 2.71-r1::gentoo sys-devel/automake: 1.16.5::gentoo sys-devel/binutils: 2.38-r2::gentoo sys-devel/binutils-config: 5.4.1::gentoo sys-devel/clang: 13.0.1::gentoo sys-devel/gcc: 9.5.0::gentoo sys-devel/gcc-config: 2.5-r1::gentoo sys-devel/libtool: 2.4.7::gentoo sys-devel/lld: 13.0.1::gentoo sys-devel/llvm: 13.0.1::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.15-r3::gentoo (virtual/os-headers) sys-libs/musl: 1.2.3::gentoo
current libcxxabi-19.1.2 doesn't build with gcc-13 on arm, but compile does work with clang