Skip site navigation (1) Skip section navigation (2)

Re: Bug #706: Wrong shlib flag for GCC compilation on Solaris

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: rcook(at)insightful(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #706: Wrong shlib flag for GCC compilation on Solaris
Date: 2002-07-10 03:08:07
Message-ID: 200207100308.g6A387d20064@candle.pha.pa.us (view raw or flat)
Thread:
Lists: 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



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

pgsql-bugs(at)postgresql(dot)org wrote:
> Richard Cook (rcook(at)insightful(dot)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.  This is okay if you are using the Sun toolset.  Unfortunately GCC needs the flag "-shared" instead.  The symptom that reveals this is that pgaccess won't work because libpgtcl.so contains the "main" symbol.  My workaround was to edit in the new flag.  Somebody on the team might want to modify the Makefile to account for use of the gcc toolset.  This defect set me back three days.  Please don't let anyone else suffer through this.  It might be well to post it as a known problem 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
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

Responses

pgsql-bugs by date

Next:From: EdwardDate: 2002-07-10 04:59:54
Subject: Multibyte characters handling bug in varchar()
Previous:From: Tatsuo IshiiDate: 2002-07-10 03:05:31
Subject: Re: Bug #705: Invalid UNICODE character sequence found

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group