This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Compiling Postgresql 7.2.1 with gcc 3.1 on Solaris 8
- From: Randall Perry <rgp at systame dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Wed, 21 Aug 2002 09:54:30 -0400
- Subject: Compiling Postgresql 7.2.1 with gcc 3.1 on Solaris 8
With help from Peter Kurpis on this list I was able to build 7.2.1 and run
the postmaster and psql programs. (prior to this these programs were not
able to read LD_LIBRARY_PATH for libgcc_so.so.1).
Unfortunately, the createlang program (needed to enable Pl/PgSQL) isn't
getting LD_LIBRARY_PATH and gives the error:
# /usr/local/pgsql/bin/createlang plpgsql template1
ERROR: Load of file /usr/local/pgsql/lib/plpgsql.so failed: ld.so.1:
/usr/local/pgsql/bin/postmaster: fatal: libgcc_s.so.1: open failed: No such
file or directory
createlang: language installation failed
If anyone's had success building Pg 7.2.1 with this system please let me
know.
Below is Peter's post with changes that allowed postmaster and psql to find
libs:
> Yikes. I downloaded the postgres distribution, and tried configuring it
> on a couple of systems with different environments. I wasn't able to
> set things up properly with flags, and I'm not convinced the build system
> is healthy, after the unusual problems I had. :-( (For one thing,
> --without-gnu-ld and --with-gnu-ld=no didn't have the right effect:
> the build was still using -rpath instead of -R .)
>
> But here's what I suggest:
>
> Run configure --enable-syslog
>
> Afterward, in src/Makefile.port, which is the solaris-specific stuff,
> replace:
>
> ifeq ($(with_gnu_ld), yes)
> export_dynamic = -Wl,-E
> rpath = -Wl,-rpath,$(libdir)
> else
> rpath = -R$(libdir)
> endif
> shlib_symbolic = -Wl,-Bsymbolic
>
> with:
>
> rpath = -L/usr/local/pgsql/lib -L/usr/local/lib -L/usr/local/ssl/lib
> -L/usr/local/lib/sasl -Wl-R/usr/local/pgsql/lib -Wl,-R/usr/local/lib
> -Wl,-R/usr/local/ssl/lib -Wl-R/usr/local/lib/sasl
> shlib_symbolic = -Wl,-Bsymbolic
>
> In other words, hardwire what you want to accomplish, as a kludge. It's
> ugly, but I think it ought to work. Note that /usr/local/pgsql/lib seems to
> be a default install directory -- see libdir in src/Makefile.global .
> Since you are not using --libdir (or other similar ones) I think this
> ought to stay like this; this is the default situation.
>
> You can check things by running
>
> gmake -np | grep ^LINK
>
> The -n disables making any changes to the file system, -p causes printing
> of the internal definitions tables. This will tell you what the build
> looks like -- probably a standard build. Then do
>
> gmake -np | grep ^LDFLAGS
>
> and this ought to show you what you want to see.
>
> Let me know how it goes... If you still have problems, cut and past
> a line from the actual build, or perhaps you can send a log:
>
> gmake >& make.log
>
> so I can take a look at how (i.e. with which options) builds went.
>
--
Randy Perry
sysTame
Mac Consulting/Sales
http://www.systame.com/