[Mesa-users] cross-compile 32-bit Mesa on 64-bit Debian-11

kolAflash at kolahilft.de kolAflash at kolahilft.de
Wed Jun 16 02:17:47 UTC 2021


Hi,

I couldn't manage to get a 32-bit Mesa 20.3.5 compiled on a Debian-11 
Bullseye.
(current Beta/Testing to be release this summer)

Background:
https://bugs.winehq.org/show_bug.cgi?id=51081#c8



My cross-file.
There's no pkg-config32 and no llvm-config32 on Debian-11.
----------
[binaries]
c = '/usr/bin/gcc'
cpp = '/usr/bin/g++'
ar = '/usr/bin/gcc-ar'
strip = '/usr/bin/strip'
pkgconfig = '/usr/bin/pkg-config'
llvm-config = '/usr/bin/llvm-config'

[properties]
c_args = ['-m32']
c_link_args = ['-m32']
cpp_args = ['-m32']
cpp_link_args = ['-m32']

[host_machine]
system = 'linux'
cpu_family = 'x86'
cpu = 'i686'
endian = 'little'
----------



My build commands:

PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig meson setup 
--cross-file=../32bit -Dplatforms=x11 -Ddri-drivers= 
-Dgallium-drivers=radeonsi -Dvulkan-drivers=amd build32/

nice ninja -C build32/



The error by ninja:

[1245/1252] Linking target 
src/gallium/targets/vdpau/libvdpau_gallium.so.1.0.0
FAILED: src/gallium/targets/vdpau/libvdpau_gallium.so.1.0.0
/usr/bin/g++  -o src/gallium/targets/vdpau/libvdpau_gallium.so.1.0.0 
src/gallium/targets/vdpau/libvdpau_gallium.so.1.0.0.p/target.c.o 
-Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group 
-Wl,-soname,libvdpau_gallium.so.1.0.0 -Wl,--whole-archive 
src/gallium/frontends/vdpau/libvdpau_st.a -Wl,--no-whole-archive -m32 
src/gallium/auxiliary/libgalliumvlwinsys.a 
src/gallium/auxiliary/libgalliumvl.a src/gallium/auxiliary/libgallium.a 
src/compiler/nir/libnir.a src/compiler/libcompiler.a 
src/util/libmesa_util.a src/util/format/libmesa_format.a 
src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a 
src/loader/libloader.a src/util/libxmlconfig.a 
src/gallium/winsys/sw/null/libws_null.a 
src/gallium/winsys/sw/wrapper/libwsw.a 
src/gallium/winsys/sw/dri/libswdri.a 
src/gallium/winsys/sw/kms-dri/libswkmsdri.a 
src/gallium/drivers/radeonsi/libradeonsi.a 
src/gallium/winsys/radeon/drm/libradeonwinsys.a 
src/gallium/winsys/amdgpu/drm/libamdgpuwinsys.a 
src/amd/addrlib/libaddrlib.a src/amd/common/libamd_common.a 
src/amd/llvm/libamd_common_llvm.a -Wl,--version-script 
/home/user/opt/wine-versions/mesa-20.3.5/build/mesa-20.3.5/src/gallium/targets/vdpau/vdpau.sym 
-Wl,--dynamic-list 
/home/user/opt/wine-versions/mesa-20.3.5/build/mesa-20.3.5/src/gallium/targets/vdpau/../dri-vdpau.dyn 
-Wl,--gc-sections /usr/lib/i386-linux-gnu/libz.so -pthread -lm 
/usr/lib/i386-linux-gnu/libdrm.so /usr/lib/i386-linux-gnu/libxcb-sync.so 
/usr/lib/i386-linux-gnu/libxcb-present.so 
/usr/lib/i386-linux-gnu/libxshmfence.so 
/usr/lib/i386-linux-gnu/libxcb-xfixes.so 
/usr/lib/i386-linux-gnu/libxcb-dri3.so -L/usr/lib/llvm-11/lib -lLLVM-11 
-ldl -lsensors 
/usr/lib/gcc/x86_64-linux-gnu/10/../../../i386-linux-gnu/libzstd.so 
/usr/lib/i386-linux-gnu/libunwind.so /usr/lib/i386-linux-gnu/libexpat.so 
-L/usr/lib/llvm-11/lib -lLLVM-11 
/usr/lib/i386-linux-gnu/libdrm_radeon.so -L/usr/lib/llvm-11/lib 
-lLLVM-11 /usr/lib/i386-linux-gnu/libdrm_amdgpu.so 
/usr/lib/i386-linux-gnu/libelf.so -L/usr/lib/llvm-11/lib -lLLVM-11 
/usr/lib/i386-linux-gnu/libxcb.so /usr/lib/i386-linux-gnu/libX11-xcb.so 
/usr/lib/i386-linux-gnu/libX11.so /usr/lib/i386-linux-gnu/libxcb-dri2.so 
-Wl,--end-group
/usr/bin/ld: skipping incompatible /usr/lib/llvm-11/lib/libLLVM-11.so 
when searching for -lLLVM-11
/usr/bin/ld: skipping incompatible /usr/lib/llvm-11/lib/libLLVM-11.so 
when searching for -lLLVM-11
/usr/bin/ld: skipping incompatible /usr/lib/llvm-11/lib/libLLVM-11.so 
when searching for -lLLVM-11
/usr/bin/ld: skipping incompatible /usr/lib/llvm-11/lib/libLLVM-11.so 
when searching for -lLLVM-11
/usr/bin/ld: skipping incompatible /usr/lib/llvm-11/lib/libLLVM-11.so 
when searching for -lLLVM-11
/usr/bin/ld: skipping incompatible /usr/lib/llvm-11/lib/libLLVM-11.so 
when searching for -lLLVM-11
/usr/bin/ld: skipping incompatible /usr/lib/llvm-11/lib/libLLVM-11.so 
when searching for -lLLVM-11
/usr/bin/ld: skipping incompatible /usr/lib/llvm-11/lib/libLLVM-11.so 
when searching for -lLLVM-11
/usr/bin/ld: skipping incompatible /usr/lib/llvm-11/lib/libLLVM-11.so 
when searching for -lLLVM-11
/usr/bin/ld: skipping incompatible /usr/lib/llvm-11/lib/libLLVM-11.so 
when searching for -lLLVM-11
/usr/bin/ld: skipping incompatible /usr/lib/llvm-11/lib/libLLVM-11.so 
when searching for -lLLVM-11
/usr/bin/ld: skipping incompatible /usr/lib/llvm-11/lib/libLLVM-11.so 
when searching for -lLLVM-11
/usr/bin/ld: skipping incompatible /usr/lib/llvm-11/lib/libLLVM-11.so 
when searching for -lLLVM-11
/usr/bin/ld: skipping incompatible /usr/lib/llvm-11/lib/libLLVM-11.so 
when searching for -lLLVM-11
/usr/bin/ld: skipping incompatible /usr/lib/llvm-11/lib/libLLVM-11.so 
when searching for -lLLVM-11
/usr/bin/ld: skipping incompatible /usr/lib/llvm-11/lib/libLLVM-11.so 
when searching for -lLLVM-11
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/x86_64-linux-gnu/10/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/x86_64-linux-gnu/10/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
/usr/bin/ld: skipping incompatible 
/usr/lib/gcc/x86_64-linux-gnu/10/libstdc++.so when searching for -lstdc++
collect2: error: ld returned 1 exit status


I guess instead /usr/lib/i386-linux-gnu/libLLVM-11.so should be used for 
linking.
But I can't convince meson to use this file instead of the mentioned one.



Regards,

kolAflash




-- 
E-Mail: kolAflash at kolahilft.de
PGP key: 0xD83C3408
https://misc.kolahilft.de/pgp/kolAflash_0xD83C3408.asc
https://en.wikipedia.org/wiki/Pretty_Good_Privacy
https://de.wikipedia.org/wiki/OpenPGP
Chat via Jabber/XMPP: kolAflash at jabber.ccc.de
https://en.wikipedia.org/wiki/XMPP
https://de.wikipedia.org/wiki/XMPP

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-users/attachments/20210616/3691994e/attachment.sig>


More information about the mesa-users mailing list