LINUX.ORG.RU

для сборки старой mesa нужен старый meson

 , ,


0

1

Так получилось, что нужно собрать старую месу (19.2.8) из-за старого железа.
Ругается и выдаёт ошибку, что используется слишком новая версия meson'а:

The Meson build system
Version: 1.0.0
Source dir: /w/t/src/mesa-19.2.8
Build dir: /w/t/src/build
Build type: native build
Program python3 found: YES (/usr/bin/python3)
WARNING: You should add the boolean check kwarg to the run_command call.
         It currently defaults to false,
         but it will default to true in future releases of meson.
         See also: https://github.com/mesonbuild/meson/issues/9300
Project name: mesa
Project version: 19.2.8
C compiler for the host machine: cc (gcc 12.2.0 "cc (CRUX-x86_64-multilib) 12.2.0")
C linker for the host machine: cc ld.bfd 2.39
C++ compiler for the host machine: c++ (gcc 12.2.0 "c++ (CRUX-x86_64-multilib) 12.2.0")
C++ linker for the host machine: c++ ld.bfd 2.39
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program pkg-config found: YES (/usr/bin/pkg-config)
Found pkg-config: /usr/bin/pkg-config (1.9.3)
Run-time dependency vdpau found: YES 1.5
Run-time dependency xvmc found: YES 1.0.13
Run-time dependency xv found: YES 1.0.12
Run-time dependency libva found: YES 1.17.0
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 if "__attribute__((const))" compiles: YES 
Checking if "__attribute__((flatten))" compiles: YES 
Checking if "__attribute__((malloc))" compiles: YES 
Checking if "__attribute__((pure))" compiles: YES 
Checking if "__attribute__((unused))" compiles: YES 
Checking if "__attribute__((warn_unused_result))" compiles: YES 
Checking if "__attribute__((weak))" compiles: YES 
Checking if "__attribute__((format(...)))" compiles: YES 
Checking if "__attribute__((packed))" compiles: YES 
Checking if "__attribute__((returns_nonnull))" compiles: YES 
Checking if "__attribute__((visibility(...)))" compiles: YES 
Checking if "__attribute__((alias(...)))" compiles: YES 
Checking if "__attribute__((__noreturn__))" compiles: YES 
Checking if "__uint128_t" compiles: 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=incompatible-pointer-types: YES 
Compiler for C supports arguments -Werror=format: YES 
Compiler for C supports arguments -Wformat-security: 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 -fvisibility=hidden: YES 
Compiler for C++ supports arguments -Werror=return-type: YES 
Compiler for C++ supports arguments -Werror=format: YES 
Compiler for C++ supports arguments -Wformat-security: 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 -Wno-override-init: YES 
Compiler for C supports arguments -Wno-initializer-overrides: NO 
Compiler for C++ supports arguments -fvisibility=hidden: YES 
Compiler for C supports arguments -Werror=pointer-arith: YES 
Compiler for C++ supports arguments -Werror=pointer-arith: YES 
Compiler for C supports arguments -Werror=vla: YES 
Compiler for C++ supports arguments -Werror=vla: YES 
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 
Header "sys/sysmacros.h" has symbol "major" : YES 
Checking if "xlocale.h" compiles: NO 
Checking if "sys/sysctl.h" compiles: NO 
Checking if "linux/futex.h" compiles: YES 
Checking if "endian.h" compiles: YES 
Checking if "dlfcn.h" compiles: YES 
Checking if "execinfo.h" compiles: YES 
Checking if "sys/shm.h" compiles: YES 
Checking if "cet.h" compiles: YES 
Checking for function "strtof" : YES 
Checking for function "mkostemp" : YES 
Checking for function "posix_memalign" : YES 
Checking for function "timespec_get" : YES 
Checking for function "memfd_create" : YES 
Checking for function "random_r" : YES 
Checking for function "flock" : YES 
Header "errno.h" has symbol "program_invocation_name" : 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 
Checking for function "dlopen" : YES 
Checking for function "dladdr" with dependency : YES 
Checking for function "dl_iterate_phdr" : YES 
Checking for function "clock_gettime" : YES 
Run-time dependency zlib found: YES 1.2.13
Run-time dependency threads found: YES
Checking for function "pthread_setaffinity_np" with dependency threads: YES 
Checking for function "pthread_setaffinity_np" with dependency threads: NO 
Run-time dependency expat found: YES 2.5.0
Library m found: YES
Message: libdrm 2.4.99 needed because amdgpu has the highest requirement
Run-time dependency libdrm_amdgpu found: YES 2.4.114
Run-time dependency libdrm_radeon found: YES 2.4.114
Run-time dependency libdrm found: YES 2.4.114
llvm-config found: YES (/usr/bin/llvm-config) 15.0.6
Run-time dependency LLVM (modules: amdgpu, asmparser, bitreader, bitwriter, engine, ipo, mcdisassembler, mcjit, native) found: YES 15.0.6
Run-time dependency libelf found: YES 0.188
Run-time dependency libglvnd found: YES 1.6.0
Program bison found: YES (/usr/bin/bison)
Program flex found: YES (/usr/bin/flex)
Run-time dependency x11 found: YES 1.8.3
Run-time dependency xext found: YES 1.3.5
Run-time dependency xdamage found: YES 1.1.6
Run-time dependency xfixes found: YES 6.0.0
Run-time dependency xcb-glx found: YES 1.15
Run-time dependency xcb found: YES 1.15
Run-time dependency x11-xcb found: YES 1.8.3
Run-time dependency xcb-dri2 found: YES 1.15
Run-time dependency xcb-dri3 found: YES 1.15
Run-time dependency xcb-present found: YES 1.15
Run-time dependency xcb-sync found: YES 1.15
Run-time dependency xshmfence found: YES 1.3.2
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.5
Run-time dependency xcb-xfixes found: YES 1.15
Run-time dependency xcb-randr found: YES 1.15
Run-time dependency xrandr found: YES 1.5.3
Library sensors found: YES
Program nm found: YES (/usr/bin/nm)
Program symbols-check.py found: YES (/usr/bin/env python /w/t/src/mesa-19.2.8/bin/symbols-check.py)
Program msgfmt found: YES (/usr/bin/msgfmt)
Program msginit found: YES (/usr/bin/msginit)
Program msgmerge found: YES (/usr/bin/msgmerge)
Program xgettext found: YES (/usr/bin/xgettext)
mesa-19.2.8/src/mesa/drivers/dri/meson.build:77: WARNING: Project targets '>= 0.46' but uses feature introduced in '0.50.0': Python module path method.
Checking for function "mincore" : YES 
mesa-19.2.8/src/gallium/targets/dri/meson.build:110: WARNING: Project targets '>= 0.46' but uses feature introduced in '0.50.0': Python module path method.
mesa-19.2.8/src/gallium/targets/vdpau/meson.build:74: WARNING: Project targets '>= 0.46' but uses feature introduced in '0.50.0': Python module path method.
mesa-19.2.8/src/gallium/targets/xvmc/meson.build:63: WARNING: Project targets '>= 0.46' but uses feature introduced in '0.50.0': Python module path method.
mesa-19.2.8/src/gallium/targets/va/meson.build:68: WARNING: Project targets '>= 0.46' but uses feature introduced in '0.50.0': Python module path method.
Configuring xa_tracker.h using configuration
Message: Configuration summary:
        
        prefix:          /usr
        libdir:          lib
        includedir:      include
        
        OpenGL:          yes (ES1: yes ES2: yes)
        
        OSMesa:          libOSMesa(Gallium)
        
        DRI platform:    drm
        DRI drivers:     r200
        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:   drm x11
        
        Vulkan drivers:  amd
        Vulkan ICD dir:  share/vulkan/icd.d
        
        llvm:            yes
        llvm-version:    15.0.6
        
        Gallium drivers: r600 radeonsi svga swrast
        Gallium st:      mesa xa xvmc xvmc vdpau va nine
        HUD lmsensors:   yes
        
        Shared-glapi:    yes

Build targets in project: 139
WARNING: Project specifies a minimum meson_version '>= 0.46' but uses features which were added in newer versions:
 * 0.50.0: {'Python module path method'}
NOTICE: Future-deprecated features used:
 * 0.47.0: {'build_always arg in custom_target'}
 * 0.55.0: {'ExternalProgram.path'}
 * 0.56.0: {'dependency.get_configtool_variable', 'meson.source_root'}

mesa 19.2.8

  User defined options
    buildtype        : plain
    prefix           : /usr
    sysconfdir       : /etc
    wrap_mode        : nodownload
    b_lto            : false
    b_pie            : true
    dri-drivers      : r200
    dri3             : true
    egl              : true
    gallium-drivers  : r600,radeonsi,svga,swrast
    gallium-extra-hud: true
    gallium-nine     : true
    gallium-omx      : disabled
    gallium-va       : true
    gallium-vdpau    : true
    gallium-xa       : true
    gallium-xvmc     : true
    gbm              : true
    gles1            : true
    gles2            : true
    glvnd            : true
    glx              : dri
    glx-direct       : true
    libunwind        : false
    llvm             : true
    lmsensors        : true
    opengl           : true
    osmesa           : gallium
    platforms        : drm,x11
    shared-glapi     : true
    shared-llvm      : true
    tools            : glsl,nir
    valgrind         : false
    vulkan-drivers   : amd

Found ninja-1.11.1 at /usr/bin/ninja
+ meson compile -C build -j4
ninja: Entering directory `/w/t/src/build'
[1/1679] Compiling C object src/libglsl_util.a.p/mesa_program_symbol_table.c.o
[2/1679] Compiling C object src/libglsl_util.a.p/mesa_main_extensions_table.c.o
[3/1679] Generating src/git_sha1.h with a custom command
[4/1679] Compiling C object src/libglsl_util.a.p/mesa_main_imports.c.o
[5/1679] Generating src/util/xmlpool/xmlpool_options.h with a custom command
Warning: language 'ca' not found.
Warning: language 'es' not found.
Warning: language 'de' not found.
Warning: language 'nl' not found.
Warning: language 'sv' not found.
Warning: language 'fr' not found.
[6/1679] Compiling C object src/libglsl_util.a.p/mesa_program_prog_parameter.c.o
../mesa-19.2.8/src/mesa/program/prog_parameter.c:412:50: warning: argument 2 of type 'const gl_state_index16[5]' {aka 'const short int[5]'} with mismatched bound [-Warray-parameter=]
  412 |                           const gl_state_index16 stateTokens[STATE_LENGTH])
      |                           ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../mesa-19.2.8/src/mesa/program/prog_parameter.c:36:
../mesa-19.2.8/src/mesa/program/prog_parameter.h:174:50: note: previously declared as 'const gl_state_index16[]' {aka 'const short int[]'}
  174 |                           const gl_state_index16 stateTokens[]);
      |                           ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
[7/1679] Compiling C object src/libglsl_util.a.p/mesa_program_dummy_errors.c.o
[8/1679] Linking static target src/libglsl_util.a
[9/1679] Compiling C object src/util/libmesa_util.a.p/bitscan.c.o
[10/1679] Compiling C object src/util/libmesa_util.a.p/anon_file.c.o
[11/1679] Compiling C object src/util/libmesa_util.a.p/build_id.c.o
[12/1679] Compiling C object src/util/libmesa_util.a.p/crc32.c.o
[13/1679] Compiling C object src/util/libmesa_util.a.p/dag.c.o
[14/1679] Compiling C object src/util/libmesa_util.a.p/fast_idiv_by_const.c.o
[15/1679] Compiling C object src/util/libmesa_util.a.p/debug.c.o
[16/1679] Compiling C object src/util/libmesa_util.a.p/half_float.c.o
[17/1679] Compiling C object src/util/libmesa_util.a.p/mesa-sha1.c.o
[18/1679] Compiling C object src/util/libmesa_util.a.p/os_time.c.o
[19/1679] Compiling C object src/util/libmesa_util.a.p/disk_cache.c.o
[20/1679] Compiling C object src/util/libmesa_util.a.p/os_file.c.o
[21/1679] Compiling C object src/util/libmesa_util.a.p/os_misc.c.o
[22/1679] Compiling C object src/util/libmesa_util.a.p/u_process.c.o
[23/1679] Compiling C object src/util/libmesa_util.a.p/hash_table.c.o
[24/1679] Compiling C object src/util/libmesa_util.a.p/rand_xor.c.o
[25/1679] Compiling C object src/util/libmesa_util.a.p/sha1_sha1.c.o
[26/1679] Compiling C object src/util/libmesa_util.a.p/rb_tree.c.o
[27/1679] Compiling C object src/util/libmesa_util.a.p/ralloc.c.o
[28/1679] Compiling C object src/util/libmesa_util.a.p/set.c.o
[29/1679] Compiling C object src/util/libmesa_util.a.p/slab.c.o
[30/1679] Compiling C object src/util/libmesa_util.a.p/string_buffer.c.o
[31/1679] Compiling C object src/util/libmesa_util.a.p/register_allocate.c.o
[32/1679] Compiling C object src/util/libmesa_util.a.p/u_atomic.c.o
[33/1679] Compiling C object src/util/libmesa_util.a.p/strtod.c.o
[34/1679] Compiling C object src/util/libmesa_util.a.p/rgtc.c.o
[35/1679] Compiling C object src/util/libmesa_util.a.p/u_vector.c.o
[36/1679] Compiling C object src/util/libmesa_util.a.p/u_math.c.o
[37/1679] Compiling C object src/util/libmesa_util.a.p/u_queue.c.o
[38/1679] Compiling C object src/util/libmesa_util.a.p/u_cpu_detect.c.o
[39/1679] Compiling C object src/util/libmesa_util.a.p/u_debug.c.o
[40/1679] Compiling C object src/util/libmesa_util.a.p/vma.c.o
[41/1679] Generating src/mapi/glapi/gen/glapi_mapi_tmp.h with a custom command (wrapped by meson to capture output)
FAILED: src/mapi/glapi/gen/glapi_mapi_tmp.h 
/usr/bin/meson --internal exe --capture src/mapi/glapi/gen/glapi_mapi_tmp.h -- /usr/bin/python3 ../mesa-19.2.8/src/mapi/mapi_abi.py --printer glapi ../mesa-19.2.8/src/mapi/glapi/gen/gl_and_es_API.xml
--- stderr ---
Traceback (most recent call last):
  File "/w/t/src/build/../mesa-19.2.8/src/mapi/mapi_abi.py", line 674, in <module>
    main()
  File "/w/t/src/build/../mesa-19.2.8/src/mapi/mapi_abi.py", line 667, in main
    entries = abi_parse_xml(filename)
  File "/w/t/src/build/../mesa-19.2.8/src/mapi/mapi_abi.py", line 140, in abi_parse_xml
    api = gl_XML.parse_GL_API(xml, glX_XML.glx_item_factory())
  File "/w/t/src/build/../mesa-19.2.8/src/mapi/glapi/gen/gl_XML.py", line 44, in parse_GL_API
    api.parse_file( file_name )
  File "/w/t/src/build/../mesa-19.2.8/src/mapi/glapi/gen/gl_XML.py", line 858, in parse_file
    self.process_element(file_name, doc)
  File "/w/t/src/build/../mesa-19.2.8/src/mapi/glapi/gen/gl_XML.py", line 864, in process_element
    self.process_OpenGLAPI(file_name, element)
  File "/w/t/src/build/../mesa-19.2.8/src/mapi/glapi/gen/gl_XML.py", line 869, in process_OpenGLAPI
    for child in element.getchildren():
AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getchildren'

[42/1679] Compiling C object src/util/libxmlconfig.a.p/xmlconfig.c.o
[43/1679] Generating src/mapi/glapi/gen/enums.c with a custom command (wrapped by meson to capture output)
[44/1679] Generating src/util/format_srgb with a custom command (wrapped by meson to capture output)
ninja: build stopped: subcommand failed.
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -C /w/t/src/build -j 4
Подскажите, как быть? Можно пропатчить месу, или придётся ещё старый meson устанавливать?
Помогите!

★★★★★

Последнее исправление: teod0r (всего исправлений: 1)

Ответ на: комментарий от irton

теперь смотрим https://gitlab.freedesktop.org/mesa/mesa/-/issues/7903

взял от туда строки для ac_llvm_helper.cpp. теперь он выглядит так: https://sebsauvage.net/paste/?d89ebc657828a1b0#3g Uny1ONXly72VekAiQAwgPo7Zl4W...

пошло дальше. теперь такая ошибка: https://sebsauvage.net/paste/?33b7fbdf60a90064#iZCHVTMwNKuwPMo1ROfadfxQ4ADLZb...

teod0r ★★★★★
() автор топика
Ответ на: комментарий от teod0r

ничего особо не могу найти, смотрите этот коммит https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17514/diffs

можно еще галлиум отключить в параметрах сборки, вдруг ненужен

irton ★★★★★
()
Последнее исправление: irton (всего исправлений: 1)
Ответ на: комментарий от irton

смотрите этот коммит https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17514/diffs

там вроде как кроме
+#if LLVM_VERSION_MAJOR >= 15
ничего и нету.
если галлиум откоючить, всё собирается.

вдруг ненужен

а вообще, что он даёт? он, вроде как, даёт большкю производительность, на сколько я знаю.
а вообще это всё из-за того что llvm слишком новый? с какой последней версией llvm'а всё будет собираться? 14.x.x?

teod0r ★★★★★
() автор топика
Ответ на: комментарий от irton

поставил. теперь https://sebsauvage.net/paste/?2295aa6e1238c6e8#HCv8myVPwzsAj7vsfGPTTtB1wrIFzO...
в файле src/gallium/auxiliary/gallivm/lp_bld_arit.c уже нет таких строк https://sebsauvage.net/paste/?063cfca48f702d4f#aaOADkbpwRM/YZDtKUpsD0xV9WAOjP...

teod0r ★★★★★
() автор топика
Ответ на: комментарий от irton

далее там была вот такая ошибка https://sebsauvage.net/paste/?4c06ee02e0b327bb#Co9cSSEbtlm4mSkYcVTzXDrOdtQJP8...
я взял CallSite.h отсюда https://github.com/llvm-mirror/llvm/blob/master/include/llvm/IR/CallSite.h
, пропатчил lp_bld_misc.cpp

-#include <llvm/IR/CallSite.h>
+#include "CallSite.h"
, теперь https://sebsauvage.net/paste/?aef21397f7d8232f#OwSlS8WulUkXmHaU31iOjjd8APHA76...

teod0r ★★★★★
() автор топика
Ответ на: комментарий от teod0r

Чейта не поменялось, как раз исправилось и теперь другая ошибка. А все что ниже это варнинги.

../mesa-19.2.8/src/gallium/auxiliary/draw/draw_llvm.c:529:33: error: ‘llvmpipe’ undeclared (first use in this function) 529 | LLVMContextSetOpaquePointers(llvmpipe->context, false);

попробуйте эту строку совсем убрать или закоментировать LLVMContextSetOpaquePointers(llvmpipe->context, false);

Стоит поискать также ее в таком виде в файле src/amd/llvm/ac_llvm_build.c

LLVMContextSetOpaquePointers(ctx->context, false);

Я нашел только такое вот коммит https://gitlab.freedesktop.org/mesa/mesa/-/commit/19b6c889be7c7151d50e46b9cac0c416232c47c9#7cb5e74c5500e6abd64deda5c5bcc4a8d39318c2

irton ★★★★★
()
Последнее исправление: irton (всего исправлений: 2)
Ответ на: комментарий от irton
> grep -r LLVMContextSetOpaquePointers b
b/src/gallium/auxiliary/draw/draw_llvm.c:   LLVMContextSetOpaquePointers(llvmpipe->context, false);
b/src/gallium/drivers/llvmpipe/lp_test_arit.c:   LLVMContextSetOpaquePointers(context, false);
b/src/gallium/drivers/llvmpipe/lp_test_format.c:   LLVMContextSetOpaquePointers(context, false);
b/src/gallium/drivers/llvmpipe/lp_test_format.c:   LLVMContextSetOpaquePointers(context, false);
b/src/gallium/drivers/llvmpipe/lp_test_conv.c:   LLVMContextSetOpaquePointers(context, false);
b/src/gallium/drivers/llvmpipe/lp_test_printf.c:   LLVMContextSetOpaquePointers(context, false);
b/src/gallium/drivers/llvmpipe/lp_test_blend.c:   LLVMContextSetOpaquePointers(context, false);
teod0r ★★★★★
() автор топика
Ответ на: комментарий от irton

все эти строки мы с вами добавляли ранее в предыдущих патчах, их нет в оригинале.
убрал из src/gallium/auxiliary/draw/draw_llvm.c -> https://sebsauvage.net/paste/?2519ae824e638f48#/1Bm9vV0v1uNZ7EjgMlcE6797Kymlg...

teod0r ★★★★★
() автор топика
Ответ на: комментарий от teod0r

ну дело движется,

насчет multiple definitions нашел вот такое https://gitlab.freedesktop.org/search?group_id=1155&project_id=176&repository_ref=main&scope=blobs&search=get_pic_param

Т.е. там где ругается на них в логе, надо закоментировать строки попробовать.

irton ★★★★★
()
Ответ на: комментарий от irton
Ответ на: комментарий от teod0r

ненадо TargetRegistry.h подкладывать.

надо сделать вот так в файле mesa-19.2.8/src/gallium/state_trackers/clover/llvm/codegen/native.cpp:

#if LLVM_VERSION_MAJOR >= 14
#include <llvm/MC/TargetRegistry.h>
#else
#include <llvm/Support/TargetRegistry.h>
#endif
irton ★★★★★
()
Последнее исправление: irton (всего исправлений: 2)
Ответ на: комментарий от teod0r

посмотрите эти два патча.

https://gitlab.freedesktop.org/mesa/mesa/-/commit/f945cca9837815fe1fb2c7eba543ee33630fc9ca https://gitlab.freedesktop.org/mesa/mesa/-/commit/a5884df949e6c33329add11d606b3287dd497293

НО патчим по пути src/gallium/state_trackers/clover/llvm/metadata.hpp

т.к. переименовали в frontends в современной меса

irton ★★★★★
()
Ответ на: комментарий от irton
Ответ на: комментарий от irton

это я понял. я имел ввиду, что нет смежных строк, между которыми вставлять надо. получилось тока инклюды сделать. оригиналы файлов выше приводил.
https://sebsauvage.net/paste/?4cd4e31b7bfb5bc5#E4wUp3IUIT6e1fMmjCYg1THCS87CJN...

teod0r ★★★★★
() автор топика
Ответ на: комментарий от teod0r

а вот так: https://gitlab.freedesktop.org/mesa/mesa/-/commit/4f044c38e2eb3ae7cd2be8a566fed3256fd361fb

И далее если для этого же файла, то смотрите history https://gitlab.freedesktop.org/mesa/mesa/-/commits/main/src/gallium/frontends/clover/llvm/codegen/bitcode.cpp

там есть еще изменения для llvm.

irton ★★★★★
()
Ответ на: комментарий от irton

https://sebsauvage.net/paste/?f7efc27bcd45f7a8#CW5FRrHsXmmrDYfbHuQGR5lz9UQFF8...

да, затянулось всё. у меня главный вопрос: когда до конца всё же дойдём, стоит ли ожидать ошибок в рантайме? может мне лучше в отдельном префиксе старый llvm собрать? да и вам надоел, наверное

teod0r ★★★★★
() автор топика
Ответ на: комментарий от irton

а вот эта строка странно выглядит, может неточно запатчили?

запутался уже в этих патчах. там последний hunk не накладывается, нет нужной строки.
вот оригинал common.cpp:https://sebsauvage.net/paste/?144a4467f0d353db#2C0fv9sLvUTgPzKNj/elOCOkQIObxw...
вот мой патч: https://sebsauvage.net/paste/?dbfaa209c6b37883#07fMYzDAUQXOYnAYSCyLXTOUCucBgc...

с последним вашим патчем вот такая ошибка: https://sebsauvage.net/paste/?966b144267b9e082#QLoskC8r8T12F49rockeZLLz7Bb e5...

teod0r ★★★★★
() автор топика
Ответ на: комментарий от teod0r

с последним вашим патчем вот такая ошибка вроде нормально, то что фиксили - пофиксилось.

Вот этот патч на common.cpp строка 150 наложить https://gitlab.freedesktop.org/mesa/mesa/-/commit/d4f7337d14eb8c135a9a89dcd0e01fc93214a927

В логе ниже еще есть ошибка одна, возможно стоит и ее пофиксить https://gitlab.freedesktop.org/mesa/mesa/-/commit/55c912883c9b3624ee060fe1a0232cf71e329d80

irton ★★★★★
()
Ответ на: комментарий от irton

Вот этот патч на common.cpp строка 150 наложить

наложил.
https://sebsauvage.net/paste/?37b9002325c3f54b#HHML1kFYOFKASlIdcH7/v1qt6F/oUY...
вроде как то же самое.

В логе ниже еще есть ошибка одна, возможно стоит и ее пофиксить

это пока не фиксил

teod0r ★★★★★
() автор топика
Ответ на: комментарий от teod0r

Ну почему, ошибка ушла, это только кажется что все тоже самое, сборка идет в несколько потоков, поэтому и вывалить может сразу несколько ошибок вместо одной. Вот мы одну из трех исправили, две осталось. Патч по ссылке в предыдущем сообщении исправит еще одну и вот этот патч тоже должен помоч https://gitlab.freedesktop.org/mesa/mesa/-/commit/d4f7337d14eb8c135a9a89dcd0e01fc93214a927

irton ★★★★★
()
Ответ на: комментарий от irton

на clover/llvm/invocation.cpp:220

вот оригинал: https://sebsauvage.net/paste/?55ce1470cceefda7#Ci1QFKZlOouStTYAwKD9EZuLM8LZCw...
вот текущая, уже пропатченная ранее версия: https://sebsauvage.net/paste/?3eaca991a048de40#Fjjqjokx8MaPz6N25vqZgn1rDMyjBX...
там строки различаются, всё-равно патчить?

на clover/llvm/compat.hpp

а этот я вообще не понял какие строки патчить.
оригинал: https://sebsauvage.net/paste/?11ad6a2cee469c45#MCwC2Xxssix4GWFr44/w2C4xEkYNhe...
текущая версия: https://sebsauvage.net/paste/?9e8eebd4cc8b0c07#oS3VqcG5E4R8LaMK/lT34nw01ONJ1p...

teod0r ★★★★★
() автор топика
Ответ на: комментарий от teod0r

Ну второй файл пока не патчить

вот такой патч был для llvm12, попробуйте с ним https://gitlab.freedesktop.org/mesa/mesa/-/commit/d1eab2b1eb1dec10197db7d25e27d97f6ca1a2ea

а из предыдущего сообщения моего патч это уже на llvm15.

irton ★★★★★
()
Ответ на: комментарий от irton

непонятно, как накладывать на compat.hpp.
вот оригинал: https://sebsauvage.net/paste/?11ad6a2cee469c45#MCwC2Xxssix4GWFr44/w2C4xEkYNhe...
вот текущая, уже модифицированная до этого версия: https://sebsauvage.net/paste/?5ed109a89b614e5d#kgih78CtwLzFW32xp3oYWWs5/GtwXa...
попробовал вот так: https://sebsauvage.net/paste/?478fe9d482b5fd13#xAj8k6U6A99T4EcjuhX6jSbtA7rfDI...
результат: https://sebsauvage.net/paste/?6d003e49d8c1738c#oZMjjve9bbpwzFC2 TRFCn8mUzhRj5...

может, мне действительно собрать в отдельном префиксе старый llvm? боюсь ошибок в runtime.

teod0r ★★★★★
() автор топика
Ответ на: комментарий от irton

вполне возможно что так и надо

какую версию llvm ставить? у меня нет большого опыта установки в отдельные префиксы. просто указать другие -D CMAKE_INSTALL_PREFIX= и -D LLVM_BINUTILS_INCDIR= ?

галлиум отключить если ненужен

что он вообще даёт?

teod0r ★★★★★
() автор топика
Ответ на: комментарий от irton

поставил llvm-10.0.1 в отдельный префикс. прописал в сборочном скрипте месы export PATH=«/usr/local/bin:$PATH»; export CMAKE_INCLUDE_PATH='/usr/local/include:/usr/include' (это правильно? чтобы инклюды llvm'а искал по новому префиксу). была ошибка error: 'CGFT_ObjectFile' is not a member of 'llvm::TargetMachine', наложил патч https://gitlab.freedesktop.org/mesa/mesa/-/commit/d4f7337d14eb8c135a9a89dcd0e... на ac_llvm_helper.cpp, теперь такая ошибка https://sebsauvage.net/paste/?149c379057e7a54e#aY8VpDpD3vdb7U5NlMsqw IS2akODg...
ещё более ранний llvm нада? или CMAKE_INCLUDE_PATH не правильно?

teod0r ★★★★★
() автор топика