WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Update to mesa in tc-16.x x86 repo  (Read 1610 times)

Offline mjmouse

  • Newbie
  • *
  • Posts: 3
Re: Update to mesa in tc-16.x x86 repo
« Reply #15 on: October 23, 2025, 04:47:01 AM »
I just had the error with xkbcomp not being in the dependencies of xorg-server.tcz after updating.

tce-update doesn't seem to update the dep files when the extension tcz itself hasn't changed.

I used the below script to check my dep files and found a few that needed updating (needs lua-5.4.tcz):
Code: [Select]
#!/usr/local/bin/lua

local quiet = arg[1] == '-q'
if arg[1] == '-h' or arg[1] == '--help' then
   print [[
Usage: check_deps.lua [-q]

Check that all the *.tcz.dep files in the current install match dep.db
Prints a comparison of each .dep file except with -q
]]
   return
end

-- make sure we have a dep.db
os.execute'depends-on.sh zzip'

local lib_to_deps = {}

local currlib
for line in io.lines'/etc/sysconfig/tcedir/dep.db' do
   if currlib then
      if line == '' then
         currlib = nil
      else
         table.insert(lib_to_deps[currlib], line)
      end
   else
      currlib = line
      lib_to_deps[currlib] = {}
   end
end

local needs = false
for path in io.popen('ls /etc/sysconfig/tcedir/optional/*.tcz'):lines() do
   local tcz = path:match('[^/]+.tcz$')
   if lib_to_deps[tcz] then
      local currdepsf <close> = io.open(path .. '.dep')
      local currdeps = currdepsf and currdepsf:read'a' or ''

      -- normalise strings for comparison
      currdeps = (currdeps .. '\n'):gsub('%s+\n', '\n')
      local expected_deps = (table.concat(lib_to_deps[tcz], '\n') .. '\n'):gsub('%s+\n', '\n')

      if currdeps ~= expected_deps then
         needs = true
         print(tcz)
         if not quiet then
            print'>>>'
            print(string.format('%q', currdeps))
            print'==='
            print(string.format('%q', expected_deps))
            print'<<<'
         end
      end
   end
end
if needs then os.exit(1) end

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15327
Re: Update to mesa in tc-16.x x86 repo
« Reply #16 on: October 23, 2025, 05:54:00 AM »
mesa-dev.tcz.dep should delete libelf-dev.tcz   maybe it's elfutils-dev.tcz?

Looks like I used the wrong dep file by mistake, corrected now.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15327
Re: Update to mesa in tc-16.x x86 repo
« Reply #17 on: October 23, 2025, 08:20:45 AM »
What I really want is a sort of dummy Mesa build that doesn't really need to do anything, but satisfies the deps for unavoidable (for me) graphical extensions like gtk2.tcz and jwm.tcz (also FFmpeg). I thought I might make substitute extensions to work without libgallium, which seems to be the key part requiring llvm19-lib.tcz. I found reference to "Stand-alone Mesa" in their FAQ which sounds hopeful but I'm not sure how you build that (I found your build notes but I can't find any more about "Stand-alone Mesa" in their docs to know what to change (maybe you just disable all drivers?)).

You could build mesa-24.1.7 (the last version without the libGL dep on libgallium) without software acceleration, which should eliminate the dep on llvm.

Something like this:
Code: [Select]
CC="gcc -flto -mtune=generic -Os -pipe" CXX="g++ -flto -mtune=generic -Os -pipe -DNDEBUG" meson --prefix=/usr/local --buildtype=plain -Dvalgrind=disabled -Dlibunwind=disabled -Dplatforms=x11 -Dvulkan-drivers="" -Dgallium-drivers="i915" ../
..builds lib*GL* without a dep on llvm/libgallium
« Last Edit: October 23, 2025, 08:58:23 AM by Juanito »

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12316
Re: Update to mesa in tc-16.x x86 repo
« Reply #18 on: October 23, 2025, 09:57:47 AM »
Hi mjmouse
... tce-update doesn't seem to update the dep files when the extension tcz itself hasn't changed. ...
Try this:
Code: [Select]
tce-audit builddb
tce-audit updatedeps
tce-audit fetchmissing
tce-update
exitcheck.sh reboot
your  .dep  files should be updated and missing extensions added.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1449
Re: Update to mesa in tc-16.x x86 repo
« Reply #19 on: October 23, 2025, 01:08:10 PM »
There is an "update-everything" script.....(It basically does the steps Rich outlined in a single command)

Offline CNK

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 394
Re: Update to mesa in tc-16.x x86 repo
« Reply #20 on: October 24, 2025, 07:14:48 AM »
elfutils.tcz is listed twice in mesa.tcz.dep on x86 and x86_64.

I've got Mesa 25.2.5 to build without LLVM (no llvm19-lib.tcz dep) and no hardware drivers (just "softpipe").

Build command (x86_64, I'll do x86 next):
Code: [Select]
CC="gcc -fno-asynchronous-unwind-tables -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -fno-asynchronous-unwind-tables -flto -fuse-linker-plugin -fno-exceptions -fno-rtti -mtune=generic -Os -pipe -DNDEBUG" meson setup --prefix=/usr/local --buildtype=plain -Dvalgrind=disabled -Dlibunwind=disabled -Dglx-direct=false -Dgles2=enabled -Dplatforms=x11 -Dallow-fallback-for=libdrm -Dvideo-codecs= -Dvulkan-drivers= -Dgallium-drivers=softpipe ../

Code: [Select]
$ /usr/local/firefox/glxtest
PCI_VENDOR_ID
0x8086
PCI_DEVICE_ID
0x22b0
DRI_DRIVER
swrast
VENDOR
Mesa
RENDERER
softpipe
VERSION
3.3 (Compatibility Profile) Mesa 25.2.5
TFP
TRUE
MESA_ACCELERATED
FALSE
TEST_TYPE
EGL

It's working in Firefox and glxtest, but actually programs I've tried that have libGL etc. in deps seem to work without any libGL installed at all. My mesa.tcz is 2.9MB.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15327
Re: Update to mesa in tc-16.x x86 repo
« Reply #21 on: October 24, 2025, 08:12:11 AM »
elfutils.tcz is listed twice in mesa.tcz.dep on x86 and x86_64.

fixed - thanks

Offline Zhe

  • Newbie
  • *
  • Posts: 17
Re: Update to mesa in tc-16.x x86 repo
« Reply #22 on: November 07, 2025, 02:51:26 AM »

Hi! Juanito  Sorry to bother you again.

The fcitx-config-gtk I am using depends on libglapi.so.0, which does not exist in libGL 25.2.5.

Is it possible to separate the old version of libGL into libglapi and use it as a tcz extension?

Is anyone else experiencing this issue? If it's just me, then there's no need to go through the trouble.

Finally, in any case, I give you a thumbs up.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15327
Re: Update to mesa in tc-16.x x86 repo
« Reply #23 on: November 07, 2025, 03:16:32 AM »
I’ll be able to take a look in five days or so.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15327
Re: Update to mesa in tc-16.x x86 repo
« Reply #24 on: November 11, 2025, 10:32:27 AM »
I rebuilt fcitx-config-gtk - it seems to work - posted

Offline Zhe

  • Newbie
  • *
  • Posts: 17
Re: Update to mesa in tc-16.x x86 repo
« Reply #25 on: November 12, 2025, 12:47:12 AM »

Oh! Thank you so much !

When I tried to compile it myself, it seems the problem was with libunique.tcz.

[  0%] Built target fcitx-scan-addons.target
[ 15%] Built target translations_1
[ 15%] Built target fcitx-modules.target
[ 23%] Linking C executable fcitx-config-gtk
/usr/local/bin/ld: warning: libglapi.so.0, needed by /usr/local/lib/libunique-1.0.so, not found (try using -rpath or -rpath-link)
[100%] Built target fcitx-config-gtk

ldd /tmp/tcloop/libunique/usr/local/lib/libunique-1.0.so | grep "not"
   libglapi.so.0 => not found

Thank you for taking the time here !

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 15327
Re: Update to mesa in tc-16.x x86 repo
« Reply #26 on: November 12, 2025, 08:11:41 AM »
it seems the problem was with libunique.tcz.

libunique also rebuilt and posted