Thread: 9.2 beta1 libxml2 can't be loaded on Windows

9.2 beta1 libxml2 can't be loaded on Windows

From
Edmund Horner
Date:
Hello, apologies if this is already in your radar.

I can successfully install the PostgreSQL 9.2 beta1 binaries on
Windows XP and successfully perform most queries.  However I've run
into some trouble with the XML support.

From a very cursory search I did not see anything changed since 9.1.3
that could affect this, so maybe it's just a build/packaging issue.

Cheers,
Edmund.



Version and environment:

PostgreSQL 9.2 beta1, binaries-only package
Windows XP SP3 32 bit

Steps:

  1. Install binaries.
  2. Start server.
  3. Open psql session to postgres database.
  4. Run query:  SELECT xml '<foo>bar</foo>';

Expected result:  query returns a single row like:

           xml
    ----------------
     <foo>bar</foo>

Actual result:

    postgres=# SELECT xml '<foo>bar</foo>';
    ERROR:  could not set up XML error handler
    LINE 1: select xml '<foo>bar</foo>';
                       ^
    HINT:  This probably indicates that the version of libxml2 being
used is not compatible with the
     libxml2 header files that PostgreSQL was built with.

postgres.exe does find and read part of libxml2.dll both at initial
server startup, and when psql connects for the first time.

Re: 9.2 beta1 libxml2 can't be loaded on Windows

From
Edmund Horner
Date:
On 31 May 2012 14:14, Edmund Horner <ejrh00@gmail.com> wrote:
> Hello, apologies if this is already in your radar.
>
> I can successfully install the PostgreSQL 9.2 beta1 binaries on
> Windows XP and successfully perform most queries. =A0However I've run
> into some trouble with the XML support.
>
> From a very cursory search I did not see anything changed since 9.1.3
> that could affect this, so maybe it's just a build/packaging issue.
>
> Cheers,
> Edmund.
>
>
>
> Version and environment:
>
> PostgreSQL 9.2 beta1, binaries-only package
> Windows XP SP3 32 bit
>
> Steps:
>
> =A01. Install binaries.
> =A02. Start server.
> =A03. Open psql session to postgres database.
> =A04. Run query: =A0SELECT xml '<foo>bar</foo>';
>
> Expected result: =A0query returns a single row like:
>
> =A0 =A0 =A0 =A0 =A0 xml
> =A0 =A0----------------
> =A0 =A0 <foo>bar</foo>
>
> Actual result:
>
> =A0 =A0postgres=3D# SELECT xml '<foo>bar</foo>';
> =A0 =A0ERROR: =A0could not set up XML error handler
> =A0 =A0LINE 1: select xml '<foo>bar</foo>';
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ^
> =A0 =A0HINT: =A0This probably indicates that the version of libxml2 being
> used is not compatible with the
> =A0 =A0 libxml2 header files that PostgreSQL was built with.
>
> postgres.exe does find and read part of libxml2.dll both at initial
> server startup, and when psql connects for the first time.

I tried using an older libxml2.dll.  Replace with the one from
ftp://ftp.zlatkovic.com/libxml/oldreleases/libxml2-2.6.9.win32.zip
(and copying zlib1.dll to zlib.dll), and it works.

I note that the previous 9.1.3 binaries used the newer libxml2.dll
though (same as the one in
ftp://ftp.zlatkovic.com/libxml/libxml2-2.7.8.win32.zip).

So I'm guessing the Windows PostgreSQL binaries were built with the
old one, but packaged with the new one.

Re: 9.2 beta1 libxml2 can't be loaded on Windows

From
Edmund Horner
Date:
On 1 June 2012 12:14, Edmund Horner <ejrh00@gmail.com> wrote:
> I tried using an older libxml2.dll. =A0Replace with the one from
> ftp://ftp.zlatkovic.com/libxml/oldreleases/libxml2-2.6.9.win32.zip
> (and copying zlib1.dll to zlib.dll), and it works.
>
> I note that the previous 9.1.3 binaries used the newer libxml2.dll
> though (same as the one in
> ftp://ftp.zlatkovic.com/libxml/libxml2-2.7.8.win32.zip).
>
> So I'm guessing the Windows PostgreSQL binaries were built with the
> old one, but packaged with the new one.


Also, if libxml2.dll is replaced with the 2.6 version as above,
"CREATE EXTENSION xml2" will result in this:

    ERROR:  could not load library "C:/ehorner/pgsql/lib/pgxml.dll":
The specified procedure could not be found.

Which may imply that that DLL was built with the 2.7 version.  With
the 2.7 version in place as originally packaged, we have can load the
extension but not use the functions from it.

    postgres=3D# create extension xml2;
    CREATE EXTENSION

    postgres=3D# select xslt_process('<foo/>', '<bar/>');
    ERROR:  could not set up XML error handler
    HINT:  This probably indicates that the version of libxml2 being
used is not compatible with the
     libxml2 header files that PostgreSQL was built with.

I wanted to check whether the packaged libxslt.dll had the same
compatibility situation as libxml2.dll does.  Unfortunately it seems
doing so means using both versions of the library at once!

Edmund.

Re: 9.2 beta1 libxml2 can't be loaded on Windows

From
Edmund Horner
Date:
On 1 June 2012 12:36, Edmund Horner <ejrh00@gmail.com> wrote:
> On 1 June 2012 12:14, Edmund Horner <ejrh00@gmail.com> wrote:
>> I tried using an older libxml2.dll. =A0Replace with the one from
>> ftp://ftp.zlatkovic.com/libxml/oldreleases/libxml2-2.6.9.win32.zip
>> (and copying zlib1.dll to zlib.dll), and it works.
>>
>> I note that the previous 9.1.3 binaries used the newer libxml2.dll
>> though (same as the one in
>> ftp://ftp.zlatkovic.com/libxml/libxml2-2.7.8.win32.zip).
>>
>> So I'm guessing the Windows PostgreSQL binaries were built with the
>> old one, but packaged with the new one.
>
>
> Also, if libxml2.dll is replaced with the 2.6 version as above,
> "CREATE EXTENSION xml2" will result in this:
>
> =A0 =A0ERROR: =A0could not load library "C:/ehorner/pgsql/lib/pgxml.dll":
> The specified procedure could not be found.
>
> Which may imply that that DLL was built with the 2.7 version. =A0With
> the 2.7 version in place as originally packaged, we have can load the
> extension but not use the functions from it.
>
> =A0 =A0postgres=3D# create extension xml2;
> =A0 =A0CREATE EXTENSION
>
> =A0 =A0postgres=3D# select xslt_process('<foo/>', '<bar/>');
> =A0 =A0ERROR: =A0could not set up XML error handler
> =A0 =A0HINT: =A0This probably indicates that the version of libxml2 being
> used is not compatible with the
> =A0 =A0 libxml2 header files that PostgreSQL was built with.
>
> I wanted to check whether the packaged libxslt.dll had the same
> compatibility situation as libxml2.dll does. =A0Unfortunately it seems
> doing so means using both versions of the library at once!
>
> Edmund.

Argh, I forget to mention the packaged pgadmin3.exe (in the same bin
dir as postgres) wants the 2.7 version of the DLL (as packaged).

Edmund.

Re: 9.2 beta1 libxml2 can't be loaded on Windows

From
Dave Page
Date:
On Fri, Jun 1, 2012 at 1:39 AM, Edmund Horner <ejrh00@gmail.com> wrote:
> On 1 June 2012 12:36, Edmund Horner <ejrh00@gmail.com> wrote:
>> On 1 June 2012 12:14, Edmund Horner <ejrh00@gmail.com> wrote:
>>> I tried using an older libxml2.dll. =A0Replace with the one from
>>> ftp://ftp.zlatkovic.com/libxml/oldreleases/libxml2-2.6.9.win32.zip
>>> (and copying zlib1.dll to zlib.dll), and it works.
>>>
>>> I note that the previous 9.1.3 binaries used the newer libxml2.dll
>>> though (same as the one in
>>> ftp://ftp.zlatkovic.com/libxml/libxml2-2.7.8.win32.zip).
>>>
>>> So I'm guessing the Windows PostgreSQL binaries were built with the
>>> old one, but packaged with the new one.
>>
>>
>> Also, if libxml2.dll is replaced with the 2.6 version as above,
>> "CREATE EXTENSION xml2" will result in this:
>>
>> =A0 =A0ERROR: =A0could not load library "C:/ehorner/pgsql/lib/pgxml.dll":
>> The specified procedure could not be found.
>>
>> Which may imply that that DLL was built with the 2.7 version. =A0With
>> the 2.7 version in place as originally packaged, we have can load the
>> extension but not use the functions from it.
>>
>> =A0 =A0postgres=3D# create extension xml2;
>> =A0 =A0CREATE EXTENSION
>>
>> =A0 =A0postgres=3D# select xslt_process('<foo/>', '<bar/>');
>> =A0 =A0ERROR: =A0could not set up XML error handler
>> =A0 =A0HINT: =A0This probably indicates that the version of libxml2 being
>> used is not compatible with the
>> =A0 =A0 libxml2 header files that PostgreSQL was built with.
>>
>> I wanted to check whether the packaged libxslt.dll had the same
>> compatibility situation as libxml2.dll does. =A0Unfortunately it seems
>> doing so means using both versions of the library at once!
>>
>> Edmund.
>
> Argh, I forget to mention the packaged pgadmin3.exe (in the same bin
> dir as postgres) wants the 2.7 version of the DLL (as packaged).

Hi

Please test 9.2 beta 2 - that's the first build to come from the new
build machine that'll be used for this release. It's got a new set of
dependencies which should all work correctly.

--=20
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: 9.2 beta1 libxml2 can't be loaded on Windows

From
Edmund Horner
Date:
On 9 June 2012 03:48, Dave Page <dpage@pgadmin.org> wrote:
> On Fri, Jun 1, 2012 at 1:39 AM, Edmund Horner <ejrh00@gmail.com> wrote:
>> On 1 June 2012 12:36, Edmund Horner <ejrh00@gmail.com> wrote:
>>> On 1 June 2012 12:14, Edmund Horner <ejrh00@gmail.com> wrote:
>>>> I tried using an older libxml2.dll. =A0Replace with the one from
>>>> ftp://ftp.zlatkovic.com/libxml/oldreleases/libxml2-2.6.9.win32.zip
>>>> (and copying zlib1.dll to zlib.dll), and it works.
>>>>
>>>> ...
>
> Please test 9.2 beta 2 - that's the first build to come from the new
> build machine that'll be used for this release. It's got a new set of
> dependencies which should all work correctly.

Hi Dave,

I've tried with the EnterpriseDB.com Windows 32-bit 9.2 beta2
installer found via his page:
http://www.postgresql.org/download/snapshots/

Previously I was testing with the plain binaries zip, but those don't
seem to be available for beta2 yet.

The problem still occurs.  Again, I can work past it by copying in an
old version of libxml2.dll and zlib.dll.

Edmund.

Re: 9.2 beta1 libxml2 can't be loaded on Windows

From
Dave Page
Date:
Sachin, please investigate ASAP.

Thanks.

On Mon, Jun 11, 2012 at 6:30 AM, Edmund Horner <ejrh00@gmail.com> wrote:
> On 9 June 2012 03:48, Dave Page <dpage@pgadmin.org> wrote:
>> On Fri, Jun 1, 2012 at 1:39 AM, Edmund Horner <ejrh00@gmail.com> wrote:
>>> On 1 June 2012 12:36, Edmund Horner <ejrh00@gmail.com> wrote:
>>>> On 1 June 2012 12:14, Edmund Horner <ejrh00@gmail.com> wrote:
>>>>> I tried using an older libxml2.dll. =A0Replace with the one from
>>>>> ftp://ftp.zlatkovic.com/libxml/oldreleases/libxml2-2.6.9.win32.zip
>>>>> (and copying zlib1.dll to zlib.dll), and it works.
>>>>>
>>>>> ...
>>
>> Please test 9.2 beta 2 - that's the first build to come from the new
>> build machine that'll be used for this release. It's got a new set of
>> dependencies which should all work correctly.
>
> Hi Dave,
>
> I've tried with the EnterpriseDB.com Windows 32-bit 9.2 beta2
> installer found via his page:
> http://www.postgresql.org/download/snapshots/
>
> Previously I was testing with the plain binaries zip, but those don't
> seem to be available for beta2 yet.
>
> The problem still occurs. =A0Again, I can work past it by copying in an
> old version of libxml2.dll and zlib.dll.
>
> Edmund.



--=20
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company