Hi, On 2022-09-30 10:17:37 -0700, Andres Freund wrote: > Agreed - I was just trying to give background. I'm inclined to just go for > Junwang Zhao's patch for now.
That turns out to break tests on windows right now - but it's not the fault of the patch. Paths on windows are just evil: We do the installation for tmp_install with DESTDIR (no surprise) just as in autoconf. To set PATH etc, we need a path to the bindir inside that. Trivial on unixoid systems. Not so much on windows. The obvious problematic cases are things like a prefix of c:/something: Can't just prepend tmp_install/. I'd hacked that up for c:/ style paths. But that doesn't work for paths like /usr/local, because they're neither absolute nor relative, but "drive relative". And then there's like a gazillion other things. A prefix could be '//computer/share/path/to/' and all other sorts of nastiness. I see two potential ways of dealing with this reliably on windows: - error out if a prefix is not drive-local, that's easy enough to check, something like: normalized_prefix.startswith('/') and not normalized_prefix.startswith('//') as the installation on windows is relocatable, that's not too bad a restriction - if on windows call a small python helper to compute the path of tmp_install + prefix, using the code that meson uses for the purpose Greetings, Andres Freund