Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 905662 - media-libs/mesa: JIT needs port to riscv (sys-devel/llvm-16.0.2 some riscv packages reporting "LLVM ERROR: Relocation type not implemented yet!")
Summary: media-libs/mesa: JIT needs port to riscv (sys-devel/llvm-16.0.2 some riscv pa...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: riscv Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-03 19:08 UTC by Andrew Cameron
Modified: 2023-05-28 02:50 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Here is the log from running mesa test showing the failures (mesa_tests.log.gz,80.66 KB, application/gzip)
2023-05-03 20:40 UTC, Andrew Cameron
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cameron 2023-05-03 19:08:01 UTC
On my RISC-V VisionFive 2 some of the applications are reporting "LLVM ERROR: Relocation type not implemented yet!" when I run them
Some examples are:-
glxgears and es2gears_x11 both from x11-apps/mesa-progs-8.5.0
www-client/firefox-112.0.2

Reproducible: Always
Comment 1 Andrew Cameron 2023-05-03 19:54:51 UTC
andrew@StarFive ~ $ glxgears 
LLVM ERROR: Relocation type not implemented yet!
Aborted (core dumped)
andrew@StarFive ~ $ es2gears_x11 
libEGL warning: DRI2: failed to authenticate
EGL_VERSION = 1.5
vertex shader info: 
fragment shader info: 
info: 
LLVM ERROR: Relocation type not implemented yet!
Aborted (core dumped)
andrew@StarFive ~ $ firefox 
ATTENTION: default value of option mesa_glthread overridden by environment.
libEGL warning: DRI2: failed to authenticate
ATTENTION: default value of option mesa_glthread overridden by environment.
LLVM ERROR: Relocation type not implemented yet!
Redirecting call to abort() to mozalloc_abort

Exiting due to channel error.
Segmentation fault (core dumped)
Comment 2 Andrew Cameron 2023-05-03 20:40:22 UTC
Created attachment 861104 [details]
Here is the log from running mesa  test showing the failures
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-24 17:22:22 UTC
You'll have to report this upstream.
Comment 4 Andrew Cameron 2023-05-25 17:19:02 UTC
Thank. Done 
See https://github.com/llvm/llvm-project/issues/62940
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-26 01:42:42 UTC
(In reply to Andrew Cameron from comment #4)
> Thank. Done 
> See https://github.com/llvm/llvm-project/issues/62940

Thanks!
Comment 6 Andrew Cameron 2023-05-26 17:20:34 UTC
According to the discussion on this issue MESA needs to be updated.
Comment 7 Andrew Cameron 2023-05-26 20:33:58 UTC
I can confirm that when I use the updated/patched mesa code from
https://gitlab.freedesktop.org/alexfanqi/mesa/-/tree/wip?ref_type=heads
It works correctly and the Applications do not fail.
So this needs to be addressed by updating the MESA code.

[1/14] Generating src/git_sha1.h with a custom command
 1/53 mesa:util / drirc xml validation            OK                 0.09s
 2/53 mesa:util / process                         OK                 0.04s
 3/53 mesa:util / xmlconfig                       OK                 0.13s
 4/53 mesa:util / clear                           OK                 0.07s
 5/53 mesa:util / collision                       OK                 0.07s
 6/53 mesa:util / delete_and_lookup               OK                 0.09s
 7/53 mesa:util / delete_management               OK                 0.07s
 8/53 mesa:util / destroy_callback                OK                 0.07s
 9/53 mesa:util / insert_and_lookup               OK                 0.08s
10/53 mesa:util / insert_many                     OK                 0.07s
11/53 mesa:util / null_destroy                    OK                 0.06s
12/53 mesa:util / random_entry                    OK                 0.08s
13/53 mesa:util / remove_key                      OK                 0.07s
14/53 mesa:util / remove_null                     OK                 0.07s
15/53 mesa:util / replacement                     OK                 0.08s
16/53 mesa:util / vma_random                      OK                 0.07s
17/53 mesa:format / srgb                          OK                 0.09s
18/53 mesa:format / u_format_test                 OK                 0.12s
19/53 mesa:format / u_format_compatible_test      OK                 0.12s
20/53 mesa:mapi / shared-glapi-test               OK                 0.12s
21/53 mesa:mapi / shared-glapi symbols check      OK                 0.36s
22/53 mesa:compiler+nir / load_store_vectorizer   OK                 0.11s
23/53 mesa:compiler+nir / nir_opt_dce             OK                 0.03s
24/53 mesa:compiler+spirv / spirv_tests           OK                 0.04s
25/53 mesa:compiler+nir / nir_tests               OK                 1.24s
26/53 mesa:compiler+nir / nir_algebraic_parser    OK                 1.26s
27/53 mesa:compiler+glcpp / glcpp test (unix)     OK                 1.89s
28/53 mesa:compiler+glcpp / glcpp test (windows)  OK                 2.21s
29/53 mesa:compiler+glcpp / glcpp test (oldmac)   OK                 2.23s
30/53 mesa:compiler+glsl / general_ir_test        OK                 0.10s
31/53 mesa:compiler+glsl / sampler_types_test     OK                 0.08s
32/53 mesa:compiler+glsl / list_iterators         OK                 0.08s
33/53 mesa:compiler+glsl / glsl optimization      OK                 0.82s
34/53 mesa:gbm / gbm-abi-check                    OK                 0.04s
35/53 mesa:compiler+glcpp / glcpp test (bizarro)  OK                 2.16s
36/53 mesa:gbm / gbm-symbols-check                OK                 0.48s
37/53 mesa:llvmpipe / lp_test_arit                FAIL               1.06s   exit status 1
>>> MALLOC_PERTURB_=103 /var/tmp/portage/media-libs/mesa-23.0.0/work/mesa-23.0.0-.lp64d/src/gallium/drivers/llvmpipe/lp_test_arit
――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――
round.v1(-0.5): ref = -0, out = -1, precision = -inf bits, FAIL
round.v1(0.5): ref = 0, out = 1, precision = -inf bits, FAIL
round.v4(-0.5): ref = -0, out = -1, precision = -inf bits, FAIL
round.v4(0.5): ref = 0, out = 1, precision = -inf bits, FAIL
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

38/53 mesa:util / util_tests                      OK                 6.96s
39/53 mesa:compiler+glsl / glsl compiler warnings OK                 2.83s
40/53 mesa:llvmpipe / lp_test_printf              OK                 0.12s
41/53 mesa:llvmpipe / lp_test_lookup_multiple     OK                 0.15s
42/53 mesa:gallium / pipe_barrier_test            OK                 0.93s
43/53 mesa:gallium / u_half_test                  OK                 0.03s
44/53 mesa:gallium / u_prim_verts_test            OK                 0.03s
45/53 mesa:glx / dispatch-index-check             OK                 0.13s
46/53 mesa:glx / glx-test                         OK                 0.11s
47/53 mesa:mesa / main-test                       OK                 0.12s
48/53 mesa:st_mesa / st_format_test               OK                 0.10s
49/53 mesa:egl / egl-symbols-check                OK                 0.40s
50/53 mesa:egl / egl-entrypoint-check             OK                 0.28s
51/53 mesa:llvmpipe / lp_test_format              OK                 9.86s
52/53 mesa:llvmpipe / lp_test_conv                OK                11.16s
53/53 mesa:llvmpipe / lp_test_blend               OK                59.67s

Summary of Failures:

37/53 mesa:llvmpipe / lp_test_arit                FAIL               1.06s   exit status 1

Ok:                 52  
Expected Fail:      0   
Fail:               1   
Unexpected Pass:    0   
Skipped:            0   
Timeout:            0
Comment 8 Matt Turner gentoo-dev 2023-05-28 02:50:29 UTC
(In reply to Andrew Cameron from comment #6)
> According to the discussion on this issue MESA needs to be updated.

Mesa is just a name, not an acronym, FYI.

I don't know what you expect us to do in this bug report. Stuff doesn't work that's not expected to work. It needs to be fixed upstream.