无法为 ARM 交叉编译 postgresql 12.2

App*_*per 2 linux postgresql autoconf cross-compiling

希望从 ARM 源代码交叉编译 postgresql 获得一些帮助。我正在尝试在X86_64 Ubuntu 18.04.4. 我正在使用传递 autoconf 以下参数:

CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ AR=arm-linux-gnueabihf-ar RANLIB=arm-linux-gnueabihf-ranlib ../configure --host=arm-linux-gnueabihf --without-readline --without-zlib
Run Code Online (Sandbox Code Playgroud)

当我使用 postgresql release 使用上述参数运行 configure 时9.6.2,它​​会成功,并且我能够正确构建库。但是,我想使用最新版本,目前是 V 12.2

当我使用 V 运行上述命令时12.2,收到以下错误消息:

// a bunch of successfull output from autoconf before error message...
checking for /dev/urandom... configure: error: cannot check for file existence when cross compiling
Run Code Online (Sandbox Code Playgroud)

任何想法如何解决这一问题?这是他们的 autoconf 中的错误,还是我这边做错了什么?

Lau*_*lbe 5

根据configure.in,您应该能够覆盖检查:

./configure USE_DEV_URANDOM=1 ...
Run Code Online (Sandbox Code Playgroud)

然后 PostgreSQL 将被构建以供使用,/dev/urandom而无需检查该文件在构建主机上是否存在。