Skip site navigation (1) Skip section navigation (2)

Re: createdb - missing pq.dll after compile/install?

From: s0lao(at)netscape(dot)net (S(dot) L(dot))
To: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: createdb - missing pq.dll after compile/install?
Date: 2003-12-16 07:06:15
Message-ID: 7ED1B29B.53E22B20.00013D13@netscape.net (view raw or flat)
Thread:
Lists: pgsql-cygwin
Mike,

[...]
>I have a new minor problem.  When I compile/install PostgreSQL 7.4 from
>scratch, when run one of the scripts such as createdb.exe, I get a windows
[...]

AFAIK, createdb is a shell script. It should not have a ".exe" extension. 

[...]
>error message that the "pq.dll" could not be found, and that I should try
>reinstalling.  For fun, I tried reinstalling, and I still get the error.  If
>I copy the pq.dll (which really has been installed in /usr/lib) to the
>windows/system32 folder, it works.  I deleted the DLL, then tried installing
>the precompiled PostgreSQL from my cygwin download package, and it worked
>without asking for the pq.dll - I found that this time the dll had also been
>installed in /usr/bin.  Is this something I should just know to do after I
>compile/install, or is it something I'm missing in the source code or my
>configuration settings?
[...]

There are some predefined paths and techniques a unix-like environment is awaare of. Such a technique is using a system variable (LD_CONFIG_PATH) to specify the place where the dynamic libraries are to be found. I.e. I configure/install my "app" as "/usr/local/app" with dynamic libs in "/usr/local/app/lib" but to actually use it I must do a "LD_CONFIG_PATH=$LD_CONFIG_PATH:/usr/local/app/lib" and "ldconfig", so that dynamic linker be able to find my libraries.

Well, windows doesn't have such a feature and neither does its POSIX layer, cygwin. In their case, the problem solves either by placing the dll in a place that already exists in the PATH variable, or to add the place to the PATH variable (i.e., if your Postgresql dlls are in /usr/local/pgsql/lib, then you must do a "PATH=$PATH:/usr/local/pgsql/lib" before you start any application that needs them).

SLao

__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455

Responses

pgsql-cygwin by date

Next:From: Peter EisentrautDate: 2003-12-16 13:16:04
Subject: Re: FAQ_MSWIN patch: clarify instructions
Previous:From: Mike LeahyDate: 2003-12-15 21:51:08
Subject: createdb - missing pq.dll after compile/install?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group