Tiny Core Linux

Tiny Core Extensions => TCE News => Topic started by: Juanito on October 20, 2025, 11:50:07 AM

Title: Update to mesa in tc-16.x x86 repo
Post by: Juanito on October 20, 2025, 11:50:07 AM
Due to changes in the structure of the mesa graphics libraries several graphics extensions have been updated in the tc-16.x x86 repo.

It is almost certain that some gui extensions will now be missing dependencies, please report these here so it can be fixed.

It is also possible that one or more circular dependencies have been created.

Xorg-7.7, Xorg-7.7-3d and Xorg-7.7-3d-vulkan have all been tested on intel hd4400 haswell graphics hardware. Previously it was not possible to start the gui using Xorg-7.7 without first loading xf86-video-intel, but now it will start without it. It is still necessary, however, to use a conf snippet to tell the Xorg-7.7-3d gui to use the crocus driver instead of the (no longer present) i965 driver.

The following have been added/changed/updated:
Xorg-7.7-3d-dev.tcz
Xorg-7.7-3d-vulkan.tcz
Xorg-7.7-3d.tcz
Xorg-7.7-bin.tcz
libEGL-dev.tcz
libEGL.tcz
libGL-dev.tcz
libGL.tcz
libGLESv2-dev.tcz
libGLESv2.tcz
mesa-dev.tcz
mesa-vulkan.tcz
mesa.tcz
xkbcomp.tcz

The following dep files have changed:
firefox-ESR.tcz.dep
libva22-dev.tcz.dep
libva22.tcz.dep
xorg-server-dev.tcz.dep
xorg-server.tcz.dep
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: CNK on October 21, 2025, 08:40:02 PM
I see Firefox installed with firefox_getLatest.sh now needs at least "libXdamage.tcz" (previously pulled in via the libGLESv2.tcz dependency) added to firefox.tcz.dep or it won't start. I'll test some more and submit an updated firefox_getLatest.sh script when I get the chance.

It's a shame the llvm19-lib.tcz dependency in mesa.tcz.dep is so huge (compared to most other extensions I use).
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Zhe on October 22, 2025, 02:49:00 AM
After updating xorg-7.7-3d and related components, I need to manually add xkbcomp to onboot.lst;

and it seems that libglapi.so.0 is missing.

Code: [Select]
:~$ pcmanfm
pcmanfm: error while loading shared libraries: libglapi.so.0: cannot open shared object file: No such file or directory

Resolved
Restart and update libGL and libGLESv2 again (these were selected during my first update)
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Juanito on October 22, 2025, 03:54:40 AM
It's a shame the llvm19-lib.tcz dependency in mesa.tcz.dep is so huge (compared to most other extensions I use).

The llvm dep could be eliminated if software 3d acceleration were to be dropped - i.e. only have hardware 3d acceleration.
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Juanito on October 22, 2025, 03:56:49 AM
After updating xorg-7.7-3d and related components, I need to manually add xkbcomp to onboot.lst;

xkbcomp is a dep of xorg-server, did you update its dep file (xorg-server itself was not modified)?
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Zhe on October 22, 2025, 05:43:35 AM
After I updated all the .dep files and fixed the dependencies,

wayland-protocols-dev.tcz is not in the x86 repository.

PS:( I have a question: why does python3.x-dev need to depend on Xorg-7.7-dev?)
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Juanito on October 22, 2025, 05:56:21 AM
mesa is not compiled against wayland in the x86 repo in order to limit its size, therefore wayland-protocols is not needed.

python3.x can optionally use tk/tcl, hence the dep on Xorg-7.7-dev
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Juanito on October 22, 2025, 05:59:06 AM
Code: [Select]
:~$ pcmanfm
pcmanfm: error while loading shared libraries: libglapi.so.0: cannot open shared object file: No such file or directory

Is this still a problem, or is it resolved?
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Zhe on October 22, 2025, 06:32:34 AM
x86 repo's  mesa-dev.dep  should delete wayland-protocols-dev.tcz

Solved,Thank you!
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Juanito on October 22, 2025, 06:42:18 AM
corrected - thanks for reporting this
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Zhe on October 22, 2025, 08:44:50 AM
On my machine, pcmanfm/clipit depends on libXdamage, but libXdamage is missing,

so I manually added Xorg-7.7-lib.tcz (libXdamage) to onboot.lst.

Before this update, Xorg-7.7-lib.tcz was included in Xorg-7.7.dep.

Besides this method, are there any other recommended ways to handle it?
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Juanito on October 22, 2025, 09:33:11 AM
It was gtk2 that was missing the dep on libXdamage - adjusted

Edit: gtk3 and firefox-ESR deps also adjusted
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Juanito on October 22, 2025, 09:50:18 AM
I see Firefox installed with firefox_getLatest.sh now needs at least "libXdamage.tcz"

In fact the libXdamage dep should be added to gtk3, which firefox in turn depends on - adjusted now
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: CNK on October 22, 2025, 07:17:19 PM
In fact the libXdamage dep should be added to gtk3, which firefox in turn depends on - adjusted now

Thanks Juanito!

The llvm dep could be eliminated if software 3d acceleration were to be dropped - i.e. only have hardware 3d acceleration.

I'm not actually using hardware 3D acceleration on any of my TC installs. The libGL (libEGL, libGLESv2) deps are pulled in by extensions like librsvg.tcz, freeglut.tcz, and libva2.tcz even though I'm not using any 3D graphics, and often running Xvesa which doesn't support GLX so Mesa is useless anyway. Firefox (from firefox_getLatest.sh) actually works without any of the Mesa deps installed as well.

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 (https://docs.mesa3d.org/faq.html#what-s-the-difference-between-stand-alone-mesa-and-the-dri-drivers) which sounds hopeful but I'm not sure how you build that (I found your build notes (http://tinycorelinux.net/16.x/x86/tcz/src/xorg/compile_mesa) 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?)).
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Zhe on October 23, 2025, 12:43:20 AM
mesa-dev.tcz.dep should delete libelf-dev.tcz   maybe it's elfutils-dev.tcz?
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: mjmouse 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
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Juanito 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.
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Juanito 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 (https://docs.mesa3d.org/faq.html#what-s-the-difference-between-stand-alone-mesa-and-the-dri-drivers) which sounds hopeful but I'm not sure how you build that (I found your build notes (http://tinycorelinux.net/16.x/x86/tcz/src/xorg/compile_mesa) 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
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Rich 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.
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Paul_123 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)
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: CNK 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.
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Juanito on October 24, 2025, 08:12:11 AM
elfutils.tcz is listed twice in mesa.tcz.dep on x86 and x86_64.

fixed - thanks
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Zhe 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.
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Juanito on November 07, 2025, 03:16:32 AM
I’ll be able to take a look in five days or so.
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Juanito on November 11, 2025, 10:32:27 AM
I rebuilt fcitx-config-gtk - it seems to work - posted
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Zhe 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 !
Title: Re: Update to mesa in tc-16.x x86 repo
Post by: Juanito on November 12, 2025, 08:11:41 AM
it seems the problem was with libunique.tcz.

libunique also rebuilt and posted