Summary: | sys-libs/libcxxabi-14.0.4 fails to compile on arm with: cxa_personality.cpp:573:22: error: '_URC_FATAL_PHASE1_ERROR' was not declared in this scope' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | tt_1 <herrtimson> |
Component: | Current packages | Assignee: | LLVM support project <llvm> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | arm, mgorny, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | ARM | ||
OS: | Linux | ||
URL: | https://reviews.llvm.org/D53127 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 849464 | ||
Attachments: |
compressed build log from arm
output from emerge --info compressed build log from arm with gnu libunwind compressed build log with CC=clang and CXX=clang++ |
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. |
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.