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

createdb - missing pq.dll after compile/install?

From
"Mike Leahy"
Date:

All,

 

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 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?

 

Thanks,

Mike

 

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

From
s0lao@netscape.net (S. L.)
Date:
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
eitherby 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
youstart 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

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

From
Peter Eisentraut
Date:
Mike Leahy wrote:
> 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 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?

This is something that you should have seen had you read the
installation instructions. :)


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

From
Peter Eisentraut
Date:
S. L. wrote:
> AFAIK, createdb is a shell script.

Not anymore.


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

From
Jason Tishler
Date:
Mike Leahy wrote:
> 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?

No, I post-process PostgreSQL's "make install" to workaround this issue.
See CYGWIN-PATCHES/build.sh in the source tarball for the details, if
interested.

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6