void-packages icon indicating copy to clipboard operation
void-packages copied to clipboard

mesa: update to version 24.0.2.

Open SpidFightFR opened this issue 1 year ago • 32 comments

Testing the changes

  • I tested the changes in this PR: briefly

Local build testing

  • I built this PR locally for my native architecture, (x64-GlibC)

This is it, the new version of mesa, 24.0.0. Do keep in mind that it requires libdrm-2.4.119 to work. As a consequence, this PR will stay as draft for as long as libdrm hasn't been updated. Edit: Also please check out the 23 branch as Void lacks several bugfixes for this branch.

I removed the patch to fix meson builds as it doesn't seem to be necessary anymore.

This version of mesa brings a lot of good stuff, Ray tracing performance improvements and such !

SpidFightFR avatar Feb 01 '24 18:02 SpidFightFR

Note: the builds (currently) fail because of libdrm, don't mind them, i'll force a push to re-try those when libdrm will be updated.

SpidFightFR avatar Feb 01 '24 18:02 SpidFightFR

just put libdrm in this pr

classabbyamp avatar Feb 02 '24 06:02 classabbyamp

just put libdrm in this pr

But there's already another PR opened for that (https://github.com/void-linux/void-packages/pull/48170)...

SpidFightFR avatar Feb 02 '24 08:02 SpidFightFR

@classabbyamp hey sorry for the ping, but in either cases, we should integrate the 23 branch latest patches before getting our hands in mesa 24, void still runs 23.3.2 as of now, and thus misses a lot of bugfixes from upstream. :sweat_smile:

As for libdrm, i can add it in this PR if you want to, it's up to you to tell me if maintainers want to merge lbdrm PR then mesa 24 or both all together. :smile:

SpidFightFR avatar Feb 03 '24 17:02 SpidFightFR

Updated the template to include changes made here.

SpidFightFR avatar Feb 09 '24 12:02 SpidFightFR

hey, 24.0.1 hit - f387192b08c471c545590dd12230a2a343244804b5fe866fec6aea02eab57613

zlice avatar Feb 15 '24 02:02 zlice

hey, 24.0.1 hit - f387192b08c471c545590dd12230a2a343244804b5fe866fec6aea02eab57613

Working on it, we still need that libdrm.

SpidFightFR avatar Feb 15 '24 12:02 SpidFightFR

if it's easier to put in here, w/e i'll close mine

zlice avatar Feb 15 '24 12:02 zlice

if it's easier to put in here, w/e i'll close mine

Copy that. I'll port your changes here.

SpidFightFR avatar Feb 15 '24 12:02 SpidFightFR

Testing the changes

  • I tested the changes in this PR: briefly

Local build testing

  • I built this PR locally for my native architecture, (x64-GlibC)

Modified PR for mesa 24.0.1. I kept the removal of the patch to fix meson builds as it isn't necessary anymore. Also thank you @zlice for your libdrm fix.

SpidFightFR avatar Feb 15 '24 12:02 SpidFightFR

libdrm is now at 120, maybe you can rebase?

dkwo avatar Feb 15 '24 21:02 dkwo

libdrm is now at 120, maybe you can rebase?

Yeah imma do this tomorrow, it's 1 AM at my place and i didn't get much sleep lately 🥲

Thanks for reminding me tho 👌

Update: it's done.

SpidFightFR avatar Feb 15 '24 23:02 SpidFightFR

Just testing stuff...

SpidFightFR avatar Feb 16 '24 12:02 SpidFightFR

Nope, the aarch64 and arm builds are still broken, that reminds me of mesa 23...

SpidFightFR avatar Feb 16 '24 12:02 SpidFightFR

i see build-helper/rust.sh : 28 has export BINDGEN_EXTRA_CLANG_ARGS+=" --sysroot=${XBPS_CROSS_BASE} -I${XBPS_CROSS_BASE}/usr/include"

not sure how or where that's used? 1 or 2 other templates seem to have the var.

try this in mesa template? idk rust really but quick search points to the bindgen cross build var (may want to do for only musl??? dont think it would matter but)

post_configure() {
  if [ "$CROSS_BUILD" ]; then
    find -iname "*.ninja" -exec sed -i "{}" \
      -e "/rustc/s; --sysroot ${XBPS_CROSS_BASE}/usr;;g" \
      \;
    BINDGEN_CFLAGS="--target=$XBPS_CROSS_TRIPLET \
      --sysroot=${XBPS_CROSS_BASE} ${BINDGEN_INCLUDE_FLAGS}"
  fi
}

zlice avatar Feb 16 '24 13:02 zlice

Strangely aarch64-musl builds, but aarch64-glibc fails with

r/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-32.h' file not found
clang diag: /usr/include/features.h:414:4: warning: _FORTIFY_SOURCE requires compiling with optimization (-O) [-W#warnings]
panicked at bindgen-cli/main.rs:52:36:
Unable to generate bindings: ClangDiagnostic("/usr/include/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-32.h' file not found\n")
[2687/2874]

dkwo avatar Feb 16 '24 13:02 dkwo

Strangely aarch64-musl builds, but aarch64-glibc fails with

oh ya, that is weird. i only looked at 1 of the errors but saw the last 1 was musl. fun

zlice avatar Feb 16 '24 13:02 zlice

i see build-helper/rust.sh : 28 has export BINDGEN_EXTRA_CLANG_ARGS+=" --sysroot=${XBPS_CROSS_BASE} -I${XBPS_CROSS_BASE}/usr/include"

not sure how or where that's used? 1 or 2 other templates seem to have the var.

try this in mesa template? idk rust really but quick search points to the bindgen cross build var (may want to do for only musl??? dont think it would matter but)

post_configure() {
  if [ "$CROSS_BUILD" ]; then
    find -iname "*.ninja" -exec sed -i "{}" \
      -e "/rustc/s; --sysroot ${XBPS_CROSS_BASE}/usr;;g" \
      \;
    BINDGEN_CFLAGS="--target=$XBPS_CROSS_TRIPLET \
      --sysroot=${XBPS_CROSS_BASE} ${BINDGEN_INCLUDE_FLAGS}"
  fi
}

trying that... let's see how this turns out.

SpidFightFR avatar Feb 16 '24 13:02 SpidFightFR

naw it wont like dkwo just pointed out...thinking right above that checking for musl and unsetting or something

zlice avatar Feb 16 '24 13:02 zlice

ok so this works for x86, a64, a7l

post_configure() {
  if [ "$CROSS_BUILD" ]; then
    find -iname "*.ninja" -exec sed -i "{}" \
      -e "/rustc/s; --sysroot ${XBPS_CROSS_BASE}/usr;;g" \
      -e "s|-isystem/usr/include||g" \
      \;
  fi
}

it looks like ninja build has -isystem/usr/include for everything, so aarch64 gets x86_64's gnu stub.h ... which wants -32, which a64 doesn't have.

screenshot ninja build llvm_bindings

systeminclude

zlice avatar Feb 16 '24 16:02 zlice

ok so this works for x86, a64, a7l

post_configure() {
  if [ "$CROSS_BUILD" ]; then
    find -iname "*.ninja" -exec sed -i "{}" \
      -e "/rustc/s; --sysroot ${XBPS_CROSS_BASE}/usr;;g" \
      -e "s|-isystem/usr/include||g" \
      \;
  fi
}

it looks like ninja build has -isystem/usr/include for everything, so aarch64 gets x86_64's gnu stub.h ... which wants -32, which a64 doesn't have. screenshot ninja build llvm_bindings

systeminclude

Noice imma try that once back at home.

How do you manage to see all that? 😅 Like how do you do to make these patches and stuff?

SpidFightFR avatar Feb 16 '24 16:02 SpidFightFR

i was looking at rust related stuff and cross args but none of that made a difference. then i saw -isystem... and thought it looked out of place just from doing build stuff over the years.

zlice avatar Feb 16 '24 17:02 zlice

i was looking at rust related stuff and cross args but none of that made a difference. then i saw -isystem... and thought it looked out of place just from doing build stuff over the years.

Wow...

I'm a noob at compiling stuff, it's always impressive to see other's experience, not gonna lie.

SpidFightFR avatar Feb 16 '24 17:02 SpidFightFR

@zlice Do you think this line in https://github.com/void-linux/void-packages/blob/2f4a8ac961862e0e31d60d532f0d31429ef434fb/common/build-helper/meson.sh#L68 is ignored, or somehow not passed over from meson to ninja?

dkwo avatar Feb 16 '24 17:02 dkwo

@zlice Do you think this line in is ignored, or somehow not passed over from meson to ninja?

there's sysroot and targets to aarch64 after configure. maybe the system includes happened to work last time? or the new rust update to 69 is just doing stuff different idk rust enough

zlice avatar Feb 16 '24 17:02 zlice

ok so this works for x86, a64, a7l

post_configure() {
  if [ "$CROSS_BUILD" ]; then
    find -iname "*.ninja" -exec sed -i "{}" \
      -e "/rustc/s; --sysroot ${XBPS_CROSS_BASE}/usr;;g" \
      -e "s|-isystem/usr/include||g" \
      \;
  fi
}

it looks like ninja build has -isystem/usr/include for everything, so aarch64 gets x86_64's gnu stub.h ... which wants -32, which a64 doesn't have. screenshot ninja build llvm_bindings

You just fixed mesa 24 on void, thanks !

SpidFightFR avatar Feb 16 '24 18:02 SpidFightFR

can this be https://github.com/mesonbuild/meson/pull/9993 ?

dkwo avatar Feb 16 '24 19:02 dkwo

If by chance a maintainer sees this, we should push 23.3.6 first before mesa 24.0.1, as it's the last bugfix release of the 23 branch according to the calendar, it's a 90%+ guarantee of it just working. :smile:

SpidFightFR avatar Feb 16 '24 22:02 SpidFightFR

Testing the changes

  • I tested the changes in this PR: briefly

Local build testing

  • I built this PR locally for my native architecture, (x64-GlibC)

Modified PR for mesa 24.0.2. Same as the previous edits.

SpidFightFR avatar Feb 28 '24 19:02 SpidFightFR

looks the same on A770 for me :+1:

zlice avatar Feb 28 '24 20:02 zlice