Обсуждение: Windows releases - Bundle OpenSSL includes and .libs in the installer?
Hi I've just noticed that the EDB-produced installer for Pg omits a number of components required to build things that're fully compatible with libpq if they also use some of the same libs as libpq, like libintl, openssl, etc. The specific case of interest to me is psqlODBC, which I've been doing some work on recently. I just realised that a crash I've been encountering is caused by linking to the OpenSSL binaries from http://slproweb.com/products/Win32OpenSSL.html when libpq is using its own different OpenSSL. libeay32.lib is not in the Pg binary distribution for Windows so it's not possible to link directly to the same libeay32.dll that libpq uses. Ideally, every .dll that's shipped should be accompanied by the corresponding .lib, so people compiling against PostgreSQL can use the same OpenSSL, libintl, etc that were used when compiling Pg. The headers for those libraries should really also be bundled, e.g. have an include\openssl dir. That might add a little weight to the installer package, but probably not much - and that's clearly not a huge concern given that it already includes some fat .pdb debug symbols. If trimming the installer is a concern, it'd be reasonable to split the .lib files, includes, and pdb files into a separate "PostgreSQL development" component. The biggest issue - the missing libintl.h - was fixed a while ago, so it's possible to compile simple programs against libpq and have them work properly. Now it's only an issue if your app also needs to use OpenSSL, gettext, etc its self. Thoughts? -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Sandeep, how much effort is it to do this? On Thu, Jul 3, 2014 at 6:26 AM, Craig Ringer <craig@2ndquadrant.com> wrote: > Hi > > I've just noticed that the EDB-produced installer for Pg omits a number > of components required to build things that're fully compatible with > libpq if they also use some of the same libs as libpq, like libintl, > openssl, etc. > > The specific case of interest to me is psqlODBC, which I've been doing > some work on recently. I just realised that a crash I've been > encountering is caused by linking to the OpenSSL binaries from > http://slproweb.com/products/Win32OpenSSL.html when libpq is using its > own different OpenSSL. libeay32.lib is not in the Pg binary distribution > for Windows so it's not possible to link directly to the same > libeay32.dll that libpq uses. > > Ideally, every .dll that's shipped should be accompanied by the > corresponding .lib, so people compiling against PostgreSQL can use the > same OpenSSL, libintl, etc that were used when compiling Pg. The headers > for those libraries should really also be bundled, e.g. have an > include\openssl dir. > > That might add a little weight to the installer package, but probably > not much - and that's clearly not a huge concern given that it already > includes some fat .pdb debug symbols. If trimming the installer is a > concern, it'd be reasonable to split the .lib files, includes, and pdb > files into a separate "PostgreSQL development" component. > > The biggest issue - the missing libintl.h - was fixed a while ago, so > it's possible to compile simple programs against libpq and have them > work properly. Now it's only an issue if your app also needs to use > OpenSSL, gettext, etc its self. > > Thoughts? > > -- > Craig Ringer http://www.2ndQuadrant.com/ > PostgreSQL Development, 24x7 Support, Training & Services -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Shouldn't be a big deal. Just a change in the installer file and the build script. Do we want to add all the OpenSSL header files? That must be around 75..
--
On Thu, Jul 3, 2014 at 1:24 PM, Dave Page <dpage@pgadmin.org> wrote:
Sandeep, how much effort is it to do this?
On Thu, Jul 3, 2014 at 6:26 AM, Craig Ringer <craig@2ndquadrant.com> wrote:
> Hi
>
> I've just noticed that the EDB-produced installer for Pg omits a number
> of components required to build things that're fully compatible with
> libpq if they also use some of the same libs as libpq, like libintl,
> openssl, etc.
>
> The specific case of interest to me is psqlODBC, which I've been doing
> some work on recently. I just realised that a crash I've been
> encountering is caused by linking to the OpenSSL binaries from
> http://slproweb.com/products/Win32OpenSSL.html when libpq is using its
> own different OpenSSL. libeay32.lib is not in the Pg binary distribution
> for Windows so it's not possible to link directly to the same
> libeay32.dll that libpq uses.
>
> Ideally, every .dll that's shipped should be accompanied by the
> corresponding .lib, so people compiling against PostgreSQL can use the
> same OpenSSL, libintl, etc that were used when compiling Pg. The headers
> for those libraries should really also be bundled, e.g. have an
> include\openssl dir.
>
> That might add a little weight to the installer package, but probably
> not much - and that's clearly not a huge concern given that it already
> includes some fat .pdb debug symbols. If trimming the installer is a
> concern, it'd be reasonable to split the .lib files, includes, and pdb
> files into a separate "PostgreSQL development" component.
>
> The biggest issue - the missing libintl.h - was fixed a while ago, so
> it's possible to compile simple programs against libpq and have them
> work properly. Now it's only an issue if your app also needs to use
> OpenSSL, gettext, etc its self.
>
> Thoughts?
>
> --
> Craig Ringer http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Sandeep Thakkar![](http://www.enterprisedb.com/sites/default/files/EDB-logo-4c.png)
Phone: +91.20.30589505
Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb
This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message.
Senior Software Engineer
![](http://www.enterprisedb.com/sites/default/files/EDB-logo-4c.png)
Phone: +91.20.30589505
Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb
This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message.
I think the point is that Craig is asking for the headers and import libraries for all deps, not just OpenSSL.
On Thu, Jul 3, 2014 at 9:35 AM, Sandeep Thakkar <sandeep.thakkar@enterprisedb.com> wrote:
Shouldn't be a big deal. Just a change in the installer file and the build script. Do we want to add all the OpenSSL header files? That must be around 75..--On Thu, Jul 3, 2014 at 1:24 PM, Dave Page <dpage@pgadmin.org> wrote:Sandeep, how much effort is it to do this?
On Thu, Jul 3, 2014 at 6:26 AM, Craig Ringer <craig@2ndquadrant.com> wrote:
> Hi
>
> I've just noticed that the EDB-produced installer for Pg omits a number
> of components required to build things that're fully compatible with
> libpq if they also use some of the same libs as libpq, like libintl,
> openssl, etc.
>
> The specific case of interest to me is psqlODBC, which I've been doing
> some work on recently. I just realised that a crash I've been
> encountering is caused by linking to the OpenSSL binaries from
> http://slproweb.com/products/Win32OpenSSL.html when libpq is using its
> own different OpenSSL. libeay32.lib is not in the Pg binary distribution
> for Windows so it's not possible to link directly to the same
> libeay32.dll that libpq uses.
>
> Ideally, every .dll that's shipped should be accompanied by the
> corresponding .lib, so people compiling against PostgreSQL can use the
> same OpenSSL, libintl, etc that were used when compiling Pg. The headers
> for those libraries should really also be bundled, e.g. have an
> include\openssl dir.
>
> That might add a little weight to the installer package, but probably
> not much - and that's clearly not a huge concern given that it already
> includes some fat .pdb debug symbols. If trimming the installer is a
> concern, it'd be reasonable to split the .lib files, includes, and pdb
> files into a separate "PostgreSQL development" component.
>
> The biggest issue - the missing libintl.h - was fixed a while ago, so
> it's possible to compile simple programs against libpq and have them
> work properly. Now it's only an issue if your app also needs to use
> OpenSSL, gettext, etc its self.
>
> Thoughts?
>
> --
> Craig Ringer http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL CompanySandeep ThakkarSenior Software Engineer
Phone: +91.20.30589505
Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb
This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message.
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Okay. For psqlODBC, the dependencies only include gettext and OpenSSL.
On Thu, Jul 3, 2014 at 2:08 PM, Dave Page <dpage@pgadmin.org> wrote:
I think the point is that Craig is asking for the headers and import libraries for all deps, not just OpenSSL.On Thu, Jul 3, 2014 at 9:35 AM, Sandeep Thakkar <sandeep.thakkar@enterprisedb.com> wrote:Shouldn't be a big deal. Just a change in the installer file and the build script. Do we want to add all the OpenSSL header files? That must be around 75..--On Thu, Jul 3, 2014 at 1:24 PM, Dave Page <dpage@pgadmin.org> wrote:Sandeep, how much effort is it to do this?
On Thu, Jul 3, 2014 at 6:26 AM, Craig Ringer <craig@2ndquadrant.com> wrote:
> Hi
>
> I've just noticed that the EDB-produced installer for Pg omits a number
> of components required to build things that're fully compatible with
> libpq if they also use some of the same libs as libpq, like libintl,
> openssl, etc.
>
> The specific case of interest to me is psqlODBC, which I've been doing
> some work on recently. I just realised that a crash I've been
> encountering is caused by linking to the OpenSSL binaries from
> http://slproweb.com/products/Win32OpenSSL.html when libpq is using its
> own different OpenSSL. libeay32.lib is not in the Pg binary distribution
> for Windows so it's not possible to link directly to the same
> libeay32.dll that libpq uses.
>
> Ideally, every .dll that's shipped should be accompanied by the
> corresponding .lib, so people compiling against PostgreSQL can use the
> same OpenSSL, libintl, etc that were used when compiling Pg. The headers
> for those libraries should really also be bundled, e.g. have an
> include\openssl dir.
>
> That might add a little weight to the installer package, but probably
> not much - and that's clearly not a huge concern given that it already
> includes some fat .pdb debug symbols. If trimming the installer is a
> concern, it'd be reasonable to split the .lib files, includes, and pdb
> files into a separate "PostgreSQL development" component.
>
> The biggest issue - the missing libintl.h - was fixed a while ago, so
> it's possible to compile simple programs against libpq and have them
> work properly. Now it's only an issue if your app also needs to use
> OpenSSL, gettext, etc its self.
>
> Thoughts?
>
> --
> Craig Ringer http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL CompanySandeep ThakkarSenior Software Engineer
Phone: +91.20.30589505
Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb
This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message.--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Sandeep Thakkar![](http://www.enterprisedb.com/sites/default/files/EDB-logo-4c.png)
Phone: +91.20.30589505
Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb
This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message.
Senior Software Engineer
![](http://www.enterprisedb.com/sites/default/files/EDB-logo-4c.png)
Phone: +91.20.30589505
Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb
This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message.
It shouldn't be an issue for psqlODBC itself as users of that link against the driver manager not the driver. I suspect what Craig is trying to do is build the driver against our server installation, which means he may need OpenSSL now, and other dependencies in the future (and don't forget we support platforms other than Windows).
On Thu, Jul 3, 2014 at 10:35 AM, Sandeep Thakkar <sandeep.thakkar@enterprisedb.com> wrote:
Okay. For psqlODBC, the dependencies only include gettext and OpenSSL.On Thu, Jul 3, 2014 at 2:08 PM, Dave Page <dpage@pgadmin.org> wrote:I think the point is that Craig is asking for the headers and import libraries for all deps, not just OpenSSL.On Thu, Jul 3, 2014 at 9:35 AM, Sandeep Thakkar <sandeep.thakkar@enterprisedb.com> wrote:Shouldn't be a big deal. Just a change in the installer file and the build script. Do we want to add all the OpenSSL header files? That must be around 75..--On Thu, Jul 3, 2014 at 1:24 PM, Dave Page <dpage@pgadmin.org> wrote:Sandeep, how much effort is it to do this?
On Thu, Jul 3, 2014 at 6:26 AM, Craig Ringer <craig@2ndquadrant.com> wrote:
> Hi
>
> I've just noticed that the EDB-produced installer for Pg omits a number
> of components required to build things that're fully compatible with
> libpq if they also use some of the same libs as libpq, like libintl,
> openssl, etc.
>
> The specific case of interest to me is psqlODBC, which I've been doing
> some work on recently. I just realised that a crash I've been
> encountering is caused by linking to the OpenSSL binaries from
> http://slproweb.com/products/Win32OpenSSL.html when libpq is using its
> own different OpenSSL. libeay32.lib is not in the Pg binary distribution
> for Windows so it's not possible to link directly to the same
> libeay32.dll that libpq uses.
>
> Ideally, every .dll that's shipped should be accompanied by the
> corresponding .lib, so people compiling against PostgreSQL can use the
> same OpenSSL, libintl, etc that were used when compiling Pg. The headers
> for those libraries should really also be bundled, e.g. have an
> include\openssl dir.
>
> That might add a little weight to the installer package, but probably
> not much - and that's clearly not a huge concern given that it already
> includes some fat .pdb debug symbols. If trimming the installer is a
> concern, it'd be reasonable to split the .lib files, includes, and pdb
> files into a separate "PostgreSQL development" component.
>
> The biggest issue - the missing libintl.h - was fixed a while ago, so
> it's possible to compile simple programs against libpq and have them
> work properly. Now it's only an issue if your app also needs to use
> OpenSSL, gettext, etc its self.
>
> Thoughts?
>
> --
> Craig Ringer http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL CompanySandeep ThakkarSenior Software Engineer
Phone: +91.20.30589505
Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb
This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message.--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company--Sandeep ThakkarSenior Software Engineer
Phone: +91.20.30589505
Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb
This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message.
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On 07/03/2014 05:41 PM, Dave Page wrote: > It shouldn't be an issue for psqlODBC itself as users of that link > against the driver manager not the driver. I suspect what Craig is > trying to do is build the driver against our server installation, which > means he may need OpenSSL now, and other dependencies in the future Exactly. It's not vital. After all, I can just build my own libpq + openssl + gettext etc. But I'd rather reduce divergence from the published psqlODBC drivers if possible, by bundling the "official" libpq Windows binaries. As psqlODBC must link directly to OpenSSL that won't work with how they're currently distributed - or not without possible issues due to OpenSSL library mismatches, anyway. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services