Thread: 08.04.0100: Couldn't load libpq library

08.04.0100: Couldn't load libpq library

From
"Andrus"
Date:
After installing 8.4.1 (or 8.3.4 ) from msi in Windows  XP ,  ODBC driver
cannot used anymore:

Error

Couldn't load libpq library

occurs.

 8.4 libpq.dll and msvcr71.dll are present in psqlODBC  subdirectory.

08.02.0400 driver works OK.

I have sslmode=allow in init string but connection to server is not crypted.
If I install PostgreSql 8.4 server to client computer, problem is gone but
it is not reasonable to install server in every client maschine.

How to fix this ?

Andrus.


Re: 08.04.0100: Couldn't load libpq library

From
Hiroshi Inoue
Date:
Andrus wrote:
> After installing 8.4.1 (or 8.3.4 ) from msi in Windows  XP ,  ODBC driver
> cannot used anymore:
>
> Error
>
> Couldn't load libpq library
>
> occurs.
>
> 8.4 libpq.dll and msvcr71.dll are present in psqlODBC  subdirectory.
>
> 08.02.0400 driver works OK.
>
> I have sslmode=allow in init string but connection to server is not
> crypted.
> If I install PostgreSql 8.4 server to client computer, problem is gone but
> it is not reasonable to install server in every client maschine.
>
> How to fix this ?

Maybe MSVC2005 redistributable package is needed.
Please try

http://www.microsoft.com/downloads/details.aspx?familyid=200b2fd9-ae1a-4a14-984d-389c36f85647&displaylang=en
.

regards,
Hiroshi Inoue

Re: 08.04.0100: Couldn't load libpq library

From
"Andrus"
Date:
Hiroshi,

thank you.
I noticed that libpq.dll contains reference to msvcr80.dll

Package
http://www.microsoft.com/downloads/details.aspx?familyid=200b2fd9-ae1a-4a14-984d-389c36f85647&displaylang=en
is for vs2005 and does not contain this file.
How to  add all required files to odbc msi installation package so it does
not require additional dependencies in windows ?

Andrus.

----- Original Message -----
From: "Hiroshi Inoue" <inoue@tpf.co.jp>
To: "Andrus" <kobruleht2@hot.ee>
Cc: <pgsql-odbc@postgresql.org>
Sent: Friday, September 04, 2009 3:34 PM
Subject: Re: [ODBC] 08.04.0100: Couldn't load libpq library


> Andrus wrote:
>> After installing 8.4.1 (or 8.3.4 ) from msi in Windows  XP ,  ODBC driver
>> cannot used anymore:
>>
>> Error
>>
>> Couldn't load libpq library
>>
>> occurs.
>>
>> 8.4 libpq.dll and msvcr71.dll are present in psqlODBC  subdirectory.
>>
>> 08.02.0400 driver works OK.
>>
>> I have sslmode=allow in init string but connection to server is not
>> crypted.
>> If I install PostgreSql 8.4 server to client computer, problem is gone
>> but
>> it is not reasonable to install server in every client maschine.
>>
>> How to fix this ?
>
> Maybe MSVC2005 redistributable package is needed.
> Please try
>
> http://www.microsoft.com/downloads/details.aspx?familyid=200b2fd9-ae1a-4a14-984d-389c36f85647&displaylang=en
> .
>
> regards,
> Hiroshi Inoue


Re: 08.04.0100: Couldn't load libpq library

From
"Andrus"
Date:
Hiroshi,

> Maybe MSVC2005 redistributable package is needed.
> Please try
>
> http://www.microsoft.com/downloads/details.aspx?familyid=200b2fd9-ae1a-4a14-984d-389c36f85647&displaylang=en

I researched this issue in Windows 98 computer:

1. Installing VS2005 VC++ redistributable from
http://www.microsoft.com/downloads/details.aspx?familyid=200b2fd9-ae1a-4a14-984d-389c36f85647&displaylang=en
does not fix it.
2. Installation of VS2008 VC++ SP1 redistributable does not start: shutdown
installer action complains about missing entry point in WinNT dll
3. Copying manually msvcrt80.dll into odbc and application directories does
not fix it.

I used filemon to trace this issue:

Directory C:\PROGRAM FILES\PSQLODBC\0803\BIN\LIBPQ.DLL SUCCESS QUERY
Open C:\PROGRAM FILES\PSQLODBC\0803\BIN\LIBPQ.DLL SUCCESS OPENEXISTING
READONLY DENYWRITE
Read C:\PROGRAM FILES\PSQLODBC\0803\BIN\LIBPQ.DLL SUCCESS Offset: 0 Length:
64
Seek C:\PROGRAM FILES\PSQLODBC\0803\BIN\LIBPQ.DLL SUCCESS Beginning Offset:
272 / New offset: 272
Read C:\PROGRAM FILES\PSQLODBC\0803\BIN\LIBPQ.DLL SUCCESS Offset: 272
Length: 248
Seek C:\PROGRAM FILES\PSQLODBC\0803\BIN\LIBPQ.DLL SUCCESS Beginning Offset:
272 / New offset: 272
Read C:\PROGRAM FILES\PSQLODBC\0803\BIN\LIBPQ.DLL SUCCESS Offset: 272
Length: 488
Directory C:\PROGRAM FILES\PSQLODBC\0803\BIN\LIBPQ.DLL SUCCESS QUERY
Read C:\PROGRAM FILES\PSQLODBC\0803\BIN\LIBPQ.DLL SUCCESS Offset: 159744
Length: 4096
....
Read C:\PROGRAM FILES\PSQLODBC\0803\BIN\LIBPQ.DLL SUCCESS Offset: 151552
Length: 2048
Attributes C:\PROGRAM FILES\PSQLODBC\0803\BIN\MSVCR80.DLL SUCCESS
GetAttributes
Directory C:\PROGRAM FILES\PSQLODBC\0803\BIN\MSVCR80.DLL SUCCESS QUERY
Open C:\PROGRAM FILES\PSQLODBC\0803\BIN\MSVCR80.DLL SUCCESS OPENEXISTING
READONLY DENYWRITE
Directory C:\PROGRAM FILES\PSQLODBC\0803\BIN\MSVCR80.DLL SUCCESS QUERY
Close C:\PROGRAM FILES\PSQLODBC\0803\BIN\MSVCR80.DLL SUCCESS CLOSE_FINAL
Close C:\WINDOWS\SYSTEM\WLDAP32.DLL SUCCESS CLOSE_FINAL
Close C:\PROGRAM FILES\PSQLODBC\0803\BIN\GSSAPI32.DLL SUCCESS CLOSE_FINAL
Close C:\PROGRAM FILES\PSQLODBC\0803\BIN\K5SPRT32.DLL SUCCESS CLOSE_FINAL
Close C:\PROGRAM FILES\PSQLODBC\0803\BIN\COMERR32.DLL SUCCESS CLOSE_FINAL
Close C:\PROGRAM FILES\PSQLODBC\0803\BIN\KRB5_32.DLL SUCCESS CLOSE_FINAL
Close C:\PROGRAM FILES\PSQLODBC\0803\BIN\LIBICONV2.DLL SUCCESS CLOSE_FINAL
Close C:\PROGRAM FILES\PSQLODBC\0803\BIN\LIBINTL3.DLL SUCCESS CLOSE_FINAL
Close C:\PROGRAM FILES\PSQLODBC\0803\BIN\LIBEAY32.DLL SUCCESS CLOSE_FINAL
Close C:\PROGRAM FILES\PSQLODBC\0803\BIN\SSLEAY32.DLL SUCCESS CLOSE_FINAL
Close C:\PROGRAM FILES\PSQLODBC\0803\BIN\LIBPQ.DLL SUCCESS CLOSE_FINAL
Attributes C:\MYAPPL\ALGUS\LIBPQ.DLL NOTFOUND GetAttributes
Attributes C:\WINDOWS\SYSTEM\LIBPQ.DLL NOTFOUND GetAttributes
Attributes C:\WINDOWS\LIBPQ.DLL NOTFOUND GetAttributes
Attributes C:\WINDOWS\LIBPQ.DLL NOTFOUND GetAttributes
Attributes C:\WINDOWS\COMMAND\LIBPQ.DLL NOTFOUND GetAttributes
Attributes C:\WINDOWS\SYSTEM32\LIBPQ.DLL NOTFOUND GetAttributes
Attributes C:\MYAPPL\ALGUS SUCCESS GetAttributes
Attributes C:\WINDOWS\MEDIA\CHORD.WAV SUCCESS GetAttributes
Open C:\WINDOWS\MEDIA\CHORD.WAV SUCCESS OPENEXISTING READONLY DENYNONE
...

Maybe for some strange reason after initial reading and closing, LIBPQ.DLL
lookup does  not look into 0803\BIN directory.


If SSLMODE=Allow is removed from connection string, it works.

How to use SSL connections is Windows 98 ?

Andrus.


Re: 08.04.0100: Couldn't load libpq library

From
"Andrus"
Date:
> Maybe MSVC2005 redistributable package is needed.
> Please try
>
> http://www.microsoft.com/downloads/details.aspx?familyid=200b2fd9-ae1a-4a14-984d-389c36f85647&displaylang=en

I installed this in XP Home. Problem persists.
I installed also VS2008 C++ redistributable from link bottom of this page
but problem persists.

Any idea how to use SSL without installing full PostgreSQL server to client
computer ?

Andrus.


Re: 08.04.0100: Couldn't load libpq library

From
"Andrus"
Date:
>> Maybe MSVC2005 redistributable package is needed.
>> Please try
>>
>> http://www.microsoft.com/downloads/details.aspx?familyid=200b2fd9-ae1a-4a14-984d-389c36f85647&displaylang=en
>
> I installed this in XP Home. Problem persists.

I'm sorry I was wrong. This fixes the problem in XP Home.

Andrus.