Thread: Building pgeasy on HP-UX

Building pgeasy on HP-UX

From
"Ed L."
Date:
Anyone know how to properly build pgeasy on HP-UX?  It used to build
seamlessly as part of pgsql.  The build doc is pretty sparse.


# gmake
...
cc libpgeasy.o halt.o -L/opt/pgsql/installs/postgresql-7.3.2/lib -lpq -fpic
-shared -Wl,-x,-soname,libpgeasy.so.3
-Wl,-rpath,/opt/pgsql/installs/postgresql-7.3.2/lib -o libpgeasy.so.3.0
cc: warning 422: Unknown option "f" ignored.
cc: warning 422: Unknown option "i" ignored.
cc: warning 422: Unknown option "h" ignored.
cc: warning 422: Unknown option "a" ignored.
cc: warning 401: "-s" defeats the purpose of "-p"; "-s" ignored.
# gmake install
install libpgeasy.so.3.0 /opt/pgsql/installs/postgresql-7.3.2/lib
install: libpgeasy.so.3.0 was not found anywhere!
gmake: *** [install] Error 2


Re: Building pgeasy on HP-UX

From
Bruce Momjian
Date:
I think you have to use the flags used to compile an ordinary library,
or use the flags used to build libpq.  My guess is that cc doesn't
understand -fpic in this situation.

When pgeasy was part of the main distribution, you had configure finding
the proper flags, but now, each interface is on its own.

---------------------------------------------------------------------------

Ed L. wrote:
> Anyone know how to properly build pgeasy on HP-UX?  It used to build
> seamlessly as part of pgsql.  The build doc is pretty sparse.
>
>
> # gmake
> ...
> cc libpgeasy.o halt.o -L/opt/pgsql/installs/postgresql-7.3.2/lib -lpq -fpic
> -shared -Wl,-x,-soname,libpgeasy.so.3
> -Wl,-rpath,/opt/pgsql/installs/postgresql-7.3.2/lib -o libpgeasy.so.3.0
> cc: warning 422: Unknown option "f" ignored.
> cc: warning 422: Unknown option "i" ignored.
> cc: warning 422: Unknown option "h" ignored.
> cc: warning 422: Unknown option "a" ignored.
> cc: warning 401: "-s" defeats the purpose of "-p"; "-s" ignored.
> # gmake install
> install libpgeasy.so.3.0 /opt/pgsql/installs/postgresql-7.3.2/lib
> install: libpgeasy.so.3.0 was not found anywhere!
> gmake: *** [install] Error 2
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: Building pgeasy on HP-UX

From
Tom Lane
Date:
"Ed L." <pgsql@bluepolka.net> writes:
> Anyone know how to properly build pgeasy on HP-UX?  It used to build
> seamlessly as part of pgsql.  The build doc is pretty sparse.

> cc libpgeasy.o halt.o -L/opt/pgsql/installs/postgresql-7.3.2/lib -lpq -fpic
> -shared -Wl,-x,-soname,libpgeasy.so.3
> -Wl,-rpath,/opt/pgsql/installs/postgresql-7.3.2/lib -o libpgeasy.so.3.0
> cc: warning 422: Unknown option "f" ignored.

HP's cc does not use the same argument switches as gcc.  -fpic and
-shared are definitely gcc-isms, and I think the -Wl stuff may be too.
Furthermore ".so" is not the way it's spelled in HPUX.

In short, you've got a gcc-only makefile there.  If you have gcc
installed, the path of least resistance would be to use it not cc.
Otherwise you need to re-educate the makefile.

            regards, tom lane