Switching target architecture doesn't change the build directory, causing a build error
Steps to reproduce:
- Build a Meson project normally
- Switch the device to something with a different architecture (e.g. "Aarch64 Emulation")
- Build again
- You'll get an error like this:
Stopping at module gnome-maps
Pruning cache
flatpak build --share=network --nofilesystem=host --filesystem=/home/jwestman/.var/app/org.gnome.Builder/cache/gnome-builder --filesystem=/home/jwestman/Documents/gnome-maps --filesystem=/home/jwestman/.var/app/org.gnome.Builder/cache/gnome-builder/projects/gnome-maps/builds/org.gnome.Maps.json-flatpak-org.gnome.Platform-x86_64-master-master --env=V=1 '--env=CFLAGS=-O2 -g' '--env=CXXFLAGS=-O2 -g' --env=NOCONFIGURE=1 /home/jwestman/.var/app/org.gnome.Builder/cache/gnome-builder/projects/gnome-maps/flatpak/staging/aarch64-master ninja
ninja: error: '/usr/lib/x86_64-linux-gnu/libEGL.so', needed by 'lib/libgnome-maps.so.0.0.0', missing and no known rule to make it
Notice how the flatpak build
command mixes x86_64 and aarch64 directories, and Ninja is still looking for x86_64 binaries.
Workaround is to rebuild the project, but this can take a long time.