Re: Bug #706: Wrong shlib flag for GCC compilation on Solaris - Mailing list pgsql-bugs

From Richard Cook x261
Subject Re: Bug #706: Wrong shlib flag for GCC compilation on Solaris
Date
Msg-id Pine.LNX.4.21.0207100949060.32726-100000@sprime.statsci.com
Whole thread Raw
In response to Re: Bug #706: Wrong shlib flag for GCC compilation on Solaris  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-bugs
Bruce,

My apologies.  The file I worked with was from the postgresql-7.1.3.tar.gz.
I had started out with the latest (7.2.1) tar, but after various failures
rolled back to the 7.1.3 source, since I found evidence on the net that
somebody had succeeded in building that on Solaris.  I lost track of that
change in source over the holiday weekend.  It looks like 7.2.1 has it
right.

Even so, I have not yet fully succeeded in building with the 7.2.1 source.
Using GCC, I got a running postgres, but failed to get pgaccess to work.  I
think that may be due to a corrupt libssl.so, but have not gone back to
verify this.  Using Sun tools, the compilation succeeded, but I got a
WriteControlFile failure (File exists) when running "make check", which I
never could diagnose.

So now I have a fully working 7.1.3 build, and I am tempted to leave well
enough alone.  Are the changes in 7.2.1 worth yet another build attempt?

Richard

P.S.  Thanks for your reply.  I have your book right next to me.

On Tue, 9 Jul 2002, Bruce Momjian wrote:

>
> In current CVS I see this, which looks fine.  Does yours look the same?
>
> ---------------------------------------------------------------------------
>
>
> ifeq ($(PORTNAME), solaris)
>   shlib                 :=
> lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_
> VERSION)
>   ifndef cplusplus
>     ifeq ($(GCC), yes)
>       LINK.shared       = $(CC) -shared
>     else
>       LINK.shared       = $(CC) -G
>     endif
>   else
>     ifeq ($(GXX), yes)
>       LINK.shared       = $(CXX) -shared
>     else
>       LINK.shared       = $(CXX) -G
>     endif
>   endif
>   ifeq ($(with_gnu_ld), yes)
>     LINK.shared         += -Wl,-soname,$(soname)
>   else
>     LINK.shared         += -h $(soname)
>   endif
> endif
>
>
>
> ---------------------------------------------------------------------------
>
> pgsql-bugs@postgresql.org wrote:
> > Richard Cook (rcook@insightful.com) reports a bug with a severity of 2
> > The lower the number the more severe it is.
> >
> > Short Description
> > Wrong shlib flag for GCC compilation on Solaris
> >
> > Long Description
> > In the file .../src/Makefile.shlib, line 178, the "-G" flag is set for compilation of shared libraries on Solaris.
Thisis okay if you are using the Sun toolset.  Unfortunately GCC needs the flag "-shared" instead.  The symptom that
revealsthis is that pgaccess won't work because libpgtcl.so contains the "main" symbol.  My workaround was to edit in
thenew flag.  Somebody on the team might want to modify the Makefile to account for use of the gcc toolset.  This
defectset me back three days.  Please don't let anyone else suffer through this.  It might be well to post it as a
knownproblem on Solaris. 
> >
> > Sample Code
> >
> >
> > No file was uploaded with this report
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 6: Have you searched our list archives?
> >
> > http://archives.postgresql.org
> >
>
>

pgsql-bugs by date:

Previous
From: Andrew Kohlsmith
Date:
Subject: pg_dumpall forces plain text format
Next
From: Prinson
Date:
Subject: Postgres with IBM ????????