Re: compiling libpq++ on Solaris with Sun SPRO6U2 (fixed - Mailing list pgsql-hackers

From Denis A Ustimenko
Subject Re: compiling libpq++ on Solaris with Sun SPRO6U2 (fixed
Date
Msg-id Pine.GSO.4.30.0110180946140.16154-100000@denis
Whole thread Raw
In response to Re: compiling libpq++ on Solaris with Sun SPRO6U2 (fixed  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers

On Wed, 17 Oct 2001, Peter Eisentraut wrote:

> Denis A Ustimenko writes:
>
> [change -Wl,-R to -R and -Wl,-h to -h]
>
> I'm having a difficult time understanding this.  Both -R and -h are linker
> options, not compiler options.  So while the compiler driver might be nice

Oh, no Peter:

denis@tracer$ CC -help|grep "\-h"
-h<name>              Assign <name> to generated dynamic shared library
-help                 Same as -xhelp=flags
denis@tracer$ CC -help|grep "\-R"
-R<p>[:<p>...]        Build runtime search path list into executable
denis@tracer$ cc -flags|grep "\-h"
-h <name>       Assign <name> to generated dynamic shared library
denis@tracer$ cc -flags|grep "\-R"
-R<dir[:dir]>   Build runtime search path list into executable

> enough to recognize them as the former and pass them through, this change
> just pushes these chances, and it doesn't add any theoretical change of
> functionality.
>
> So, if you want this to be fixed, you're going to have to start with
> explaining your problem, and then we can start looking for solutions.

The problem is simple. I can't compile libpq++.so with latest Sun's
compiler:
$ make
.........
CC  -KPIC -G -Wl,-h,libpq++.so.3 pgconnection.o pgdatabase.o pgtransdb.o
pgcursordb.o pglobject.o  -L../../../src/interfaces/libpq -lpq -lm -lc
-Wl,-R/usr/local/pgsql/lib -o libpq++.so.3.1
CC: Warning: Option -Wl,-h,libpq++.so.3 passed to ld, if ld is invoked,
ignored otherwise
CC: Warning: Option -Wl,-R/usr/local/pgsql/lib passed to ld, if ld is
invoked, ignored otherwise
/usr/ccs/bin/ld: illegal option -- W
/usr/ccs/bin/ld: illegal option -- W
usage: ld [-6:abc:d:e:f:h:il:mo:p:rstu:z:B:D:F:GI:L:M:N:P:Q:R:S:VY:?]
file(s)       [-64]           enforce a 64-bit link-edit
.........

But "CC  -KPIC -G -h libpq++.so.3 ... -R/usr/local/pgsql/lib ..."
works fine for me.

Regards
Denis Ustimenko



pgsql-hackers by date:

Previous
From: "Ron de Jong"
Date:
Subject: How do I get a list of DB's or Tables with a postgres SQL statement?
Next
From: "Andy Hallam"
Date:
Subject: ODBC SQLBindParameter and UNICODE strings