Thanks to visit codestin.com
Credit goes to postgrespro.com

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

From Bruce Momjian
Subject Re: Bug #706: Wrong shlib flag for GCC compilation on Solaris
Date
Msg-id [email protected]
Whole thread Raw
In response to Bug #706: Wrong shlib flag for GCC compilation on Solaris  ([email protected])
Responses Re: Bug #706: Wrong shlib flag for GCC compilation on Solaris
List pgsql-bugs
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



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

[email protected] wrote:
> Richard Cook ([email protected]) 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
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  [email protected]               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-bugs by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Bug #705: Invalid UNICODE character sequence found
Next
From: Tatsuo Ishii
Date:
Subject: Re: Multibyte characters handling bug in varchar()