--prefix= being passed to autotools scripts?

I notice --prefix= is being passed to configure scripts for autotools builds
Is that intentional? It breaks a lot of builds.
I am working around it by overriding configflags for each “part” that is compiling from source, it seems a bit weird though?

On SnapCraft 3.6, messing with setting --prefix does more harm than good. It will mess with pkg-config’s .pc files for included libraries, since the install step doesn’t actually drop libs in /usr/lib…keeps them in /root/stage, can cause build steps to fail when it can’t find libraries expecting them to have installed to /usr/lib post stage step of a particular part.

At this point, snapcraft passing --prefix= is only messing with libvirt, which is hardcoding C macros off of what is passed to ./configure which seems super annoying of them.

Yeah, in the sandbox the .pc files will reference /root/xxx, but this shouldn’t harm anything unless you are trying to snapcraft a build environment itself…