Search Criteria
Package Details: meshoptimizer 1.1-2
Package Actions
| Git Clone URL: | https://aur.archlinux.org/meshoptimizer.git (read-only, click to copy) |
|---|---|
| Package Base: | meshoptimizer |
| Description: | Mesh optimization library that makes meshes smaller and faster to render |
| Upstream URL: | https://meshoptimizer.org |
| Licenses: | MIT |
| Submitter: | mosra |
| Maintainer: | mosra |
| Last Packager: | mosra |
| Votes: | 6 |
| Popularity: | 0.050369 |
| First Submitted: | 2020-04-18 11:43 (UTC) |
| Last Updated: | 2026-05-16 09:58 (UTC) |
Dependencies (3)
- cmake (cmake3AUR, cmake-gitAUR) (make)
- libwebp (libwebp-gitAUR) (make)
- zstd (zstd-gitAUR, zstd-staticAUR) (make)
Required by (5)
- gltfpack
- magnum-plugins-git
- osgearth
- osgearth (make)
- osgearth-docs (make)
Latest Comments
1 2 Next › Last »
mosra commented on 2026-05-16 10:11 (UTC)
@vitaliikuzhdin Alright, finally done. Sorry for the delay, and for the missing file in the gist.
I ended up splitting the package as doing so now allows installing the base
meshoptimizerlibrary along with yourgltfpack-bin, which could be useful in some scenarios.I also added the soversion and renamed the sources. Didn't add the
libgccetc. dependencies yet because thegcc-libssplit happened only relatively recently and my Arch install is outdated For Reasons and doesn't have them yet. Will do that along with the next version bump.vitaliikuzhdin commented on 2026-05-12 20:44 (UTC)
@mosra, couldn't test it with the native ZSTD since you forgot to upload the patch to GitHub but overall I'd say this approach is probably the best. Building the project for 10 seconds instead of 5 might be 2x longer but is still very fast, I don't see any reason not to provide more features.
Regarding the split, the only difference that would make is 1MiB from
libwebpand 3.1MiB fromglfpack. You could, of course, implement that, but I don't think it's strictly necessary, nobody is running Arch on floppy disks nowadays.One thing you might want to do is to add the bundled BasisU version into the
pkgverlike I do in matlab-mpm, for example. But again, I don't think it's strictly necessary because that fork doesn't see any updates and you would also have to decide on the versioning of the BasisU itself.Please also take a look at my gist for things you might have missed. Just from the top of my head, you'd need to rename the sources, stop relying on transitive dependencies, add
MESHOPT_SOVERSION:STRING, and a few more, it should be pretty readable.Thanks for the explanations by the way.
mosra commented on 2026-05-12 10:28 (UTC) (edited on 2026-05-12 10:35 (UTC) by mosra)
I took a deep breath, counted to ten, managed to calm myself down and here's a working version that is using the forked Basis along with a patch to use system zstd: https://gist.github.com/mosra/0d7bc773652fd6a22026eaf39051aa9b Comments there should hopefully explain what's going on. Regarding the dependency on cwebp internals, I kind of understand why the author does that, I could ask about those but I think the alternative with using Basis decoders works well here. @vitaliikuzhdin, does this look reasonable?
I'm now thinking that I should maybe turn this into a split package so people can install only the library and skip gltfpack along with the extra dependencies if they don't need it?
vitaliikuzhdin commented on 2026-05-11 11:37 (UTC) (edited on 2026-05-11 11:39 (UTC) by vitaliikuzhdin)
@mosra, I'm not sure what the best option is. I'd say a maintainer is not a magician and, at the very least, they shouldn't have to fight with what upstream provides just to make it compile. I wouldn't expect a good solution that fits everyone to come out of bad practices in upstream, there will always be some trade-offs.
I think it's easier to decide on the best course of action when there is some input data. I want to try building
meshoptimizeragainst the bundledbasis-universalfork to see what difference it makes in practice. Could you please provide instructions on how to build againstlibwebpwithout hitting errors? I've tried using a blankCMakeLists.txtlike you suggested:And I'm running into this:
Which is, expectedly, exactly what I get with a shim
CMakeLists.txt. What am I doing wrong?mosra commented on 2026-05-11 10:41 (UTC)
Thanks for the details, vitaliikuzhdin. Locally I managed to make the package build against system webp by pointing
MESHOPT_GLTFPACK_LIBWEBP_PATHto an emptyCMakeLists.txtfile, that part is relatively easy & clean.As for Basis, the maintainers are notoriously known for ignoring all requests over the years for making the project actually usable as a library, or fixing compiler warnings, or just anything, yet somehow it became a Khronos standard... I'm surprised there is an Arch package at all, actually, given that that it relies on a PR that's likely never going to get merged, along with other patches that were submitted years ago and never got merged either. (With magnum-plugins-git I'm bundling Basis as well and it's been a real pain to support over the years.)
In case of meshoptimizer, the official binary that is packaged in
gltfpack-binis built against https://github.com/zeux/basis_universal/tree/gltfpack (yeah, again a fork, with several critical fixes on top). The fork is roughly two years old, and AFAIK theKHR_texture_basisuglTF extension doesn't use anything that the newer versions of BasisU provide. Newer versions also regularly break API for no reason, so I'm thinking I should stick with the same version as the meshoptimizer author uses to not run into issues.But ... it's honestly quite a brittle tower of hacks (I would still need to apply a patch to remove the outdated bundled zstd, among other things), adding the bundled Basis makes the compilation significantly longer, and for software that relies just on the
meshoptimizerlibrary -- as opposed to end users that use gltfpack -- it's quite a lot of needless overhead. So I'm not sure what to do here :/ Maybe just directing people togltfpack-binif they want Basis or WebP support is the solution?vitaliikuzhdin commented on 2026-05-09 10:07 (UTC)
@That1Calculator, you can temporarily switch to gltfpack-bin while the issue is being resolved here.
@mosra, it seems the upstream bundles BasisU and libwebp statically, which could work but is less than ideal. I've tried using CMake shims to link against the system libraries instead, but it didn't quite work.
Regarding BasisU, the Arch package appears to omit
/usr/include/basisu/encoder/basisu_astc_ldr_encode.h(likely unintentionally). Fixing this would probably require contacting either the Arch maintainer or the upstream author at https://github.com/BinomialLLC/basis_universal/pull/409As for libwebp, the Arch package seems to omit
/usr/include/webp/imageio/image_dec.h(likely intentionally). I'm not an expert in this area, so you'll have to look into that further on your own.In any case, feel free to check out my version. It includes more important fixes unrelated to this issue: https://gist.github.com/vitaliikuzhdin/6c5db90bc1675bcab90baa9fde455f78
That1Calculator commented on 2026-05-08 23:50 (UTC)
getting this error when running gltfpack:
gltfpack was built without BasisU support, texture compression is not availablePopolon commented on 2025-12-25 16:31 (UTC)
The URL of the project is https://meshoptimizer.org/ not github (source repository).
mosra commented on 2025-03-20 11:42 (UTC) (edited on 2025-03-20 11:42 (UTC) by mosra)
Thanks, that wiki is exactly what I was looking for.
Should be updated, I also removed the implicit strip to have a
-debugpackage created with meaningful contents.vitaliikuzhdin commented on 2025-03-20 11:17 (UTC)
@mosra, you are correct, with one minor exception:
Releaseappends-O3to the build flags instead of replacing them entirely. You can read more about both of these in the wiki.1 2 Next › Last »