[Bug]: mesa & mesa-vulkan-icd-freedreno-dri3 build error
Problem description
I've been trying to build mesa and mesa-vulkan-icd-freedreno-dri3 in the Termux environment, but I keep encountering failures.
The build fails with the following error, and I wonder if there's something I'm missing.
I've installed most of the dependency packages and applied the patches included in the packages.
Could you please help?
What steps will reproduce the bug?
mesa build error
./build-package.sh ./packages/mesa
llvm-config found: NO need ['>= 5.0.0']
Run-time dependency LLVM found: NO (tried config-tool)
Looking for a fallback subproject for the dependency llvm (modules: bitwriter, engine, mcdisassembler, mcjit, core, executionengine, scalaropts, transformutils, instcombine, native)
Building fallback subproject with default_library=shared
../src/meson.build:1766:13: ERROR: Neither a subproject directory nor a llvm.wrap file was found.
A full log can be found at /data/data/com.termux/files/home/.termux-build/mesa/build/meson-logs/meson-log.txt
mesa-vulkan-icd-freedreno-dri3 build error
./build-package.sh ./packages/mesa-vulkan-icd-freedreno-dri3
Found ninja-1.12.1 at /data/data/com.termux/files/usr/bin/ninja
[70/557] Compiling C object src/util/libmesa_util.a.p/anon_file.c.o
FAILED: src/util/libmesa_util.a.p/anon_file.c.o
aarch64-linux-android-clang -Isrc/util/libmesa_util.a.p -Isrc/util -I../src/src/util -Iinclude -I../src/include -Isrc -I../src/src -Isrc/util/format -I../src/src/util/format -I/data/data/com.termux/files/usr/include -fvisibility=hidden -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -Oz -g -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="24.0.4"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' -DHAVE_OPENGL=0 -DHAVE_OPENGL_ES_1=1 -DHAVE_OPENGL_ES_2=1 -DUSE_VK_COMPILER=1 -DVIDEO_CODEC_VC1DEC=0 -DVIDEO_CODEC_H264DEC=0 -DVIDEO_CODEC_H264ENC=0 -DVIDEO_CODEC_H265DEC=0 -DVIDEO_CODEC_H265ENC=0 -DVIDEO_CODEC_AV1DEC=1 -DVIDEO_CODEC_AV1ENC=1 -DVIDEO_CODEC_VP9DEC=1 -DHAVE_X11_PLATFORM -DHAVE_WAYLAND_PLATFORM -DHAVE_XCB_PLATFORM -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0 -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DGLAPI_EXPORT_PROTO_ENTRY_POINTS=0 -DALLOW_KCMP -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___BUILTIN_TYPES_COMPATIBLE_P -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_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_UINT128 -DHAVE_REALLOCARRAY -DHAVE_FMEMOPEN -D_GNU_SOURCE -DUSE_GCC_ATOMIC_BUILTINS -DUSE_AARCH64_ASM -DMAJOR_IN_SYSMACROS -DHAS_SCHED_H -DHAS_SCHED_GETAFFINITY -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_CET_H -DHAVE_SYS_INOTIFY_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_MEMFD_CREATE -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_POSIX_FALLOCATE -DHAVE_STRUCT_TIMESPEC -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_ZSTD -DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_LIBDRM -DLLVM_AVAILABLE=0 -DDRAW_LLVM_AVAILABLE=0 -DWL_HIDE_DEPRECATED -DXCB_KEYSYMS_AVAILABLE -DHAVE_DRI2 -DHAVE_DRI3 -DHAVE_DRI3_MODIFIERS -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=empty-body -Werror=incompatible-pointer-types -Werror=int-conversion -Wimplicit-fallthrough -Wmisleading-indentation -Wno-missing-field-initializers -Wno-format-truncation -fno-math-errno -fno-trapping-math -Qunused-arguments -fno-common -Wno-unknown-pragmas -Wno-microsoft-enum-value -Wno-unused-function -Werror=format -Wformat-security -Werror=thread-safety -ffunction-sections -fdata-sections -fstack-protector-strong -Oz -D__USE_GNU -fPIC -pthread -Werror=pointer-arith -Werror=vla -Werror=gnu-empty-initializer -MD -MQ src/util/libmesa_util.a.p/anon_file.c.o -MF src/util/libmesa_util.a.p/anon_file.c.o.d -o src/util/libmesa_util.a.p/anon_file.c.o -c ../src/src/util/anon_file.c
../src/src/util/anon_file.c:122:9: error: call to undeclared function 'memfd_create'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
122 | fd = memfd_create(debug_name, MFD_CLOEXEC | MFD_ALLOW_SEALING);
| ^
1 error generated.
[77/557] Compiling C object src/util/libmesa_util.a.p/meson-generated_.._format_u_format_table.c.o
ninja: build stopped: subcommand failed.
What is the expected behavior?
No response
System information
Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=12681
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://mirrors.sdu.edu.cn/termux/termux-main stable main
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
# x11-repo (sources.list.d/x11.list)
deb https://mirrors.sdu.edu.cn/termux/termux-x11 x11 main
Updatable packages:
All packages up to date
termux-tools version:
1.43.6
Android version:
14
Kernel build information:
Linux localhost 6.1.57-android14-11-29543898-abS928NKSU3AXH7 #1 SMP PREEMPT Mon Aug 19 04:02:36 UTC 2024 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-S928N
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.widget versionCode:13
com.termux.x11 versionCode:14
com.termux.api versionCode:51
Have you tried with the latest master branch of this repository? Some fixes were added in mesa build script.
Try to build them with -i option. It is known that mesa has build issues without -i option, see #21130.
@Biswa96 I just freshly cloned the git repository and attempted to build again. I modified the revision to 2 in build.sh and tried, but the build is still failing with the same error.
Is there a way to resolve this?
@licy183
./build-package.sh -I ./packages/mesa
Am I supposed to use the build options as mentioned above? Even so, the build is still failing with the same error.
Run-time dependency libudev found: NO (tried pkgconfig and cmake)
llvm-config found: NO need ['>= 5.0.0']
Run-time dependency LLVM found: NO (tried config-tool)
Looking for a fallback subproject for the dependency llvm (modules: bitwriter, engine, mcdisassembler, mcjit, core, executionengine, scalaropts, transformutils, instcombine, native)
Building fallback subproject with default_library=shared
../src/meson.build:1766:13: ERROR: Neither a subproject directory nor a llvm.wrap file was found.
A full log can be found at /data/data/com.termux/files/home/.termux-build/mesa/build/meson-logs/meson-log.txt
Is there something I'm missing?
@licy183
The build steps I attempted are as follows. Is there any part I might have missed or made a mistake?
pkg update
pkg upgrade
pkg install git build-essential cmake python ninja
git clone https://github.com/termux/termux-packages.git
cd termux-packages
pkg install mesa mesa-dev libandroid-shmem libc++ libdrm libx11 libxcb libxshmfence libwayland vulkan-loader-generic zlib zstd libwayland-protocols libxrandr xorgproto libglvnd libllvm libxext libxfixes libxshmfence libxxf86vm ncurses libwayland-protocols libxrandr llvm llvm-tools mlir xorgproto binutils-libs
pip install mako
./build-package.sh -I ./packages/mesa
@licy183
./scripts/setup-termux.sh
The above command has resolved the following error that was previously occurring.
Run-time dependency libudev found: NO (tried pkgconfig and cmake)
llvm-config found: NO need ['>= 5.0.0']
Run-time dependency LLVM found: NO (tried config-tool)
Looking for a fallback subproject for the dependency llvm (modules: bitwriter, engine, mcdisassembler, mcjit, core, executionengine, scalaropts, transformutils, instcombine, native)
Building fallback subproject with default_library=shared
../src/meson.build:1766:13: ERROR: Neither a subproject directory nor a llvm.wrap file was found.
A full log can be found at /data/data/com.termux/files/home/.termux-build/mesa/build/meson-logs/meson-log.txt
However, this time, a new error occurred as shown below, and the process failed. It seems to be related to Python. Could this be due to a recent Python update?
../src/meson.build:271: WARNING: Turnip with the DRM KMD will require libdrm to always be present at runtime which may not always be the case on platforms such as Android.
../src/meson.build:498: WARNING: cannot auto-detect -mtls-dialect when cross-compiling, using compiler default
Found pkg-config: YES (/data/data/com.termux/files/usr/bin/pkg-config) 0.29.2
Found CMake: /data/data/com.termux/files/usr/bin/cmake (3.30.4)
Run-time dependency vdpau found: NO (tried pkgconfig and cmake)
Program glslangValidator found: NO
Run-time dependency libva found: NO (tried pkgconfig and cmake)
Program python3 found: YES (/data/data/com.termux/files/usr/bin/python3)
../src/meson.build:935:2: ERROR: Problem encountered: Python (3.x) mako module >= 0.8.0 required to build mesa.
A full log can be found at /data/data/com.termux/files/home/.termux-build/mesa/build/meson-logs/meson-log.txt
~ $ pip install mako
Requirement already satisfied: mako in /data/data/com.termux/files/usr/lib/python3.12/site-packages (1.3.5)
Requirement already satisfied: MarkupSafe>=0.9.2 in /data/data/com.termux/files/usr/lib/python3.12/site-packages (from mako) (3.0.0)
The same symptom occurs even after installing the Mako module.
For your use case @hansm629 (build vanilla termux-packages mesa & mesa-vulkan-icd-freedreno-dri3, but with cross-compilation disabled) I believe this patchset is appropriate:
[!NOTE] Last updated on November 11 2024
Build mesa for Termux:X11 ondevice with cross-compilation disabled
git clone https://github.com/termux/termux-packages.git
cd termux-packages/
git apply -v << 'EOF'
--- a/packages/mesa-vulkan-icd-freedreno-dri3/build.sh
+++ b/packages/mesa-vulkan-icd-freedreno-dri3/build.sh
@@ -37,6 +37,10 @@ termux_step_pre_configure() {
CPPFLAGS+=" -D__USE_GNU"
LDFLAGS+=" -landroid-shmem"
+ if [ "$TERMUX_ON_DEVICE_BUILD" = "true" ]; then
+ CPPFLAGS+=" -D__ANDROID_API__=$(getprop ro.build.version.sdk)"
+ fi
+
_WRAPPER_BIN=$TERMUX_PKG_BUILDDIR/_wrapper/bin
mkdir -p $_WRAPPER_BIN
if [ "$TERMUX_ON_DEVICE_BUILD" = "false" ]; then
--- a/packages/mesa/build.sh
+++ b/packages/mesa/build.sh
@@ -45,6 +45,11 @@ termux_step_pre_configure() {
termux_setup_cmake
CPPFLAGS+=" -D__USE_GNU"
+
+ if [ "$TERMUX_ON_DEVICE_BUILD" = "true" ]; then
+ CPPFLAGS+=" -D__ANDROID_API__=$(getprop ro.build.version.sdk)"
+ fi
+
LDFLAGS+=" -landroid-shmem"
_WRAPPER_BIN=$TERMUX_PKG_BUILDDIR/_wrapper/bin
--- a/scripts/build/setup/termux_setup_meson.sh
+++ b/scripts/build/setup/termux_setup_meson.sh
@@ -55,6 +55,7 @@ termux_setup_meson() {
echo "ld = '$LD'" >> $TERMUX_MESON_CROSSFILE
echo "pkg-config = '$PKG_CONFIG'" >> $TERMUX_MESON_CROSSFILE
echo "strip = '$STRIP'" >> $TERMUX_MESON_CROSSFILE
+ echo "llvm-config = 'llvm-config'" >> $TERMUX_MESON_CROSSFILE
if [ "$TERMUX_PACKAGE_LIBRARY" = "bionic" ]; then
echo '' >> $TERMUX_MESON_CROSSFILE
--- a/scripts/build/termux_step_extract_into_massagedir.sh
+++ b/scripts/build/termux_step_extract_into_massagedir.sh
@@ -4,7 +4,7 @@ termux_step_extract_into_massagedir() {
# Build diff tar with what has changed during the build:
cd $TERMUX_PREFIX_CLASSICAL
tar -N "$TERMUX_BUILD_TS_FILE" \
- --exclude='tmp' \
+ --exclude='tmp' --exclude='__pycache__' \
-czf "$TARBALL_ORIG" .
# Extract tar in order to massage it
EOF
scripts/setup-termux.sh
pkg install bison
pip install mako setuptools pyyaml
./build-package.sh -I -f mesa mesa-vulkan-icd-freedreno-dri3
ls output/
-
Should result in
mesa_24.0.8-1_aarch64.debmesa-vulkan-icd-freedreno-dri3_24.0.4_aarch64.debmesa-vulkan-icd-swrast_24.0.8-1_aarch64.deb
-
Associating code with some of the individual errors:
trying to overwrite '/data/data/com.termux/files/usr/lib/python3.12/__pycache__/timeit.cpython-312.pyc', which is also in package python 3.12.7-1- worked around by
--exclude='__pycache__'
- worked around by
ERROR: Neither a subproject directory nor a llvm.wrap file was found.- worked around by
echo "llvm-config = 'llvm-config'" >> $TERMUX_MESON_CROSSFILE
- worked around by
error: call to undeclared function 'memfd_create'- worked around by
-D__ANDROID_API__=$(getprop ro.build.version.sdk)
- worked around by
ERROR: Problem encountered: Python (3.x) mako module >= 0.8.0 required to build mesa.- worked around by
pip install mako setuptools
- worked around by
ERROR: Program 'byacc' not found or not executable- worked around by running
pkg install bisonAFTERscripts/setup-termux.shand BEFOREbuild-package.sh
- worked around by running
ln: failed to create hard link 'src/gallium/targets/dri/swrast_dri.so' => 'src/gallium/targets/dri/libgallium_dri.so': Permission denied- worked around by thundersnow_ at some indeterminate date prior to November 2023
- now fixed upstream in this commit
-
Some of this code is adapted from my 1-year-old port of Turnip-for-SurfaceFlinger's build system to Termux.
Addendum
- If your non-cross-compilation host vendor is not based on AOSP/LineageOS/termux-docker, you are going to want this in order to avoid
Killed
Killed
Killed
Killed
Killed
@robertkirkman Thank you. I'll try it after work today! :)
A few of the types of errors involved with these types of builds are, from a certain perspective, caused by occasional implementing changes to else blocks and committing without first testing the if [ "$TERMUX_ON_DEVICE_BUILD" = "true" ] blocks
On the other hand, it is an expected situation because the CI used to build the official packages strictly uses cross-compiling with no exceptions other than those in the tur-on-device folder of tur-repo. This means that regardless of how "official" TUR is, almost all precompiled .deb files resulting from non-cross-compilation builds are de facto unofficial, since they require users to manually run commands, resulting in an uncontrolled build environment with no CI for maintainers to easily test packages with cross-compilation disabled.
Possibly the most exciting impending world-changing event relevant to this topic, official GitHub Actions ARM CI runner support coming to free-tier GitHub accounts, seems to be just around the corner. When it becomes available, QEMU and self-hosted runners might no longer be absolutely required to build ARM packages in CI with cross-compilation disabled, greatly improving the convenience of testing build-package.sh on many packages with cross-compilation disabled.
@robertkirkman Thank you, sir! Thanks to your explanation, I've made great progress!
A slight issue has come up, so I’ll leave a comment about the symptoms after I get off work! :)
@robertkirkman Thanks to you, sir, I was able to successfully build mesa-vulkan-icd-freedreno-dri3_24.0.4_aarch64.deb! I truly appreciate it.
So, I modified build.sh to mesa-24.1.0 and updated the following three patches to match mesa-24.1.0:
- fix-for-getprogname.patch
- wsi-termux-x11.patch (confirmed to work properly in PRoot Debian/Ubuntu)
- meson.build.patch
I also deleted src-gallium-drivers-llvmpipe-lp_screen.c.patch and tu_kgsl_export_dmabuf.patch, as they did not cause any issues during the previous build.
However, when I attempted to build mesa-vulkan-icd-freedreno-dri3_24.1.0_aarch64.deb, it failed with the following error.
I've tried searching on Google, but I couldn't find the exact issue. Could there be something I am missing? I'd greatly appreciate your insight.
Found ninja-1.12.1 at /data/data/com.termux/files/usr/bin/ninja
[76/583] Compiling C object src/util/libmesa_util.a.p/compress.c.o
FAILED: src/util/libmesa_util.a.p/compress.c.o
aarch64-linux-android-clang -Isrc/util/libmesa_util.a.p -Isrc/util -I../src/src/util -Iinclude -I../src/include -Isrc -I../src/src -Isrc/util/format -I../src/src/util/format -I/data/data/com.termux/files/usr/include -fvisibility=hidden -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c11 -Oz -g -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="24.1.0"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' -DHAVE_OPENGL=0 -DHAVE_OPENGL_ES_1=1 -DHAVE_OPENGL_ES_2=1 -DVIDEO_CODEC_VC1DEC=0 -DVIDEO_CODEC_H264DEC=0 -DVIDEO_CODEC_H264ENC=0 -DVIDEO_CODEC_H265DEC=0 -DVIDEO_CODEC_H265ENC=0 -DVIDEO_CODEC_AV1DEC=1 -DVIDEO_CODEC_AV1ENC=1 -DVIDEO_CODEC_VP9DEC=1 -DHAVE_X11_PLATFORM -DHAVE_WAYLAND_PLATFORM -DHAVE_XCB_PLATFORM -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0 -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DGLAPI_EXPORT_PROTO_ENTRY_POINTS=0 -DALLOW_KCMP -DMESA_DEBUG=0 -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___BUILTIN_TYPES_COMPATIBLE_P -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_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_UINT128 -DHAVE_REALLOCARRAY -DHAVE_FMEMOPEN -D_GNU_SOURCE -DUSE_GCC_ATOMIC_BUILTINS -DUSE_AARCH64_ASM -DMAJOR_IN_SYSMACROS -DHAS_SCHED_H -DHAS_SCHED_GETAFFINITY -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_SYS_SHM_H -DHAVE_CET_H -DHAVE_SYS_INOTIFY_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_MEMFD_CREATE -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_POSIX_FALLOCATE -DHAVE_STRUCT_TIMESPEC -DHAVE_POSIX_MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_ZSTD -DHAVE_COMPRESSION -DHAVE_PTHREAD -DHAVE_LIBDRM -DLLVM_AVAILABLE=0 -DDRAW_LLVM_AVAILABLE=0 -DTHREAD_SANITIZER=0 -DWL_HIDE_DEPRECATED -DHAVE_DRI2 -DHAVE_DRI3 -DHAVE_DRI3_MODIFIERS -DHAVE_DRI3_EXPLICIT_SYNC -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=empty-body -Werror=incompatible-pointer-types -Werror=int-conversion -Wimplicit-fallthrough -Wmisleading-indentation -Wno-missing-field-initializers -Wno-format-truncation -fno-math-errno -fno-trapping-math -Qunused-arguments -fno-common -Wno-unknown-pragmas -Wno-microsoft-enum-value -Wno-unused-function -Werror=format -Wformat-security -Werror=thread-safety -ffunction-sections -fdata-sections -fstack-protector-strong -Oz -D__USE_GNU -D__ANDROID_API__=33 -fPIC -pthread -Werror=pointer-arith -Werror=vla -Werror=gnu-empty-initializer -MD -MQ src/util/libmesa_util.a.p/compress.c.o -MF src/util/libmesa_util.a.p/compress.c.o.d -o src/util/libmesa_util.a.p/compress.c.o -c ../src/src/util/compress.c
In file included from ../src/src/util/compress.c:42:
../src/src/util/perf/cpu_trace.h:39:10: fatal error: 'cutils/trace.h' file not found
39 | #include <cutils/trace.h>
| ^~~~~~~~~~~~~~~~
1 error generated.
[81/583] Generating src/compiler/nir/nir_opt_algebraic....h a custom command (wrapped by meson to capture output)
ninja: build stopped: subcommand failed.
The patches and the build.sh file that I have modified are as follows.
build_patchs.zip
@hansm629 That's great! so, it seems you would like to obtain Mesa 24.1.0 in advance before it officially comes to termux-packages? I'm not sure that would be considered in-scope for an issue in this repo, since version bumps in repos like this are usually administered exclusively by package maintainers, but I do have experience implementing similar downstream version bumps, so if I happen to find a way to successfully install Mesa 24.1.0 before it comes here officially I will tell you.
@robertkirkman Thank you, sir! As you mentioned, my goal is to build and use Mesa 24.1.0 or higher personally before it gets added to the Termux main repo.
If you happen to find a way, I would be truly grateful if you could leave a comment!
You must be busy, but thank you so much for your continued help!
:+1: :100:
@hansm629 The version of the mesa package available precompiled is now 24.2.6 which is higher than 24.1.0 do you think that might be able to do what you need?
@robertkirkman Hello sir! Is it possible to build on all devices with the patch that sir made~?
If it is possible, I don't think I need to build version 24.1.0! :)
It is possible to build on all devices yes, but what did you specifically need to build it for?
@Maxython
You manage the presence of bison/byacc here https://github.com/termux/termux-packages/commit/cd151f284152bcb5e2a6f3bc073d32858c0b7da2#diff-ebe1d0e3097536a0654eb79c346216422ae5e4e37f067c81be000a59aaba0e1eR21 ,
I wanted to ask, what is byacc necessary for, and would it be possible to reorganize the code in such a way that bison could be returned instead?
I ask because, the termux-package-builder docker image does not have byacc only bison,
and, I cannot upstream the solution to this issue (seen above) without bison present in the scripts/setup-termux.sh,
as it as present in the scripts/setup-ubuntu.sh.
https://github.com/termux/termux-packages/blob/649a83a9a9008ef5e36064a108d13d4bc22fe82e/scripts/setup-ubuntu.sh#L33