mesa build: libelf should be required by meson config (minor)
System information
I am building this in a docker container of Ubuntu 22.04 in order to make this easy. I can provide the Dockerfile that can reproduce it if necessary.
Describe the issue
I was advised to file a minor bug for this.
When I compiled mesa in a container, I forgot to install the header files for libelf.
Meson told me it was important when I configured it:
Run-time dependency libelf found: NO (tried pkgconfig and cmake)
Library elf found: NO
But it proceeded with the configuration, so I thought it was an optional requirement, like other missing libraries. Turns out it isn't:
/usr/bin/ld: src/gallium/drivers/radeonsi/libradeonsi.a.p/si_shader.c.o: in function `si_shader_dump_disassembly':
/src/build/../src/gallium/drivers/radeonsi/si_shader.c:967: undefined reference to `ac_rtld_open'
/usr/bin/ld: /src/build/../src/gallium/drivers/radeonsi/si_shader.c:979: undefined reference to `ac_rtld_get_section_by_name'
/usr/bin/ld: /src/build/../src/gallium/drivers/radeonsi/si_shader.c:1016: undefined reference to `ac_rtld_close'
[...]
si_update_shaders<(amd_gfx_level)13, (si_has_tess)1, (si_has_gs)0, (si_has_ngg)1>(si_context*)':
/src/build/../src/gallium/drivers/radeonsi/si_state_draw.cpp:372: undefined reference to `ac_rtld_upload'
/usr/bin/ld: /src/build/../src/gallium/drivers/radeonsi/si_state_draw.cpp:373: undefined reference to `ac_rtld_close'
/usr/bin/ld: src/gallium/drivers/radeonsi/libradeonsi_gfx103.a.p/si_state_draw.cpp.o: in function `bool
Apparently the meson build config needs to make libelf "required" rather than "optional."