Re: Static PostgreSQL Binaries (Linux + Windows)
Thanks, I'll check it out. On Sun, Jan 13, 2019, 9:13 AM Zach van Rijn On Sun, 2019-01-13 at 00:51 -0500, Pratik Parikh wrote: > > Than you. nice to hear from you . Would be able to share the > > build scripts with community? are they open source? > > Hi Pratik, > > > Yes; the build scripts were linked at the bottom of my original > mail message in this chain: https://git.zv.io/xstatic/builder/ > > $ git clone https://git.zv.io/xstatic/builder.git > $ cd builder > $ ./build postgresql- # 11.1, etc. > > Under the hood, the only major "technique" is wrapping the 'gcc' > command with flags such as '-static' to ensure that everything > is built correctly, and using reliable toolchains [1]. > > There is one minor issue in that the postgres build scripts no > longer appear to support static building [2,3] so it'll attempt > to build files such as 'POSIX.so' etc. and these cause errors. > > The workaround is simply to ignore these errors during build > until I or someone else can get around to supplying patches (in > the next week or so; I have other commitments). > > > > > Regards, > > Pratik Parikh > > ZV > > > [1]: https://musl.cc/ > > [2]: https://www.postgresql.org/message-id/CABFfbXuxyO20JN8T%2BC > yfSe29T-GTON69FrKHQ%3Dc9jDMxnm6C_w%40mail.gmail.com > > [3]: https://www.postgresql.org/message-id/CABFfbXvONEKE2Bpnbfm5 > %3Df3fVVLpv6jLVUAhF7iGoWN7a_EeRw%40mail.gmail.com > >
Re: Static PostgreSQL Binaries (Linux + Windows)
Than you. nice to hear from you . Would be able to share the build scripts with community? are they open source? Regards, Pratik Parikh On Sat, Jan 12, 2019 at 10:57 PM Zach van Rijn wrote: > Hi all, > > > I've been busy porting popular open-source software to various > platforms (Linux + Windows) via musl- and/or MinGW- based tools, > as part of a project (and future distro?) called 'xstatic' [1]. > > All packages are statically linked and have zero dependencies, > they can be easily reproduced and audited, they are best suited > for use in environments where software must behave consistently, > and may have additional performance / safety benefits. > > I am pleased to announce the immediate availability of binaries > (and source code / build scripts) for the following releases: > > release datelocation > --- -- -- > latest n/a https://xstatic.musl.cc/postgresql/ > 11.1 2018-11-08 https://xstatic.musl.cc/postgresql-11.1/ > 10.6 2018-11-08 https://xstatic.musl.cc/postgresql-10.6/ > 9.6.11 2018-11-08 https://xstatic.musl.cc/postgresql-9.6.11/ > 9.5.15 2018-11-08 https://xstatic.musl.cc/postgresql-9.5.15/ > 9.4.20 2018-11-08 https://xstatic.musl.cc/postgresql-9.4.20/ > 9.3.25 2018-11-08 https://xstatic.musl.cc/postgresql-9.3.25/ > > > Within each top-level directory, you will find pertaining to an > architecture/ABI combination such as 'riscv32-linux-musl' (this > is the target platform where binaries should run), either: > > (1) Directory tree (browse / download individual binaries); or > e.g., https://xstatic.musl.cc/postgresql/riscv32-linux-musl/ > > (2) Tarball containing the above contents, with a sha512sum that > is verifiable against '//SHA512SUMS'. Just extract > and run (or build/link your own software against libraries). > > > PostgreSQL has been built for the following platforms, however, > not all platforms have been tested (please feel free to help): > > * aarch64-linux-musleabi > * aarch64_be-linux-musl > * arm-linux-musleabi > * arm-linux-musleabihf > * armeb-linux-musleabi > * armeb-linux-musleabihf > * armel-linux-musleabi > * armel-linux-musleabihf > * armv5l-linux-musleabihf > * armv7l-linux-musleabihf > * armv7m-linux-musleabi > * armv7r-linux-musleabihf > * i486-linux-musl > * i686-linux-musl > * i686-w64-mingw32 > * m68k-linux-musl > * microblaze-linux-musl > * microblazeel-linux-musl > * mips-linux-musl > * mips-linux-musln32sf > * mips-linux-muslsf > * mips64-linux-musl > * mips64-linux-musln32 > * mips64-linux-musln32sf > * mips64el-linux-musl > * mips64el-linux-musln32 > * mips64el-linux-musln32sf > * mipsel-linux-musl > * mipsel-linux-musln32 > * mipsel-linux-musln32sf > * mipsel-linux-muslsf > * or1k-linux-musl > * powerpc-linux-musl > * powerpc-linux-muslsf > * powerpc64-linux-musl > * powerpc64le-linux-musl > * powerpcle-linux-musl > * powerpcle-linux-muslsf > * riscv32-linux-musl > * riscv64-linux-musl > * s390x-linux-musl > * sh2-linux-musl > * sh2-linux-muslfdpic > * sh2eb-linux-musl > * sh2eb-linux-muslfdpic > * sh4-linux-musl > * sh4eb-linux-musl > * x86_64-linux-musl > * x86_64-linux-muslx32 > * x86_64-w64-mingw32 > > > Quickly testing on Ubuntu 14.04 LTS (GNU/Linux 3.4.98 armv7l): > > $ file ./armv7l-linux-musleabihf/bin/psql > psql: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), > statically linked, stripped > > $ ./armv7l-linux-musleabihf/bin/psql --version > psql (PostgreSQL) 11.1 > > $ ./armv7l-linux-musleabihf/bin/psql \ > -h pellefant.db.elephantsql.com\ > -U abcdefgh > Password: > psql (11.1, server 9.5.2) > Type "help" for help. > > abcdefgh=> > > > The directory listing looks something like: http://ix.io/1yaV > > That said, if you find bugs or encounter issues, please file a > bug report here [2]. Windows support may need tweaking. > > > Regards, > > ZV > > > [1]: https://xstatic.musl.cc/ > > [2]: https://git.zv.io/xstatic/builder/issues > > > -- Pratik Parikh - Mantra - Keep It Simple and Straightforward
Re: Compile and build portable postgresql for mac
Thanks, I'll check them out. But what I am trying to produce is a zip distribution fo Mac is x similar to the one available on postgresql download site. Homebrew works but it ties the libpg to prefix if the path where libs are generated. I am trying to do some unit testing across more then one machine on an ongoing basis. Hope that helps clear uo what I mean by portable. On Thu, Oct 25, 2018, 9:31 AM Don Seiler wrote: > On Wed, Oct 24, 2018 at 7:22 PM Pratik Parikh > wrote: > >> How to compile and build portable postgresql for mac. Can someone >> point me how the builds are done for general distribution. A script would >> be appreciated if anyone has it. >> > > I'm not sure what you mean by "portable"? I'm going to answer assuming you > just want to run postgres on your own Mac. > > There are couple options. Peter Eisentraut has a great collection of > Homebrew scripts that you can plug into: > https://github.com/petere/homebrew-postgresql > > I've recently switched to pgenv, which provides a clean CLI for building > and using all the various supported versions: > https://github.com/theory/pgenv > > Don. > -- > Don Seiler > www.seiler.us >
Compile and build portable postgresql for mac
Hi all, How to compile and build portable postgresql for mac. Can someone point me how the builds are done for general distribution. A script would be appreciated if anyone has it. Regards, Pratik
Re: Compile psql 9.6 with SSL Version 1.1.0
Thanks for providing the insight needed to make this work on Windows. On Fri, Oct 12, 2018, 12:17 PM Tom Lane wrote: > Pratik Parikh writes: > > I have seen the same failure on windows build. I can only use > > openssl 1.02(x). > > Hmm ... looking at it closer, I realize that part of the problem is > that with 1.1.0 you need HAVE_BIO_METH_NEW to be defined, and there's > no mechanism for doing that in the MSVC build code. Worse, there's > half a dozen other OpenSSL-version-dependent symbols that get set by > configure in non-Windows builds, but we have nothing equivalent to > that for Windows. Michael P. laid out the situation in a recent commit > message: > > > Author: Michael Paquier > Branch: master Release: REL_11_BR [bde64eb61] 2018-06-19 09:00:33 +0900 > > Track new configure flags introduced for version 11 in > pg_config.h.win32 > > The following set of flags mainly matter when building Postgres code > with MSVC and those have been forgotten with latest developments: > - HAVE_LDAP_INITIALIZE, added by 35c0754f, and marked as disabled. > ldap_initialize() is a non-standard extension that provides a way to > use > "ldaps" with OpenLDAP, but it is not supported on Windows, and instead > the non-standard ldap_sslinit() is used if WIN32 is defined. Per input > from Thomas Munro. > - HAVE_X509_GET_SIGNATURE_NID, added by 054e8c6c, which is used by > SCRAM's channel binding tls-server-end-point. Having this flag > disabled > would cause this channel binding type to be unsupported for Windows > builds. > - HAVE_SSL_CLEAR_OPTIONS, added recently as of a364dfa4 to disable SSL > compression. > - HAVE_ASN1_STRING_GET0_DATA, added by 5c6df67, which is used to track > a new compatibility with OpenSSL 1.1.0. This was missing from > pg_config.win32.h and is not enabled by default. HAVE_BIO_GET_DATA, > HAVE_OPENSSL_INIT_SSL and HAVE_BIO_METH_NEW gain the same treatment. > > The second and third flags are enabled with this commit, which raises > the bar of OpenSSL support to 1.0.2 on Windows as a minimum. As this > is the LTS (long-time support) version of OpenSSL community and knowing > that all recent installers referred by OpenSSL upstream don't have > anymore 1.0.1 or older, we could live with that requirement. In order > to allow the code to compile with OpenSSL 1.1.0, all the flags > mentioned > above need to be enabled in pg_config.h.win32. > > Author: Michael Paquier > Reviewed-by: Andrew Dunstan > Discussion: https://postgr.es/m/20180529211559.gf6...@paquier.xyz > > > So the immediate fix for building on Windows is you need to manually > define all of those in pg_config.h. We probably ought to try to make > that less painful, though. At the very least it'd be good if there > were just one symbol you had to set manually ... > > regards, tom lane >
Re: Compile psql 9.6 with SSL Version 1.1.0
I have seen the same failure on windows build. I can only use openssl 1.02(x). On Fri, Oct 12, 2018 at 11:32 AM Tom Lane wrote: > =?UTF-8?B?w4Fkw6FtIE1hcmFjc2th?= writes: > > Currently I am trying to compile my pqlib with SSL version 1.1.0, but I > get > > the following errors: > > *fe-secure-openssl.c(1582): error C2037: left of 'ptr' specifies > undefined > > struct/union 'bio_st'* > > [etc] > > That certainly ought to work, and does work for me and for several of > our buildfarm machines. I suspect you messed up the build somehow; > perhaps you changed OpenSSL versions and didn't re-run configure? Or > the OpenSSL headers you have installed don't match the library version? > Are the errors you showed the *only* ones you get? > > regards, tom lane > > -- Pratik Parikh - Mantra - Keep It Simple and Straightforward