New issue by pullmoll on void-packages repository https://github.com/void-linux/void-packages/issues/24020 Description: Trying to build `mesa` for our `mips*` targets, which are `musl` only, results in an error about missing `libm-2.30.so`. This happens only if the build environment is `i686`. Using an `i686-musl` or `x86_64` build environment works fine, where the latter has differing word size which may cause other problems. It seems that a host dependency makes its way into the target dependencies. Here's the relevant output if that helps. ``` … WARNING: Library target 'OSMesa' has 'name_prefix' set. Compilers may not find it from its '-lOSMesa' linker flag in the 'osmesa.pc' pkg-config file. WARNING: Library target 'OSMesa' has 'name_prefix' set. Compilers may not find it from its '-lOSMesa' linker flag in the 'osmesa-uninstalled.pc' pkg-config file. Message: Configuration summary: prefix: /usr libdir: lib includedir: include OpenGL: yes (ES1: yes ES2: yes) OSMesa: libOSMesa(Gallium) DRI platform: drm DRI drivers: no DRI driver dir: /usr/lib/dri GLX: DRI-based EGL: yes EGL drivers: builtin:egl_dri2 builtin:egl_dri3 GBM: yes EGL/Vulkan/VL platforms: x11 drm wayland surfaceless Vulkan drivers: no llvm: yes llvm-version: 10.0.0 Gallium drivers: swrast Gallium st: mesa HUD lmsensors: yes Shared-glapi: yes Build targets in project: 113 WARNING: Project specifies a minimum meson_version '>= 0.46' but uses features which were added in newer versions: * 0.51.0: {'dep.get_variable'} * 0.52.0: {'version arg in find_program'} Option buildtype is: plain [default: debugoptimized] Option b_ndebug is: true [default: if-release] Option cpp_std is: gnu++14 [default: c++14] Found ninja-1.10.0 at /usr/bin/ninja WARNING: custom_target 'glcpp-parse.[ch]' has more than one output! Using the first one. WARNING: custom_target 'glsl_parser' has more than one output! Using the first one. WARNING: custom_target 'program_parse_tab.[ch]' has more than one output! Using the first one. => mesa-20.1.4_2: running post_configure ... => mesa-20.1.4_2: running pre-build hook: 02-script-wrapper ... => mesa-20.1.4_2: running do_build ... ninja: Entering directory `build' ninja: error: '/usr/mips-linux-musl/usr/lib/libm-2.30.so', needed by 'src/gallium/targets/dri/libgallium_dri.so', missing and no known rule to make it => ERROR: mesa-20.1.4_2: do_build: '${make_cmd} -C ${meson_builddir} ${makejobs} ${make_build_args} ${make_build_target}' exited with 1 => ERROR: in do_build() at common/build-style/meson.sh:122 ``` This would be a problem for people trying to cross build mips on their own. Myself I can work around it as I have `i686-musl` also.