惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
爱范儿
爱范儿
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
腾讯CDC
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园_首页
量子位
博客园 - 聂微东
Jina AI
Jina AI
小众软件
小众软件
The Cloudflare Blog
有赞技术团队
有赞技术团队
V
V2EX
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
大猫的无限游戏
大猫的无限游戏
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志
B
Blog
MongoDB | Blog
MongoDB | Blog
L
LangChain Blog
宝玉的分享
宝玉的分享
C
Check Point Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
N
Netflix TechBlog - Medium
I
InfoQ
J
Java Code Geeks
S
SegmentFault 最新的问题
V
Visual Studio Blog
Microsoft Security Blog
Microsoft Security Blog
博客园 - 叶小钗
D
DataBreaches.Net
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
B
Blog RSS Feed
S
Schneier on Security
Webroot Blog
Webroot Blog
P
Proofpoint News Feed
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Threatpost
Project Zero
Project Zero
Scott Helme
Scott Helme
C
CERT Recently Published Vulnerability Notes
P
Privacy International News Feed
T
The Exploit Database - CXSecurity.com
D
Darknet – Hacking Tools, Hacker News & Cyber Security

Arch Linux Forums

Gnome desktop mouse cursor zoom issues / Newbie Corner Avidemux crashes without strace / Applications & Desktop Environments how to apply patches with non-linux linends / Newbie Corner Replicating CachyOS on vanilla Arch (or at least getting close) / Arch Discussion What's arch linux GUI package manager ? / Newbie Corner Hibernation failing due to insufficient memory / System Administration profiledef.sh editting question / Installation trying to script kde plasma wallpaper settings / Programming & Scripting Looking for new Audacious package maintainer / Creating & Modifying Packages issues installing arch with LUKS2 encryption / Newbie Corner QEMU PXE booting does not work with OVMF.4m.fd / Applications & Desktop Environments Wired lan regular disconnect / Newbie Corner Need Help setting up ARCH in my G16 G634JZR iwlwifi started failing consistently, trying to determine root cause Windows randomly jumping between monitors after GNOME 50 update No display via DP or HDMI after boot. / Kernel & Hardware how to change acpi platform_profile? / Newbie Corner Linux denied all kernel modules which not loaded right now Use iPhone as Webcam for Arch Linux Video Output Failure on nvidia-580xx-dkms on TTY --> Desktop switch (Page 2) / Kernel & Hardware I was going to rant ..WINE32 Sabotage compliments of Arvind Krishna / Arch Discussion [SOLVED] LUKS drive auto unlocked by TPM when expected not to / Networking, Server, and Protection Hibernate/suspend from X = dark panel; from TTY = works (ASUS G14, hyb (Page 2) / Laptop Issues Headphone jack noise/buzz / Newbie Corner segmentation fault in cc1plus when building CLK / AUR Issues, Discussion & PKGBUILD Requests Console alternative to meld / GNU/Linux Discussion Problem with paru git clone / Newbie Corner XKB questions / Applications & Desktop Environments gnome-keyring-daemon is not working correctly / Applications & Desktop Environments [SOLVED] Steam opens and immediately closes constantly / Newbie Corner Firefox rounded edges on Sway / Applications & Desktop Environments on Linux arch 7.0.10-arch1-1 connection drops / Networking, Server, and Protection GDM does not open login screen after update / Newbie Corner Cinnamon (X11) fails to load after update (Page 2) / Applications & Desktop Environments fontconfig-2:2.18.x - broken fonts? (Page 2) / Applications & Desktop Environments Bluetooth headphones connect but don't auto-switch (alsa 1.2.16) / Multimedia and Games Audio breaks after every suspend/change of VT (Page 2) / Newbie Corner EFI stub: Warning: unable to unprotect memory range (Page 3) / Kernel & Hardware Keyboard problem with the french disposition / Newbie Corner Working with two network interfaces / Networking, Server, and Protection [SOLVED] Power spikes on laptop / Laptop Issues Problems with Qt? (Page 2) / Applications & Desktop Environments plasmashell 6.6.5 crashing on loop / Applications & Desktop Environments I'm worried / Newbie Corner Help! RTL8723BS "coalesce failed with error -22" after upgrade / Laptop Issues System notifications not working on any browser / Applications & Desktop Environments installing kernels with kernel-install / Community Contributions [SOLVED] Intel AX210 issue on linux=7.0.10 / Kernel & Hardware No longer booting after Windows 11 update / Installation *SOLVED* Two PC's but different boot times - Kernel 7.0? / Kernel & Hardware gnome-shell continuous clutter_input_focus_set_cursor_location msg / Pacman & Package Upgrade Issues google-chrome, vscode and spotify are ignore my fontconfig / Applications & Desktop Environments KDE6 Akonadi default database backend / Creating & Modifying Packages Support / Routing quirks for new Creative Sound Blaster AE-X (USB ID 0 / Kernel & Hardware Kernel Panic and system freezes with 4x16 DDR5 / Kernel & Hardware dm-crypt and SSDs / Newbie Corner Problems with Worms WMD / Newbie Corner Freeze after login whenever upgrading nvidia/kernel / Laptop Issues Blender crashes on startup when using Vulkan backend / Applications & Desktop Environments Top 5 MDM Solutions for Linux Devices in 2026 Elden Ring crash in sound initialisation / Multimedia and Games AUR connection issues (EOF/TLS errors) (Page 5) / AUR Issues, Discussion & PKGBUILD Requests GNOME freeze after login / Applications & Desktop Environments Bash is weird now / Newbie Corner Gif as KDE avatar / Applications & Desktop Environments Export in musescore / Applications & Desktop Environments Nvidia And Amd Drivers / Applications & Desktop Environments [SOLVED] How to get pavucontrol in dark mode? / Newbie Corner Startx does not work / Applications & Desktop Environments Coturn server installtaion / Applications & Desktop Environments Could not resolve Matrix-synapse dependency error / Applications & Desktop Environments [SOLVED] Plymouth forces English (US) layout on boot / Newbie Corner [Solved]What should I use as license if the upstream repo has none? / AUR Issues, Discussion & PKGBUILD Requests The Official Hello Everyone Thread (Page 334) / Newbie Corner [SOLVED] EPSON ET-2710 printer only printing blank pages / Newbie Corner [SOLVED]Session crashes after login, booted back to sddm / Laptop Issues [SOLVED] Asus monitor suspend results in on/off cycling / Newbie Corner Ultrahuman Discount Code [SAVEULTRA] 10% Off For Existing Customers / Creating & Modifying Packages Ultrahuman Discount Code [SAVEULTRA] 10% Off – Verified Coupon for Exi / Arch Discussion New Ultrahuman Discount Code [SAVEULTRA] 2026 – Get 20% Extra OffToday / Programming & Scripting Ultrahuman Discount Code 2026 - "SAVEULTRA" - Get 20% Extra Off / Newbie Corner Sway keybinding stops working after sleep / Applications & Desktop Environments QEMU SPICE how to achieve bidirectional clipboard with Sway? / Applications & Desktop Environments Apollo Neuro Promo Code [APOLLOZEN] $99 Off Legit Or Just Marketing Apollo Neuro Discount Code $99 Off [APOLLOZEN] Secret Savings Trick HTTP session disconnect on WI-FI disconnect / Networking, Server, and Protection [SOLVED] Cannot chain-load into Windows with GRUB. / Newbie Corner [SOLVED] Font hinting appears to be disabled on Qt6 applications? / Applications & Desktop Environments Black screen after waking up from sleep/hybernate/suspend. / Newbie Corner Diskless booting failing, ipconfig no devices to configure / Kernel & Hardware Strange Font Issue Across System / Newbie Corner [SOLVED] Laptop doesn't wake from sleep on NVIDIA 595.71.05 drivers / Newbie Corner Touchpad randomly stops moving (clicks still work) on Hyprland / Laptop Issues Random hangs on Ryzen Mobile after 6.18.13 ? / Kernel & Hardware [SOLVED] Can't get IP address for USB Ethernet device (KORG Wavestate) / Networking, Server, and Protection Laptop display does not turn on after being off for around 50 min / Multimedia and Games Text Corruption in GPU Screen Recorder GUI / Applications & Desktop Environments Mouse not correctly recognized during boot (Page 2) / Kernel & Hardware PKGBUILD review / AUR Issues, Discussion & PKGBUILD Requests Touchpad not working / Newbie Corner
Possible solution for mesa-amber build failure with glibc-2.43 / Multimedia and Games
V1del · 2026-06-02 · via Arch Linux Forums

With glibc-2.43 the build fails with

threads_posix.h: error: conflicting types for once_flag; have pthread_once_t {aka int}

See https://bugs.gentoo.org/show_bug.cgi?id=969493

I managed a reduced build (x11 only and i965 only, otherwise why would you want to use amber) with the following patch:

diff --git a/include/c11/threads_posix.h b/include/c11/threads_posix.h
index 45cb6075e6e..1e0ca3bc556 100644
--- a/include/c11/threads_posix.h
+++ b/include/c11/threads_posix.h
@@ -51,7 +51,6 @@ Configuration macro:
 #include <pthread.h>
 
 /*---------------------------- macros ----------------------------*/
-#define ONCE_FLAG_INIT PTHREAD_ONCE_INIT
 #ifdef INIT_ONCE_STATIC_INIT
 #define TSS_DTOR_ITERATIONS PTHREAD_DESTRUCTOR_ITERATIONS
 #else
@@ -66,7 +65,6 @@ typedef pthread_cond_t  cnd_t;
 typedef pthread_t       thrd_t;
 typedef pthread_key_t   tss_t;
 typedef pthread_mutex_t mtx_t;
-typedef pthread_once_t  once_flag;
 
 
 /*
@@ -90,12 +88,6 @@ impl_thrd_routine(void *p)
 
 /*--------------- 7.25.2 Initialization functions ---------------*/
 // 7.25.2.1
-static inline void
-call_once(once_flag *flag, void (*func)(void))
-{
-    pthread_once(flag, func);
-}
-
 
 /*------------- 7.25.3 Condition variable functions -------------*/
 // 7.25.3.1
diff --git a/meson.build b/meson.build
index 9b0ca5c8384..a51aec3ecb9 100644
--- a/meson.build
+++ b/meson.build
@@ -1014,10 +1014,13 @@ prog_python = import('python').find_installation('python3')
 has_mako = run_command(
   prog_python, '-c',
   '''
-from distutils.version import StrictVersion
+try:
+  from packaging.version import Version
+except:
+  from distutils.version import StrictVersion as Version
 import mako
-assert StrictVersion(mako.__version__) > StrictVersion("0.8.0")
-  ''')
+assert Version(mako.__version__) >= Version("0.8.0")
+  ''', check: false)
 if has_mako.returncode() != 0
   error('Python (3.x) mako module >= 0.8.0 required to build mesa.')
 endif
diff --git a/src/glx/glxcurrent.c b/src/glx/glxcurrent.c
index ffc7c3c7687..5656e52d61f 100644
--- a/src/glx/glxcurrent.c
+++ b/src/glx/glxcurrent.c
@@ -67,7 +67,6 @@ struct glx_context dummyContext = {
 
 _X_HIDDEN pthread_mutex_t __glXmutex = PTHREAD_MUTEX_INITIALIZER;
 
-# if defined( USE_ELF_TLS )
 
 /**
  * Per-thread GLX context pointer.
@@ -84,54 +83,6 @@ __glXSetCurrentContext(struct glx_context * c)
    __glX_tls_Context = (c != NULL) ? c : &dummyContext;
 }
 
-# else
-
-static pthread_once_t once_control = PTHREAD_ONCE_INIT;
-
-/**
- * Per-thread data key.
- *
- * Once \c init_thread_data has been called, the per-thread data key will
- * take a value of \c NULL.  As each new thread is created the default
- * value, in that thread, will be \c NULL.
- */
-static pthread_key_t ContextTSD;
-
-/**
- * Initialize the per-thread data key.
- *
- * This function is called \b exactly once per-process (not per-thread!) to
- * initialize the per-thread data key.  This is ideally done using the
- * \c pthread_once mechanism.
- */
-static void
-init_thread_data(void)
-{
-   if (pthread_key_create(&ContextTSD, NULL) != 0) {
-      perror("pthread_key_create");
-      exit(-1);
-   }
-}
-
-_X_HIDDEN void
-__glXSetCurrentContext(struct glx_context * c)
-{
-   pthread_once(&once_control, init_thread_data);
-   pthread_setspecific(ContextTSD, c);
-}
-
-_X_HIDDEN struct glx_context *
-__glXGetCurrentContext(void)
-{
-   void *v;
-
-   pthread_once(&once_control, init_thread_data);
-
-   v = pthread_getspecific(ContextTSD);
-   return (v == NULL) ? &dummyContext : (struct glx_context *) v;
-}
-
-# endif /* defined( USE_ELF_TLS ) */
 
 
 _X_HIDDEN void

This is the full git diff which contains the python-3.13 patch for meson.build.

I used the following PKGBUILD:

# Maintainer: Laurent Carlier <lordheavym@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Andreas Radke <andyrtr@archlinux.org>

pkgname=mesa-amber-git
pkgdesc="classic OpenGL (non-Gallium3D) drivers"
pkgver=21.3.9
pkgrel=13
arch=('x86_64')
makedepends=('python-mako' 'libxml2' 'libx11' 'libxshmfence' 'meson-python'
             'libxxf86vm' 'libxdamage' 'zstd' 'lm_sensors'
			 'libxrandr' 'glslang' 'meson' 'git')
       # 'elfutils'
url="https://www.mesa3d.org/"
license=('custom')

groups=(modified)

source=('mesa::git+https://gitlab.freedesktop.org/mesa/mesa.git#branch=amber'
        'LICENSE')
sha256sums=(
            'SKIP'
            '7052ba73bb07ea78873a2431ee4e828f4e72bda7d176d07f770fa48373dec537')
#validpgpkeys=('57551DE15B968F6341C248F68D8E31AFC32428A6') # Eric Engestrom <eric@engestrom.ch>
validpgpkeys=('71C4B75620BC75708B4BDB254C95FAAB3EB073EC') # Dylan Baker <dylan@pnwbakers.com>

prepare() {
  cd mesa
  # patch for python 3.13, derived from mesa-24:
  #patch -Np1 < ../../mako.patch
  patch -Np1 < ../../once_flag.patch
}

build() {
  # Build only minimal debug info to reduce size
  CFLAGS+=' -g1 -Wno-error=incompatible-pointer-types'
  CXXFLAGS+=' -g1'
  meson setup mesa build -Dprefix=/usr \
    -D b_lto=true \
    -D b_ndebug=true \
    -D amber=true \
    -D platforms=x11 \
    -D shader-cache-default=true \
    -D dri-drivers='i965' \
    -D gallium-drivers='' \
    -D vulkan-drivers='' \
    -D dri3=enabled \
    -D gallium-nine=false \
    -D gallium-omx=disabled \
    -D gallium-opencl=disabled \
    -D gallium-va=disabled \
    -D gallium-vdpau=disabled \
    -D gallium-xa=disabled \
    -D gallium-xvmc=disabled \
    -D gles1=disabled \
    -D gles2=disabled \
    -D glvnd=false \
    -D glx=dri \
    -D libunwind=disabled \
    -D llvm=disabled \
    -D lmsensors=enabled \
    -D osmesa=false \
    -D shared-glapi=enabled \
    -D microsoft-clc=disabled \
    -D valgrind=disabled \
    -D zstd=enabled \
    -D datasources=''

  ninja -C build
  meson compile -C build
}

package() {
  depends=('libdrm' 'libxxf86vm' 'libxshmfence' 'libelf'
           'zstd')
  conflicts=('mesa' 'mesa-git')
  provides=("mesa" 'libgl' 'mesa-libgl' 'libglvnd' 'opengl-driver')

  DESTDIR="${pkgdir}" meson install -C build

  install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
}

The output of "pacman -Qi mesa-amber-git":

Name            : mesa-amber-git
Version         : 21.3.9-13
Description     : classic OpenGL (non-Gallium3D) drivers
Architecture    : x86_64
URL             : https://www.mesa3d.org/
Licenses        : custom
Groups          : modified
Provides        : mesa  libgl  mesa-libgl  libglvnd  opengl-driver
Depends On      : libdrm  libxxf86vm  libxshmfence  libelf  zstd
Optional Deps   : None
Required By     : libva-git  picom-git  xorg-server-devel-git
Optional For    : None
Conflicts With  : mesa  mesa-git
Replaces        : None
Installed Size  : 16.51 MiB
Packager        : nokangaroo <nokangaroo@NOSPAM.aon.at>
Build Date      : Mon 01 Jun 2026 02:35:25 PM CEST
Install Date    : Mon 01 Jun 2026 02:41:39 PM CEST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : None

This is unbeatable for size, and works perfectly on my Skylake box. The last
mesa version that worked properly for me was 23.3.6 (which would need a similar
patch). Mesa 24 caused choppy rendering with Golly (which I no longer use,
but it is proof that I can do without the huge software bloat of the current
version). I once built a mesa-less system (in the time of the i915 kernel
crash, to find out if mesa was responsible, which it wasn't). It was a hack
that involved building Xorg without glx and using the intel driver, but it
turns out that 2D acceleration is perfectly good for video playback. I use
mesa-amber for simplicity, as the minimum to meet depencencies. The packaged
libglvnd didn't work with mesa-amber, but mesa's internal libgl will do, at
least for intel. Incidentally, the intel driver is maintained again, see
https://github.com/X11Libre/xf86-video-intel.

uname -r:  7.0.10-1-git
Processor: Intel® Core™ i3-6100 CPU @ 3.70GHz × 4
Graphics:  Mesa DRI Intel® HD Graphics 530 (SKL GT2)