I played lot of hours to compile mesa and I got success for my native AMD64 CPU.
I tried also cross compilation and I am almost done, but near before the end i did stuck.
My desktop:
Debian GNU/Linux 11 (bullseye) x86_64 / Kernel: 5.15.89-xanmod1 / GNOME 3.38.6 / AMD Ryzen 9 3900X (24) @ 3.800GHz
Cross Compile file for meson:
Code: Select all
[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-13'
[built-in options]
c_args = ['-m32']
c_link_args = ['-m32']
cpp_args = ['-m32']
cpp_link_args = ['-m32']
[properties]
[host_machine]
system = 'linux'
cpu_family = 'x86'
cpu = 'i386'
endian = 'little'
Code: Select all
meson builddir32/ --prefix=/home/tomas/projects/installers32 --cross-file /home/tomas/projects/crosscompdef/mojenastaveni --pkg-config-path=/home/tomas/projects/installers32/lib/pkgconfig,/home/tomas/projects/installers32/share/pkgconfig,/usr/lib/i386-linux-gnu/pkgconfig,/usr/lib/x86_64-linux-gnu/pkgconfig -Degl=enabled -Degl-native-platform=auto -Dgallium-nine=true -Dgallium-va=enabled -Dgallium-vdpau=enabled -Dglx=dri -Dvideo-codecs=vc1dec,h264dec,h264enc,h265dec,h265enc -Dosmesa=true --buildtype=release
Code: Select all
The Meson build system
Version: 0.64.1
Source dir: /home/tomas/projects/sources/mesa-22.3.3
Build dir: /home/tomas/projects/sources/mesa-22.3.3/builddir32
Build type: cross build
Program python3 found: YES (/usr/bin/python3)
Project name: mesa
Project version: 22.3.3
C compiler for the host machine: /usr/bin/gcc (gcc 10.2.1 "gcc (Debian 10.2.1-6) 10.2.1 20210110")
C linker for the host machine: /usr/bin/gcc ld.bfd 2.35.2
C++ compiler for the host machine: /usr/bin/g++ (gcc 10.2.1 "g++ (Debian 10.2.1-6) 10.2.1 20210110")
C++ linker for the host machine: /usr/bin/g++ ld.bfd 2.35.2
C compiler for the build machine: cc (gcc 10.2.1 "cc (Debian 10.2.1-6) 10.2.1 20210110")
C linker for the build machine: cc ld.bfd 2.35.2
C++ compiler for the build machine: c++ (gcc 10.2.1 "c++ (Debian 10.2.1-6) 10.2.1 20210110")
C++ linker for the build machine: c++ ld.bfd 2.35.2
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86
Host machine cpu: i386
Target machine cpu family: x86
Target machine cpu: i386
Checking if "-mtls-dialect=gnu2" runs: YES
Found pkg-config: /usr/bin/pkg-config (1.7.3)
Run-time dependency vdpau found: YES 1.4
Program glslangValidator found: YES (/usr/bin/glslangValidator)
Run-time dependency libomxil-bellagio found: YES 0.9.3
Found CMake: NO
Run-time dependency libtizonia found: NO (tried pkgconfig and cmake)
Run-time dependency libtizplatform found: NO (tried pkgconfig and cmake)
Run-time dependency tizilheaders found: NO (tried pkgconfig and cmake)
Run-time dependency libva found: YES 1.10.0
Header "va/va.h" has symbol "VASurfaceAttribDRMFormatModifiers" with dependency libva: NO
Program python3 found: YES (/usr/bin/python3)
Fetching value of define "ETIME" : 62
Checking for function "bswap32" : YES
Checking for function "bswap64" : YES
Checking for function "clz" : YES
Checking for function "clzll" : YES
Checking for function "ctz" : YES
Checking for function "expect" : YES
Checking for function "ffs" : YES
Checking for function "ffsll" : YES
Checking for function "popcount" : YES
Checking for function "popcountll" : YES
Checking for function "unreachable" : YES
Checking for function "types_compatible_p" : YES
Compiler for C supports function attribute const: YES
Compiler for C supports function attribute flatten: YES
Compiler for C supports function attribute malloc: YES
Compiler for C supports function attribute pure: YES
Compiler for C supports function attribute unused: YES
Compiler for C supports function attribute warn_unused_result: YES
Compiler for C supports function attribute weak: YES
Compiler for C supports function attribute format: YES
Compiler for C supports function attribute packed: YES
Compiler for C supports function attribute returns_nonnull: YES
Compiler for C supports function attribute alias: YES
Compiler for C supports function attribute noreturn: YES
Compiler for C supports function attribute visibility:hidden: YES
Checking if "__uint128_t" compiles: NO
Checking for function "reallocarray" : YES
Compiler for C supports link arguments -Wl,--gc-sections: YES
Compiler for C supports arguments -Werror=implicit-function-declaration: YES
Compiler for C supports arguments -Werror=missing-prototypes: YES
Compiler for C supports arguments -Werror=return-type: YES
Compiler for C supports arguments -Werror=empty-body: YES
Compiler for C supports arguments -Werror=incompatible-pointer-types: YES
Compiler for C supports arguments -Werror=int-conversion: YES
Compiler for C supports arguments -Wimplicit-fallthrough: YES
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Compiler for C supports arguments -Wno-format-truncation: YES
Compiler for C supports arguments -fno-math-errno: YES
Compiler for C supports arguments -fno-trapping-math: YES
Compiler for C supports arguments -Qunused-arguments: NO
Compiler for C supports arguments -fno-common: YES
Compiler for C supports arguments -Wno-microsoft-enum-value: NO
Compiler for C supports arguments -Wno-unused-function: YES
Compiler for C supports arguments -Werror=format: YES
Compiler for C supports arguments -Wformat-security: YES
Compiler for C supports arguments -Werror=thread-safety: NO
Compiler for C supports arguments -ffunction-sections: YES
Compiler for C supports arguments -fdata-sections: YES
Compiler for C supports arguments -Wno-unused-variable: YES
Compiler for C supports arguments -Wno-unused-but-set-variable: YES
Compiler for C++ supports arguments -Werror=return-type: YES
Compiler for C++ supports arguments -Werror=empty-body: YES
Compiler for C++ supports arguments -Wno-non-virtual-dtor: YES
Compiler for C++ supports arguments -Wno-missing-field-initializers: YES
Compiler for C++ supports arguments -Wno-format-truncation: YES
Compiler for C++ supports arguments -fno-math-errno: YES
Compiler for C++ supports arguments -fno-trapping-math: YES
Compiler for C++ supports arguments -Qunused-arguments: NO
Compiler for C++ supports arguments -flifetime-dse=1: YES
Compiler for C++ supports arguments -Wno-microsoft-enum-value: NO
Compiler for C++ supports arguments -Werror=format: YES
Compiler for C++ supports arguments -Wformat-security: YES
Compiler for C++ supports arguments -ffunction-sections: YES
Compiler for C++ supports arguments -fdata-sections: YES
Compiler for C++ supports arguments -Wno-unused-variable: YES
Compiler for C++ supports arguments -Wno-unused-but-set-variable: YES
Compiler for C supports arguments -Wno-override-init: YES
Compiler for C supports arguments -Wno-initializer-overrides: NO
Compiler for C supports arguments -Werror=pointer-arith: YES
Compiler for C supports arguments -Werror=vla: YES
Compiler for C supports arguments -Werror=gnu-empty-initializer: NO
Compiler for C++ supports arguments -Werror=pointer-arith: YES
Compiler for C++ supports arguments -Werror=vla: YES
Compiler for C++ supports arguments -Werror=gnu-empty-initializer: NO
Checking if "GCC atomic builtins" compiles: YES
Checking if "GCC atomic builtins required -latomic" : links: YES
Checking if "GCC 64bit atomics" with dependency : links: YES
Library ws2_32 found: NO
Header "sys/sysmacros.h" has symbol "major" : YES
Header "sys/sysmacros.h" has symbol "minor" : YES
Header "sys/sysmacros.h" has symbol "makedev" : YES
Header "sys/mkdev.h" has symbol "major" : NO
Check usable header "sched.h" : YES
Checking for function "sched_getaffinity" : YES
Check usable header "xlocale.h" : NO
Check usable header "linux/futex.h" : YES
Check usable header "endian.h" : YES
Check usable header "dlfcn.h" : YES
Check usable header "sys/shm.h" : YES
Check usable header "cet.h" : YES
Check usable header "pthread_np.h" : NO
Checking for function "strtof" : YES
Checking for function "mkostemp" : YES
Checking for function "timespec_get" : YES
Checking for function "memfd_create" : YES
Checking for function "random_r" : YES
Checking for function "flock" : YES
Checking for function "strtok_r" : YES
Checking for function "getrandom" : YES
Checking for function "qsort_s" : NO
Checking if "GNU qsort_r" : links: YES
Header "time.h" has symbol "struct timespec" : YES
Checking for function "thrd_create" : NO
Header "errno.h" has symbol "program_invocation_name" : YES
Header "math.h" has symbol "issignaling" : YES
Checking for function "posix_memalign" : YES
Checking whether type "struct dirent" has member "d_type" : YES
Checking if "strtod has locale support" : links: YES
Checking if "Bsymbolic" : links: YES
Checking if "gc-sections" : links: YES
Checking if "version-script" : links: YES
Checking if "dynamic-list" : links: YES
Compiler for C supports link arguments -Wl,--build-id=sha1: YES
Checking for function "dlopen" : NO
Library dl found: YES
Checking for function "dladdr" with dependency -ldl: YES
Checking for function "dl_iterate_phdr" : YES
Checking for function "clock_gettime" : YES
Run-time dependency zlib found: YES 1.2.11
Run-time dependency libzstd found: YES 1.4.8
Run-time dependency threads found: YES
Checking for function "pthread_setaffinity_np" with dependency threads: YES
Run-time dependency expat found: YES 2.2.10
Library m found: YES
Message: libdrm 2.4.110 needed because amdgpu has the highest requirement
Run-time dependency libdrm_intel found: YES 2.4.114
Run-time dependency libdrm_amdgpu found: YES 2.4.114
Run-time dependency libdrm_radeon found: YES 2.4.114
Run-time dependency libdrm_nouveau found: YES 2.4.114
Run-time dependency libdrm found: YES 2.4.114
Run-time dependency libudev found: YES 247
WARNING: Ignoring LLVM CMake dependency because dynamic was requested
llvm-config found: YES (/usr/bin/llvm-config-13) 13.0.1
Run-time dependency LLVM (modules: amdgpu, asmparser, bitreader, bitwriter, core, engine, executionengine, instcombine, ipo, mcdisassembler, mcjit, native, scalaropts, transformutils, coroutines, lto) found: YES 13.0.1
Run-time dependency libelf found: YES 0.183
Run-time dependency valgrind found: YES 3.16.1
Program bison found: YES (/usr/bin/bison)
Program bison found: YES 3.7.5 (/usr/bin/bison)
Program flex found: YES (/usr/bin/flex)
Run-time dependency libunwind found: NO (tried pkgconfig and cmake)
Found pkg-config: /usr/bin/pkg-config (1.7.3)
Build-time dependency wayland-scanner found: YES 1.18.0
Program /usr/bin/wayland-scanner found: YES (/usr/bin/wayland-scanner)
Run-time dependency wayland-protocols found: YES 1.31
Run-time dependency wayland-client found: YES 1.21.90
Run-time dependency wayland-server found: YES 1.21.90
Run-time dependency wayland-egl-backend found: YES 3
Run-time dependency x11 found: YES 1.7.2
Run-time dependency xext found: YES 1.3.3
Run-time dependency xfixes found: YES 5.0.3
Run-time dependency xcb-glx found: YES 1.14
Run-time dependency xcb-shm found: YES 1.14
Run-time dependency xcb found: YES 1.14
Run-time dependency x11-xcb found: YES 1.7.2
Run-time dependency xcb-dri2 found: YES 1.14
Run-time dependency xcb-dri3 found: YES 1.14
Run-time dependency xcb-present found: YES 1.14
Dependency xcb-shm found: YES 1.14 (cached)
Run-time dependency xcb-sync found: YES 1.14
Run-time dependency xshmfence found: YES 1.3
Run-time dependency glproto found: YES 1.4.17
Run-time dependency dri2proto found: YES 2.8
Run-time dependency xxf86vm found: YES 1.1.4
Run-time dependency xcb-xfixes found: YES 1.14
Run-time dependency xcb-randr found: YES 1.14
Run-time dependency xrandr found: YES 1.5.1
Library sensors found: NO
Program nm found: YES (/usr/bin/nm)
Program symbols-check.py found: YES (/usr/bin/python3 /home/tomas/projects/sources/mesa-22.3.3/bin/symbols-check.py)
Program install_megadrivers.py found: YES (/usr/bin/python3 /home/tomas/projects/sources/mesa-22.3.3/bin/install_megadrivers.py)
WARNING: Library target 'GLESv1_CM' has 'name_prefix' set. Compilers may not find it from its '-lGLESv1_CM' linker flag in the 'glesv1_cm.pc' pkg-config file.
WARNING: Library target 'GLESv1_CM' has 'name_prefix' set. Compilers may not find it from its '-lGLESv1_CM' linker flag in the 'glesv1_cm-uninstalled.pc' pkg-config file.
WARNING: Library target 'GLESv2' has 'name_prefix' set. Compilers may not find it from its '-lGLESv2' linker flag in the 'glesv2.pc' pkg-config file.
WARNING: Library target 'GLESv2' has 'name_prefix' set. Compilers may not find it from its '-lGLESv2' linker flag in the 'glesv2-uninstalled.pc' pkg-config file.
Program decode.py found: YES (/home/tomas/projects/sources/mesa-22.3.3/src/compiler/isaspec/decode.py)
Program encode.py found: YES (/home/tomas/projects/sources/mesa-22.3.3/src/compiler/isaspec/encode.py)
Compiler for C++ supports arguments -Wno-unused-variable: YES (cached)
Compiler for C++ supports arguments -Wno-unused-local-typedefs: YES
Compiler for C++ supports arguments -Wno-unused-but-set-variable: YES (cached)
Compiler for C++ supports arguments -Wno-maybe-uninitialized: YES
Compiler for C++ supports arguments -Wno-self-assign: NO
Compiler for C++ supports arguments -fno-exceptions: YES
Compiler for C++ supports arguments -fno-rtti: YES
Compiler for C++ supports arguments -Wimplicit-fallthrough: YES
Compiler for C++ supports arguments -Wshadow: YES
Compiler for C supports arguments -Wimplicit-fallthrough: YES (cached)
Compiler for C supports arguments -Wshadow: YES
Checking for type "std::pmr::monotonic_buffer_resource" : YES
Program ln found: YES (/usr/bin/ln)
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.
Configuring xa_tracker.h using configuration
Checking for function "mincore" : YES
WARNING: Library target 'EGL' has 'name_prefix' set. Compilers may not find it from its '-lEGL' linker flag in the 'egl.pc' pkg-config file.
WARNING: Library target 'EGL' has 'name_prefix' set. Compilers may not find it from its '-lEGL' linker flag in the 'egl-uninstalled.pc' pkg-config file.
Message: Configuration summary:
prefix: /home/tomas/projects/installers32
libdir: lib
includedir: include
OpenGL: yes (ES1: yes ES2: yes)
OSMesa: libOSMesa
DRI platform: drm
DRI driver dir: /home/tomas/projects/installers32/lib/dri
GLX: DRI-based
EGL: yes
EGL drivers: builtin:egl_dri2 builtin:egl_dri3
EGL/Vulkan/VL platforms: x11 wayland surfaceless drm xcb
GBM: yes
GBM backends path: /home/tomas/projects/installers32/lib/gbm
Video Codecs: vc1dec h264dec h264enc h265dec h265enc
Vulkan drivers: amd intel intel_hasvk swrast
Vulkan ICD dir: share/vulkan/icd.d
Vulkan Intel Ray Tracing: no
llvm: yes
llvm-version: 13.0.1
Gallium drivers: r300 r600 radeonsi nouveau virgl svga swrast iris crocus i915
Gallium st: mesa xa vdpau va nine
HUD lmsensors: no
Shared-glapi: yes
Perfetto: no
Perfetto ds: auto
Build targets in project: 290
NOTICE: Future-deprecated features used:
* 0.55.0: {'meson.has_exe_wrapper', 'ExternalProgram.path'}
* 0.56.0: {'meson.source_root'}
mesa 22.3.3
User defined options
Cross files : /home/tomas/projects/crosscompdef/mojenastaveni
buildtype : release
pkg_config_path : /home/tomas/projects/installers32/lib/pkgconfig,/home/tomas/projects/installers32/share/pkgconfig,/usr/lib/i386-linux-gnu/pkgconfig,/usr/lib/x86_64-linux-gnu/pkgconfig
prefix : /home/tomas/projects/installers32
egl : enabled
egl-native-platform: auto
gallium-nine : true
gallium-va : enabled
gallium-vdpau : enabled
glx : dri
osmesa : true
video-codecs : vc1dec,h264dec,h264enc,h265dec,h265enc
Found ninja-1.10.1 at /usr/bin/ninja
Code: Select all
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: cannot find -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: cannot find -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/llvm-13/lib/libLLVM-13.so when searching for -lLLVM-13
/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libLLVM-13.so when searching for -lLLVM-13
collect2: error: ld returned 1 exit status
[2273/2360] Compiling C object src/gallium/frontends/nine/libnine_st.a.p/nine_ff.c.o
ninja: build stopped: subcommand failed.
Thanks in advance.