Re: Issues cross-compiling libpq 14.x to MacOS armv8

2021-12-02 Thread Tom Lane
Vincas Dargis writes: > Should we expect this fix in the next 14 patch release, or only in 15.x? I did push it into v14: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=175edafd1f30a78643359b56c5545b5e7aabfb50 regards, tom lane

Re: Issues cross-compiling libpq 14.x to MacOS armv8

2021-12-02 Thread Vincas Dargis
Thanks Tom! Should we expect this fix in the next 14 patch release, or only in 15.x? If latter, I would add this patch into Conan package itself, to make it work earlier. On 2021-11-30 23:33, Tom Lane wrote: I wrote: It seems like a useful test when *not* cross compiling, which is most of th

Re: Issues cross-compiling libpq 14.x to MacOS armv8

2021-12-01 Thread Tom Lane
Daniel Gustafsson writes: >> On 1 Dec 2021, at 07:11, Peter Eisentraut >> wrote: >> Because you are only supposed to look for files that you need during the >> build. > So by that logic, do you think the AC_CHECK_FILE call should be removed? I don't buy that. The test is useful on net, and I

Re: Issues cross-compiling libpq 14.x to MacOS armv8

2021-12-01 Thread Daniel Gustafsson
> On 1 Dec 2021, at 07:11, Peter Eisentraut > wrote: > On 30.11.21 22:04, Tom Lane wrote: >> (I'm a bit surprised that the AC_CHECK_FILE macro doesn't provide >> an action-if-cross-compiling option, but it apparently doesn't.) > > Because you are only supposed to look for files that you need du

Re: Issues cross-compiling libpq 14.x to MacOS armv8

2021-11-30 Thread Peter Eisentraut
On 30.11.21 22:04, Tom Lane wrote: Daniel Gustafsson writes: On 30 Nov 2021, at 20:59, Tom Lane wrote: AFAICS this is the only test in our configure script that is a hard fail when cross-compiling, and I don't see a reason for it to be that. We could just assume that /dev/urandom will be avail

Re: Issues cross-compiling libpq 14.x to MacOS armv8

2021-11-30 Thread Tom Lane
Daniel Gustafsson writes: > I noticed that we test without the x"foo" = x"yes" construction for zic (line > 1135), should we change that while at it and be consistent for all > $cross_compiling uses? Probably. $cross_compiling should theoretically always be set, but there's no harm in being bull

Re: Issues cross-compiling libpq 14.x to MacOS armv8

2021-11-30 Thread Daniel Gustafsson
> On 30 Nov 2021, at 22:33, Tom Lane wrote: > > I wrote: >> It seems like a useful test when *not* cross compiling, which is most >> of the time. I'd just wrap that bit in >>if test "$cross_compiling" = no; then > > Or actually, since we should print something, it looks like this will do:

Re: Issues cross-compiling libpq 14.x to MacOS armv8

2021-11-30 Thread Tom Lane
I wrote: > It seems like a useful test when *not* cross compiling, which is most > of the time. I'd just wrap that bit in > if test "$cross_compiling" = no; then Or actually, since we should print something, it looks like this will do: diff --git a/configure.ac b/configure.ac index a5c10b8d5

Re: Issues cross-compiling libpq 14.x to MacOS armv8

2021-11-30 Thread Tom Lane
Daniel Gustafsson writes: >> On 30 Nov 2021, at 20:59, Tom Lane wrote: >> AFAICS this is the only test in our configure script that is a hard >> fail when cross-compiling, and I don't see a reason for it to be that. >> We could just assume that /dev/urandom will be available --- that's no >> wors

Re: Issues cross-compiling libpq 14.x to MacOS armv8

2021-11-30 Thread Daniel Gustafsson
> On 30 Nov 2021, at 20:59, Tom Lane wrote: > > Vincas Dargis writes: >> checking which random number source to use... /dev/urandom >> checking for /dev/urandom... >> configure: error: cannot check for file existence when cross compiling > > Hmm ... this evidently stems from 16f96c74d. > > AF

Re: Issues cross-compiling libpq 14.x to MacOS armv8

2021-11-30 Thread Tom Lane
Vincas Dargis writes: > checking which random number source to use... /dev/urandom > checking for /dev/urandom... > configure: error: cannot check for file existence when cross compiling Hmm ... this evidently stems from 16f96c74d. AFAICS this is the only test in our configure script that is a

Issues cross-compiling libpq 14.x to MacOS armv8

2021-11-30 Thread Vincas Dargis
Hi list, I wanted to update [0] Conan package for building libpq 14.1. Usually it's enough to add new tarball and declare it's hash, but it seems that since 14.0 cross-compiling to armv8 MacOS now fails, and I *guess* it's due to removed `--disable-strong-random` option. Here's some snippets