On 10/01/2025 14:19, Matthias Klose wrote:
On 10.01.25 13:21, Emilio Pozuelo Monfort wrote:
Perhaps Matthias can shed some light.
please try building gcc-13 with amdgcn-tools-18 for enlightenment. That's what I
would have to do as well.
Here is some enlightenment :-)
I changed the amdgnc-tools dependencies in gcc-13_13.3.0-13 into
amdgnc-tools-19, and this is the error:
----------- Error message ---------
checking for suffix of object files... configure: error: in
`/gcc-13-13.3.0/build-gcn/amdgcn-amdhsa/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
make[3]: *** [Makefile:13642: configure-target-libgcc] Error 1
----------- End error message -----
---------- libgcc config.log ------
configure:3792: checking for suffix of object files
configure:3814: /gcc-13-13.3.0/build-gcn/./gcc/xgcc
-B/gcc-13-13.3.0/build-gcn/./gcc/ -nostdinc
-B/gcc-13-13.3.0/build-gcn/amdgcn-amdhsa/newlib/ -isystem
/gcc-13-13.3.0/build-gcn/amdgcn-amdhsa/newlib/targ-include -isystem
/gcc-13-13.3.0/src-gcn/newlib/libc/include -B/usr/amdgcn-amdhsa/bin/
-B/usr/amdgcn-amdhsa/lib/ -isystem /usr/amdgcn-amdhsa/include -isystem
/usr/amdgcn-amdhsa/sys-include -isystem /gcc-13-13.3.0/build-gcn/sys-include
-c -g -O2 conftest.c >&5
LLVM ERROR: Unsupported AMDHSA Code Object Version 3
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and
include the crash backtrace.
Stack dump:
0. Program arguments: /gcc-13-13.3.0/bin-gcn/as -triple=amdgcn--amdhsa
-mcpu=fiji --amdhsa-code-object-version=3 -filetype=obj -o conftest.o
/tmp/ccr8js5c.s
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or
set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 libLLVM.so.19.1 0x00007f3604ab06ba
llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 58
1 libLLVM.so.19.1 0x00007f3604aae264 llvm::sys::RunSignalHandlers() + 84
2 libLLVM.so.19.1 0x00007f3604ab0d7b
3 libc.so.6 0x00007f3603649df0
4 libc.so.6 0x00007f360369e95c
5 libc.so.6 0x00007f3603649cc2 gsignal + 18
6 libc.so.6 0x00007f36036324ac abort + 34
7 libLLVM.so.19.1 0x00007f3604a02e78 llvm::report_fatal_error(llvm::Twine
const&, bool) + 440
8 libLLVM.so.19.1 0x00007f3606f92a7b
9 libLLVM.so.19.1 0x00007f3606f8b540
10 libLLVM.so.19.1 0x00007f3606253b22 llvm::MCStreamer::finish(llvm::SMLoc) + 82
11 libLLVM.so.19.1 0x00007f360628e37e
12 as 0x000056289fe624ea
13 as 0x000056289fe613d8
14 libc.so.6 0x00007f3603633ca8
15 libc.so.6 0x00007f3603633d65 __libc_start_main + 133
16 as 0x000056289fe5cd11
xgcc: internal compiler error: Aborted signal terminated program as
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://gcc.gnu.org/bugs/> for instructions.
configure:3818: $? = 4
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3832: error: in `/gcc-13-13.3.0/build-gcn/amdgcn-amdhsa/libgcc':
configure:3834: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details
------- end libgcc config.log -----
So the error is "LLVM ERROR: Unsupported AMDHSA Code Object Version 3"
This leads to the following bug report in GCC [1] - conclusion is that it's
fixed in GCC 14 by commits [2] and [3].
So it seems to me that the options for trixie are:
- Keep LLVM 17 supported.
- Backport those two commits to GCC 13.
Of course it's hard to say up front what the chance of success is of
backporting those two patches. I'm not sure if the risk is worth it at this
point in the release cycle.
(As an aside, I don't think an ICE is the proper way to deal with an
unsupported code object, but OK.)
Regards,
Arnout
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114419
[2]
https://gcc.gnu.org/cgit/gcc/commit/?id=56ed1055b2f40ac162ae8d382280ac07a33f789f
[3]
https://gcc.gnu.org/cgit/gcc/commit/?id=4b5650acb3107239867830dc1214b31bdbe3cacd