Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

pgtcl dependent libraries

309 views
Skip to first unread message

anj patnaik

unread,
Sep 30, 2015, 1:54:52 PM9/30/15
to
Hello,

I am able to load pgtcl from a windows machine where the postgres db is installed, but I also need to load it from machines without local db installations.

I have downloaded the bin directory for postgres 9.4 installation and have my path pointing to the bin directory, but it still is unable to load.

Besides the dlls in the bin directory, what other dll/dependencies does pgtcl have?

I have the following files in my path:

07/25/2013 09:26 AM 144,768 intl.dll
07/10/2015 03:50 AM 1,154,048 libeay32.dll
09/28/2015 06:35 PM 1,008,128 libiconv.dll
07/13/2015 03:00 AM 141,312 libpq.dll
09/28/2015 06:35 PM 1,717,760 libxml2.dll
09/28/2015 06:35 PM 303,104 libxslt.dll
07/10/2015 03:50 AM 274,432 ssleay32.dll
09/28/2015 06:35 PM 125,440 wxbase28u_net_vc_custom.dll
09/28/2015 06:35 PM 1,197,056 wxbase28u_vc_custom.dll
09/28/2015 06:35 PM 124,928 wxbase28u_xml_vc_custom.dll
09/28/2015 06:35 PM 705,024 wxmsw28u_adv_vc_custom.dll
09/28/2015 06:35 PM 331,264 wxmsw28u_aui_vc_custom.dll
09/28/2015 06:36 PM 2,898,432 wxmsw28u_core_vc_custom.dll
09/28/2015 06:36 PM 485,888 wxmsw28u_html_vc_custom.dll
09/28/2015 06:36 PM 539,648 wxmsw28u_stc_vc_custom.dll
09/28/2015 06:36 PM 497,664 wxmsw28u_xrc_vc_custom.dll
09/28/2015 06:36 PM 68,608 zlib1.dll

The error is:

libpgtcl.dll": this library or a dependent library could not be found in library path

I also downloaded msvcpl120.dll to the machine, but regardless get that error.

Please advise. Thanks!

Bob Jolliffe

unread,
Sep 30, 2015, 5:51:44 PM9/30/15
to
Hi
This file should be part of your pgtcl installation. maybe you haven't installed the package correctly.

Bob

EL

unread,
Sep 30, 2015, 5:58:22 PM9/30/15
to
You could use a tool like strace to track the system and library calls, and find out which function/dll is the trouble maker. Then make sure that dll is installed... etc.
On windows there seem to be a few options to substitute strace ( I didnt try any of them ).

--
EL

anj patnaik

unread,
Sep 30, 2015, 6:06:13 PM9/30/15
to
I used dependency walker and got the same results on both machines. It complains (warning only) about libpq.dll even on the machine where it loads properly. Note that on one Windows machine, the package loads correctly. On the other machine it fails to load with error: libpgtcl.dll": this library or a dependent library could not be found in library path.

Both machines are on Windows 7 with 32-bit Tcl. On the machine where it fails, I don't have a local postgres installation, but downloaded the binaries and pointed my path to the location of the dlls.

Robert Heller

unread,
Sep 30, 2015, 8:24:57 PM9/30/15
to
At Wed, 30 Sep 2015 15:06:07 -0700 (PDT) anj patnaik <pat...@gmail.com> wrote:

>
> On Wednesday, September 30, 2015 at 5:58:22 PM UTC-4, EL wrote:
> > You could use a tool like strace to track the system and library calls, a=
> nd find out which function/dll is the trouble maker. Then make sure that dl=
> l is installed... etc.
> > On windows there seem to be a few options to substitute strace ( I didnt =
> try any of them ).
> >=20
> > --=20
> > EL
>
> I used dependency walker and got the same results on both machines. It comp=
> lains (warning only) about libpq.dll even on the machine where it loads pro=
> perly. Note that on one Windows machine, the package loads correctly. On th=
> e other machine it fails to load with error: libpgtcl.dll": this library or=
> a dependent library could not be found in library path.
>
> Both machines are on Windows 7 with 32-bit Tcl. On the machine where it fai=
> ls, I don't have a local postgres installation, but downloaded the binaries=
> and pointed my path to the location of the dlls.

Are the postgreSQL binaries 32-bit or 64-bit? If the Tcl exe is 32-bit and the
libpgtcl.dll is 32-bit, then the postgreSQL binaries (libraries, including
libpq.dll) *must* also be 32-bit. (It does not matter if you have a 32-bit or
64-bit version of Windows 7.) My understanding is that the libpgtcl.dll
available on the SorceForge site is 32-bit.

>

--
Robert Heller -- 978-544-6933
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
hel...@deepsoft.com -- Webhosting Services

lj

unread,
Sep 30, 2015, 8:55:37 PM9/30/15
to
The Sourceforge pgtclng Windows build (libpgtcl.dll) only requires
PostgreSQL libpq.dll, but that requires other libraries and things.

My advice is always to put the full EnterpriseDB PostgreSQL setup even
on client-only PCs. You do not have to use the installer, though - they
have a Zip download which contains the same files but does not run any
installer. This should work fine with client-only setups, as long as you also
have one external dependency: Microsoft Visual C++ Redistributables. You
need the right version of this for the version of PostgreSQL you are using.
(This was true with older versions of Windows - I'm not sure about 7/8/10.)

And, as others here have said, don't mix 32- and 64-bit binaries.

JonoK

unread,
Sep 30, 2015, 9:15:43 PM9/30/15
to
I went through this a number of years ago.

Here are all the DLLs I have in my libpgtcl directory - the not libpgtcl ones I lifted from a PC with the full prostgresql installation.

comerr32.dll
gssapi32.dll
iconv.dll
k5sprt32.dll
krb5_32.dll
libeay32.dll
libiconv2.dll
libintl3.dll
libpgtcl.dll
libpq.dll
ssleay32.dll

I have also used the pure TCL interface package and can report it works fine - a simple solution unless you have actual performance requirements.

Jon

anj patnaik

unread,
Sep 30, 2015, 9:27:52 PM9/30/15
to
lj, where are the MS visual C++ distributions that are required for PG 9.4? So it is not sufficient to download the zip files from Enterprise DB, right?


Jon, what version of PG are you using? You've extra files that I don't have. Where did you get them?

I am on PG version 9.4 (32 bit), Tcl (32 bit) and pgtcl (32 bit). Below are the list of DLLs that are in the bin directory of the zip file I downloaded:

07/25/2013 09:26 AM 144,768 intl.dll
07/10/2015 03:50 AM 1,154,048 libeay32.dll
09/28/2015 06:35 PM 1,008,128 libiconv.dll
07/13/2015 03:00 AM 141,312 libpq.dll
09/28/2015 06:35 PM 1,717,760 libxml2.dll
09/28/2015 06:35 PM 303,104 libxslt.dll
07/10/2015 03:50 AM 274,432 ssleay32.dll
09/28/2015 06:35 PM 125,440 wxbase28u_net_vc_custom.dll
09/28/2015 06:35 PM 1,197,056 wxbase28u_vc_custom.dll
09/28/2015 06:35 PM 124,928 wxbase28u_xml_vc_custom.dll
09/28/2015 06:35 PM 705,024 wxmsw28u_adv_vc_custom.dll
09/28/2015 06:35 PM 331,264 wxmsw28u_aui_vc_custom.dll
09/28/2015 06:36 PM 2,898,432 wxmsw28u_core_vc_custom.dll
09/28/2015 06:36 PM 485,888 wxmsw28u_html_vc_custom.dll
09/28/2015 06:36 PM 539,648 wxmsw28u_stc_vc_custom.dll
09/28/2015 06:36 PM 497,664 wxmsw28u_xrc_vc_custom.dll
09/28/2015 06:36 PM 68,608 zlib1.dll

Just note that pgtcl loads fine from one W7 machine with a full installation of PG 9.4. in the other machine, I grabbed the zip files from EB and point to the bin directory, but the load fails.

Jon, I have performance requirements so I need the pgtcl to work.

Thanks.

Ralf Fassel

unread,
Oct 1, 2015, 4:08:07 AM10/1/15
to
* anj patnaik <pat...@gmail.com>
| I am able to load pgtcl from a windows machine where the postgres db
| is installed, but I also need to load it from machines without local
| db installations.
>
| I have downloaded the bin directory for postgres 9.4 installation and
| have my path pointing to the bin directory, but it still is unable to
| load.
--<snip-snip>--
| The error is:
>
| libpgtcl.dll": this library or a dependent library could not be found
| in library path
>
| I also downloaded msvcpl120.dll to the machine, but regardless get
| that error.

What do you mean by "downloaded some dll"? Just copied it from some dll
from some other computer, or used some 'official' redistribution?
With "just copying" you usually need to know exactly what you're doing...

A quick google for "postgressql redistributable" landed me on

http://www.postgresql.org/download/windows/

where they offer amongst others

Advanced users can also download a zip archive of the binaries, without
the installer. This is not recommended for normal installations, it is
intended for users who wish to include PostgreSQL as part of another
application installer.

Usually this is what you want to include with your app if you don't want
the full postgres installation.

MS-redistributables are found using the same approach (google "Microsoft
Visual C++ 2010 Redistributable"), or maybe they are already included in
the Postgres redist.

HTH
R'

Eric

unread,
Oct 1, 2015, 8:21:29 AM10/1/15
to
Hi,

I also use Pgtcl 2.1.1 successfully under W7 32bits with the following set of DLL grabbed from postgres 9.3.5:

1 158 144 libeay32.dll
919 040 libiconv.dll
163 292 libintl.dll
138 752 libpq.dll
270 848 ssleay32.dll

All the DLL are located in the same directory of the my custom tclkit executable, with also msvcr100.dll needed on W7 without MSVC redistributables installed.

Eric

anje...@freedomarc.org

unread,
Oct 1, 2015, 12:09:08 PM10/1/15
to
I downloaded binaries from this site below:
http://www.enterprisedb.com/products-services-training/pgbindownload

I used the Win x86-32 link in the above.

I did not download the MSVC redist but I suspect that might be the issue. There are no clues in the error message.

I've been trying to find out which MSVC redist version is required with PG 9.4. I know in the PC where I have a full database running I have the msvcp120.dll files which point to MSVC 2013.

Thanks.

lj

unread,
Oct 3, 2015, 10:07:05 PM10/3/15
to
anje...@freedomarc.org wrote:
>...
> I downloaded binaries from this site below:
> http://www.enterprisedb.com/products-services-training/pgbindownload
>
> I used the Win x86-32 link in the above.
>
> I did not download the MSVC redist but I suspect that might be the issue. There are no clues in the error message.
>
> I've been trying to find out which MSVC redist version is required with PG 9.4. I know in the PC where I have a full database running I have the msvcp120.dll files which point to MSVC 2013.

One reason for installing the whole EnterpriseDB PostgreSQL, even for
client-only systems, is that you can test it before moving on. If you can
run psql.exe from EnterpriseDB, you know you have the DLLs and dependencies
in place. Using psql.exe is also a good way to confirm the connection from
your client to your server works. A lot can go wrong before that point, so
it's good to get this working before moving on to Tcl.

(I know people are telling you to just copy certain DLLs here and there...
it's great that they can make that work, but I would never suggest that
approach to anyone.)

For EnterpriseDB PostgreSQL, you can use their installer, or you can
install just the binary "zip" package (which is linked from postgresql.org
under download, Windows). The "zip" download requires Microsoft Visual C++
/ Visual Studio runtime, which your system may or may not already have.

If you get an error when trying psql.exe saying you are missing
MSVCR*.dll then you need to go to Microsoft's download center and get the
appropriate Visual C++ Runtime redistributables.

For EnterpriseDB PostgreSQL-9.2.x and 9.3.x you need Visual C++ 2010 Runtime
(MSVCR100).

For EnterpriseDB PostgreSQL-9.4.x, you need Visual Studio 2013 Runtime
(MSVCR120).

anj patnaik

unread,
Oct 4, 2015, 8:53:42 PM10/4/15
to
Yes, with a full PG installation of the database, pgtcl always loads correctly. However, I want to run my Tcl application on different users's machines without instantiating a database on their PCs since the DB actually has its own server machine.

Would you be able to tell me the specific MS dlls that are needed by libpq.dll ? Is it only msvcr120 or are there others?

If I knew the specific MS DLLs then I would put those in the same folder as the libpg tcl dll and be done with it.

Thanks.

lj

unread,
Oct 4, 2015, 9:18:55 PM10/4/15
to
anj patnaik wrote:
> Yes, with a full PG installation of the database, pgtcl always loads
> correctly. However, I want to run my Tcl application on different users's
> machines without instantiating a database on their PCs since the DB
> actually has its own server machine.
>
> Would you be able to tell me the specific MS dlls that are needed by
> libpq.dll ? Is it only msvcr120 or are there others?
>
> If I knew the specific MS DLLs then I would put those in the same folder as
> the libpg tcl dll and be done with it.

No, I can't, I don't know exactly. You could try using Dependency Walker
but I've had mixed results from that. (Sometimes it reports missing things
that are not errors.) And honestly I don't care to find the minimal
set of DLLs it needs. I just want it to work. And I think it is a really
bad idea to be copying MS DLLs around. For one thing, if you do that, they
will not get security updates.

You do not need to 'instantiate a database' on a PC that will have only
client access. You install (or copy) EnterpriseDB PostgreSQL and maybe
install the MS VC/VS redistributable package if necessary, and it works.
You need not run any server processes on the client system, and there are no
registry modifications from EnterpriseDB PostgreSQL (if installed with the
Zip file). If disk space is a problem, you can delete some extra parts of
EnterpriseDB PostgreSQL from the client systems, such as the StackBuilder,
symbols, pgAdminIII, and doc folders. That takes about 100MB off.

0 new messages