WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Update to mesa in tc-16.x x86 repo  (Read 664 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: 15306
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: 15306
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 »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12277
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: 1446
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: 391
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: 15306
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