flatpak / flatpak-builder

Tool to build flatpaks from source
GNU Lesser General Public License v2.1
141 stars 93 forks source link

Always calculate libdir #588

Closed nanonyme closed 9 months ago

nanonyme commented 9 months ago

flatpak-builder relies on patched cmake and meson from freedesktop-sdk to change libdir from lib64 to lib on 64bit distributions. This dependency is weird since it's actually flatpak that sets up the dynamic linker paths. Instead, put responsibility for setting up correct libdir to flatpak-builder always.

nanonyme commented 9 months ago

Not sure whether there's a risk that always passing libdir breaks something.

TingPing commented 9 months ago

I think this is fine.

I tested cmake, autotools, and meson. If you pass libdir twice the second one always wins, so manifests with custom values will still be respected. And in practice the default with fdo was this so I don't see an issue.

nanonyme commented 9 months ago

It's not actually set twice. (assuming app author is using flatpak-builder libdir functionality) New logic is:

  1. If module sets libdir, use that
  2. If building runtime, read from runtime configuration file and use that
  3. If libdir is completely unset, calculate "lib" directory under prefix.

The step 3 is new, steps 1 and 2 were there already.

TingPing commented 9 months ago

I don't mean we set it twice. Just an old manifest may have set it manually itself.