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)

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

AttributeError: ‘xml.etree.ElementTree.Element’ object has no attribute ‘getchildren’

https://docs.python.org/3.8/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.getchildren

Deprecated since version 3.2, will be removed in version 3.9: Use list(elem) or iteration.

Установить Питон 3.8 или старее.

X512 ★★★★★
()

Наверное можно поправить, но разверни chroot с нужной версией например debian где всё нужно есть и собери там. Ибо не факт что если ты исправишь это не вылезет другое. Мезон с питонопортянками говно. Через лет 5~10 от него все взвоют если станет популярен.

LINUX-ORG-RU ★★★★★
()
Ответ на: комментарий от SkyMaverick

Да, но один хрен часть сборки. Что питон в виде мезон, что питон в виде питон. Мезон подстрекает в качестве всего отального тоже использовать питон, что логично. Но вот в перспективе, ой не знаю.

Проблема мезона в питоне, бы бы мезон самодостаточен было бы круть. А так…

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

Мезон подстрекает в качестве всего отального тоже использовать питон, что логично.

Что за бред?

бы бы мезон самодостаточен было бы круть

Есть реализация Meson на чистом Си: https://github.com/annacrombie/muon.

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

Что за бред?

В чём бред? У тебя конкретная система сборки требует питон, если нужны вспомогательные действия и уже есть зависимость от скриптового языка использовать его же логично. Речь про конкретно мезон.

Есть реализация Meson на чистом Си

Не знал, спасибо. Но речь, о конкретно мезоне, а не мюоне. Если бы был мюон и всё отвалилось как тут, ругал бы я просто питон, а я и на мезон и на питон баллоны качу. Да я не в настроении… бу :)

LINUX-ORG-RU ★★★★★
()
Ответ на: комментарий от LINUX-ORG-RU

Проблема мезона в питоне, бы бы мезон самодостаточен было бы круть. А так…

Ну, там уже, в принципе, про muon сказали.

Как я понимаю, как таковой проблемы сделать meson на чём угодно проблемы нет: парсер и вся логика там своя. Питон выбран только из-за «батареек» и скорости разработки. Ну и из-за того, что де-факто он и так везде есть.

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

Какие шутки? Meson божественен. Впервые появилась вменяемая система сборки с читабельным и компактным синтаксисом которая поддерживает pkg-config зависимости и кросскомпиляцию.

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

Установить Питон 3.8 или старее.

попробовал установить python-3.8.16, предварительно прочитал на stackoverflow, что можно устанавливать несколько версий питона с помощью make install для основной и make altinstall для других. но проблема в том, что другая версия тоже хочет установить /usr/lib/libpython3.so (и это даже не симлинк). как быть? менять у вторичной версии --libexecdir или --libdir? или как? или тока с другим префиксом?

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

Примерно всем. Более убогий DSL чем CMake’овский придумать просто невозможно. И вишенкой на торте там ещё в синтаксисе виндовая регистронезависимость, превращающая в помойку любую кодовую базу.

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

Вот как он в CRUX собирается:

# Description: Python interpreter, version 3.
# URL: https://www.python.org/
# Maintainer: CRUX System Team, core-ports at crux dot nu
# Depends on: bzip2 expat gdbm libffi libnsl libtirpc mpdecimal sqlite3 xz

name=python3
version=3.10.9
release=1
source=(https://www.python.org/ftp/python/${version%rc*}/Python-$version.tar.xz)

build() {
        cd Python-$version

        sed -i -e "s|-flto |-flto=4 |g" configure configure.ac
        sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python3|" Lib/cgi.py
        CFLAGS="${CFLAGS/-O2/-O3} -ffat-lto-objects"
        local _pgojobs=$(nproc)
        export PROFILE_TASK="-m test -j${_pgojobs} --pgo-extended -x test_gdb -u-network"
        PROFILE_TASK+=" -x test_socket -x test_asyncio -x test_httpservers -x test_logging -x test_multiprocessing_fork -x test_xmlrpc"
        local -x LC_ALL=C.UTF-8
        export SETUPTOOLS_USE_DISTUTILS=stdlib
        local -x COLUMNS=80
        local -x PYTHONDONTWRITEBYTECODE=

        # Ensure that we are using the system copy of various libraries
        rm -r Modules/expat
        rm -r Modules/_ctypes/{darwin,libffi}*
        rm -r Modules/_decimal/libmpdec

        # Remove tests
        rm -r Lib/{test,{ctypes,sqlite3,tkinter,unittest}/test}
        rm -r Lib/{{distutils,lib2to3}/tests,idlelib/idle_test}

        ./configure \
                --prefix=/usr \
                --enable-shared \
                --enable-optimizations \
                --enable-ipv6 \
                --enable-loadable-sqlite-extensions \
                --with-computed-gotos \
                --with-dbmliborder=gdbm:ndbm \
                --with-lto \
                --with-system-expat \
                --with-system-ffi \
                --with-system-libmpdec \
                --with-tzpath=/usr/share/zoneinfo \
                --without-ensurepip

        make EXTRA_CFLAGS="$CFLAGS"
        make -j1 EXTRA_CFLAGS="$CFLAGS" DESTDIR=$PKG altinstall maninstall

        ln -s 2to3-${version%.*}            $PKG/usr/bin/2to3
        ln -s python${version%.*}           $PKG/usr/bin/python3
        ln -s python${version%.*}-config    $PKG/usr/bin/python3-config
        ln -s idle${version%.*}             $PKG/usr/bin/idle3
        ln -s pydoc${version%.*}            $PKG/usr/bin/pydoc3
        ln -s python${version%.*}           $PKG/usr/lib/$name
        ln -s python-${version%.*}.pc       $PKG/usr/lib/pkgconfig/python3.pc
        ln -s python-${version%.*}-embed.pc $PKG/usr/lib/pkgconfig/python3-embed.pc

        _pybasever=${version%.*}
        install -dm755 $PKG/usr/lib/python${_pybasever}/Tools/{i18n,scripts}
        install -m755 Tools/i18n/{msgfmt,pygettext}.py \
                $PKG/usr/lib/python${_pybasever}/Tools/i18n/
        install -m755 Tools/scripts/{README,*py} \
                $PKG/usr/lib/python${_pybasever}/Tools/scripts/

        find $PKG/usr/lib/python${version%.*} \( \
                -iname "*README*" -o \
                -iname "*ChangeLog*" -o \
                -iname "*NEWS*" -o \
                -iname "*TODO*" -o \
                -iname "*CREDITS*" -o \
                -iname "*HISTORY*" \) \
                -type f -delete
}

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

и другие спецсимволы…

Если речь о минусе в различных командах, к примеру, java -version, то чтобы поисковики не выбрасывали -version из поисковой выдачи, его можно экранировать таким образом: java \-version.

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

Вобщем установил python-3.8.16 в отдельный префикс, добавил в порт месы PATH с новым бинарём, добавил LD_LIBRARY_PATH, указывающий директорию с питонячими библиотеками, теперь:

...
Program python3 found: YES (/usr/local/python3.8/bin/python3)

mesa-19.2.8/meson.build:777:2: ERROR: Problem encountered: Python (3.x) mako module >= 0.8.0 required to build mesa.
mako то установлен, но в префикс /usr. что делать?

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

спасибо.
но теперь другая ошибка:

[460/1668] Compiling C++ object src/amd/common/libamd_common.a.p/ac_llvm_helper.cpp.o
FAILED: src/amd/common/libamd_common.a.p/ac_llvm_helper.cpp.o 
c++ -Isrc/amd/common/libamd_common.a.p -Isrc/amd/common -I../mesa-19.2.8/src/amd/common -Iinclude -I../mesa-19.2.8/include -Isrc -I../mesa-19.2.8/src -Isrc/mapi -I../mesa-19.2.8/src/mapi -Isrc/mesa -I../mesa-19.2.8/src/mesa -I../mesa-19.2.8/src/gallium/include -Isrc/gallium/auxiliary -I../mesa-19.2.8/src/gallium/auxiliary -Isrc/compiler -I../mesa-19.2.8/src/compiler -Isrc/amd -I../mesa-19.2.8/src/amd -Isrc/compiler/nir -I../mesa-19.2.8/src/compiler/nir -I/usr/include -I/usr/include/libdrm -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++14 '-DPACKAGE_VERSION="19.2.8"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/issues"' -DUSE_ELF_TLS -DHAVE_ST_VDPAU -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0 -DHAVE_X11_PLATFORM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DHAVE_DRM_PLATFORM -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_UINT128 -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DUSE_X86_64_ASM -DMAJOR_IN_SYSMACROS -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_EXECINFO_H -DHAVE_SYS_SHM_H -DHAVE_CET_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_POSIX_MEMALIGN -DHAVE_TIMESPEC_GET -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R -DHAVE_FLOCK -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM -DHAVE_LLVM=0x01500 '-DMESA_LLVM_VERSION_STRING="15.0.7"' -DUSE_LIBGLVND=1 -DHAVE_DRI3 -DHAVE_DRI3_MODIFIERS -DHAVE_GALLIUM_EXTRA_HUD=1 -DHAVE_LIBSENSORS=1 -Werror=return-type -Werror=format -Wformat-security -Wno-non-virtual-dtor -Wno-missing-field-initializers -Wno-format-truncation -fno-math-errno -fno-trapping-math -O2 -march=x86-64 -mmmx -msse -msse2 -mfpmath=sse -mlzcnt -mpopcnt -msahf -mno-sse4 -mno-sse4.1 -mno-shstk -Wa,-mamd64,-O2,--strip-local-absolute -Wl,--no-omagic,--relax -pthread -pipe -Wall -fzero-call-used-regs=skip -fuse-linker-plugin -fprofile-correction -fstack-clash-protection -fstack-protector-strong -fstack-protector-all -fdevirtualize-speculatively -fipa-cp-clone -fira-loop-pressure -floop-interchange -floop-unroll-and-jam -fpredictive-commoning -fsched-spec-load -fsplit-paths -fstdarg-opt -ftree-loop-distribution -ftree-partial-pre -ftrivial-auto-var-init=zero -fvariable-expansion-in-unroller -fweb -D_GLIBCXX_ASSERTIONS -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fvisibility=hidden -MD -MQ src/amd/common/libamd_common.a.p/ac_llvm_helper.cpp.o -MF src/amd/common/libamd_common.a.p/ac_llvm_helper.cpp.o.d -o src/amd/common/libamd_common.a.p/ac_llvm_helper.cpp.o -c ../mesa-19.2.8/src/amd/common/ac_llvm_helper.cpp
../mesa-19.2.8/src/amd/common/ac_llvm_helper.cpp: In function 'bool ac_is_sgpr_param(LLVMValueRef)':
../mesa-19.2.8/src/amd/common/ac_llvm_helper.cpp:59:19: error: 'class llvm::AttributeList' has no member named 'hasAttribute'; did you mean 'getAttributes'?
   59 |         return AS.hasAttribute(ArgNo + 1, llvm::Attribute::InReg);
      |                   ^~~~~~~~~~~~
      |                   getAttributes

ему нужен более старый llvm?

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

файл mesa-19.2.8/src/amd/common/ac_llvm_helper.cpp с другим содержимым, там нет таких строк.
есть файл mesa-19.2.8/src/gallium/state_trackers/clover/llvm/codegen/common.cpp с такими строками. пропатчил. теперь такая ошибка:

[467/1723] Compiling C++ object src/amd/common/libamd_common.a.p/ac_llvm_helper.cpp.o
FAILED: src/amd/common/libamd_common.a.p/ac_llvm_helper.cpp.o 
c++ -Isrc/amd/common/libamd_common.a.p -Isrc/amd/common -I../mesa-19.2.8/src/amd/common -Iinclude -I../mesa-19.2.8/include -Isrc -I../mesa-19.2.8/src -Isrc/mapi -I../mesa-19.2.8/src/mapi -Isrc/mesa -I../mesa-19.2.8/src/mesa -I../mesa-19.2.8/src/gallium/include -Isrc/gallium/auxiliary -I../mesa-19.2.8/src/gallium/auxiliary -Isrc/compiler -I../mesa-19.2.8/src/compiler -Isrc/amd -I../mesa-19.2.8/src/amd -Isrc/compiler/nir -I../mesa-19.2.8/src/compiler/nir -I/usr/include -I/usr/include/libdrm -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c++14 '-DPACKAGE_VERSION="19.2.8"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/issues"' -DUSE_ELF_TLS -DHAVE_ST_VDPAU -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0 -DHAVE_X11_PLATFORM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DHAVE_DRM_PLATFORM -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_UINT128 -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DUSE_X86_64_ASM -DMAJOR_IN_SYSMACROS -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_EXECINFO_H -DHAVE_SYS_SHM_H -DHAVE_CET_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_POSIX_MEMALIGN -DHAVE_TIMESPEC_GET -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R -DHAVE_FLOCK -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM -DHAVE_LLVM=0x01500 '-DMESA_LLVM_VERSION_STRING="15.0.7"' -DUSE_LIBGLVND=1 -DHAVE_DRI3 -DHAVE_DRI3_MODIFIERS -DHAVE_GALLIUM_EXTRA_HUD=1 -DHAVE_LIBSENSORS=1 -Werror=return-type -Werror=format -Wformat-security -Wno-non-virtual-dtor -Wno-missing-field-initializers -Wno-format-truncation -fno-math-errno -fno-trapping-math -O2 -march=x86-64 -mmmx -msse -msse2 -mfpmath=sse -mlzcnt -mpopcnt -msahf -mno-sse4 -mno-sse4.1 -mno-shstk -Wa,-mamd64,-O2,--strip-local-absolute -Wl,--no-omagic,--relax -pthread -pipe -Wall -fzero-call-used-regs=skip -fuse-linker-plugin -fprofile-correction -fstack-clash-protection -fstack-protector-strong -fstack-protector-all -fdevirtualize-speculatively -fipa-cp-clone -fira-loop-pressure -floop-interchange -floop-unroll-and-jam -fpredictive-commoning -fsched-spec-load -fsplit-paths -fstdarg-opt -ftree-loop-distribution -ftree-partial-pre -ftrivial-auto-var-init=zero -fvariable-expansion-in-unroller -fweb -D_GLIBCXX_ASSERTIONS -fno-plt -D_FORTIFY_SOURCE=2 -fPIC -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fvisibility=hidden -MD -MQ src/amd/common/libamd_common.a.p/ac_llvm_helper.cpp.o -MF src/amd/common/libamd_common.a.p/ac_llvm_helper.cpp.o.d -o src/amd/common/libamd_common.a.p/ac_llvm_helper.cpp.o -c ../mesa-19.2.8/src/amd/common/ac_llvm_helper.cpp
../mesa-19.2.8/src/amd/common/ac_llvm_helper.cpp: In function 'bool ac_is_sgpr_param(LLVMValueRef)':
../mesa-19.2.8/src/amd/common/ac_llvm_helper.cpp:59:19: error: 'class llvm::AttributeList' has no member named 'hasAttribute'; did you mean 'getAttributes'?
   59 |         return AS.hasAttribute(ArgNo + 1, llvm::Attribute::InReg);
      |                   ^~~~~~~~~~~~
      |                   getAttributes
../mesa-19.2.8/src/amd/common/ac_llvm_helper.cpp: In function 'ac_compiler_passes* ac_create_llvm_passes(LLVMTargetMachineRef)':
../mesa-19.2.8/src/amd/common/ac_llvm_helper.cpp:200:58: error: 'CGFT_ObjectFile' is not a member of 'llvm::TargetMachine'
  200 |                                     llvm::TargetMachine::CGFT_ObjectFile)) {
      |                                                          ^~~~~~~~~~~~~~~
../mesa-19.2.8/src/amd/common/ac_llvm_helper.cpp: In function 'LLVMOpaqueValue* ac_build_atomic_rmw(ac_llvm_context*, LLVMAtomicRMWBinOp, LLVMValueRef, LLVMValueRef, const char*)':
../mesa-19.2.8/src/amd/common/ac_llvm_helper.cpp:277:39: error: cannot convert 'llvm::AtomicOrdering' to 'llvm::MaybeAlign'
  277 |                 llvm::AtomicOrdering::SequentiallyConsistent, SSID));
      |                 ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
      |                                       |
      |                                       llvm::AtomicOrdering
In file included from ../mesa-19.2.8/src/amd/common/ac_llvm_helper.cpp:42:
/usr/include/llvm/IR/IRBuilder.h:1714:57: note:   initializing argument 4 of 'llvm::AtomicRMWInst* llvm::IRBuilderBase::CreateAtomicRMW(llvm::AtomicRMWInst::BinOp, llvm::Value*, llvm::Value*, llvm::MaybeAlign, llvm::AtomicOrdering, llvm::SyncScope::ID)'
 1714 |                                  Value *Val, MaybeAlign Align,
      |                                              ~~~~~~~~~~~^~~~~
../mesa-19.2.8/src/amd/common/ac_llvm_helper.cpp: In function 'LLVMOpaqueValue* ac_build_atomic_cmp_xchg(ac_llvm_context*, LLVMValueRef, LLVMValueRef, LLVMValueRef, const char*)':
../mesa-19.2.8/src/amd/common/ac_llvm_helper.cpp:286:49: error: cannot convert 'llvm::AtomicOrdering' to 'llvm::MaybeAlign'
  286 |                           llvm::AtomicOrdering::SequentiallyConsistent,
      |                           ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
      |                                                 |
      |                                                 llvm::AtomicOrdering
/usr/include/llvm/IR/IRBuilder.h:1700:70: note:   initializing argument 4 of 'llvm::AtomicCmpXchgInst* llvm::IRBuilderBase::CreateAtomicCmpXchg(llvm::Value*, llvm::Value*, llvm::Value*, llvm::MaybeAlign, llvm::AtomicOrdering, llvm::AtomicOrdering, llvm::SyncScope::ID)'
 1700 |   CreateAtomicCmpXchg(Value *Ptr, Value *Cmp, Value *New, MaybeAlign Align,
      |                                                           ~~~~~~~~~~~^~~~~
[468/1723] Compiling C object src/amd/vulkan/libvulkan_radeon.so.p/radv_meta_fast_clear.c.o
[469/1723] Compiling C object src/amd/vulkan/libvulkan_radeon.so.p/radv_meta_fmask_expand.c.o
[470/1723] Compiling C object src/amd/vulkan/libvulkan_radeon.so.p/radv_meta_resolve.c.o
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

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

нашёл в ac_llvm_helper.cpp похожие строки, пропатчил, теперь такая ошибка: https://sebsauvage.net/paste/?36ac03ff36257e37#AkZErHfUJcgk3m AAQuw9TrMI4rTgT...
вот исходный файл: https://sebsauvage.net/paste/?872e606c0591e0b6#0C0nITF5IBxtDgTSAS aKdsl0IIJ8Y...

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

вот mesa-19.2.8/src/gallium/state_trackers/clover/llvm/codegen/common.cpp: https://sebsauvage.net/paste/?bccf3a0a0918128d#Z3UrT3f/h7ql3UApXgr y/dsQ8LQOD...
вот патченный: https://sebsauvage.net/paste/?bce6a4c86ca3cda1#BXyRCShxvrypH5iP6SePrIlltk64R3...
заметь, он по другому пути (не src/gallium/frontends/clover/llvm/codegen/)
но ошибка возникает именно во время компиляции mesa-19.2.8/src/amd/common/ac_llvm_helper.cpp

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

правильно ли я понял, что мне нужен патч отсюда https://gitlab.freedesktop.org/mesa/mesa/-/commit/ee9811a0bb86d3d75fafeece368... ?

вроде бы ошибка не поменялась.
вариант №1: https://sebsauvage.net/paste/?23b76266cb8afcf7#yOF8Cprmsx/AlF5hMMbatv4Tf thLB...
log: https://sebsauvage.net/paste/?3268bc6e746d2f2c#Xutbw 62JKtEaGyAtkZdCz4bEepBZ8...

вариант №2: https://sebsauvage.net/paste/?371d8f64b233db9f#BuVqDAoVTKaDKXme2hy6FlQLlAFZMC...
log: https://sebsauvage.net/paste/?5968c9610a08e938#MVU5Z18LLOCFzHxGsxJHXjuf3f0Kjx...

и какой мне нужен вариант? там разница

       return AS.hasParamAttr(ArgNo, ::llvm::Attribute::InReg);
и
       return AS.hasParamAttr(ArgNo, ::llvm::Attribute::SExt);
в оригинале моей версии было InReg

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