Thread: BUG #2094: AIX: libraries contain the symbol main

BUG #2094: AIX: libraries contain the symbol main

From
"Hans Schlüper"
Date:
The following bug has been logged online:

Bug reference:      2094
Logged by:          Hans Schlüper
Email address:      hans.schlueper@atosorigin.com
PostgreSQL version: 8.1.0
Operating system:   AIX 5.3
Description:        AIX: libraries contain the symbol main
Details:

Problem:
with xlc compiler under AIX 5.3 (also 4.3) we found the following problem.
The linker per default assumes that
you are linking a main program when you do not specify a module type. So
shared libraries contain the symbol
main. So you couldn't use the libraries

Solution:
Using LDFLAGS_SL="-bnoentry"
=> noentry point is specified.
=> no symbol main

Re: BUG #2094: AIX: libraries contain the symbol main

From
Seneca Cunningham
Date:
Hans SchlXXper wrote:
> with xlc compiler under AIX 5.3 (also 4.3) we found the following problem.
> The linker per default assumes that
> you are linking a main program when you do not specify a module type. So
> shared libraries contain the symbol
> main. So you couldn't use the libraries
>
> Solution:
> Using LDFLAGS_SL="-bnoentry"

How did you configure postgres?  Every AIX build that I have seen
includes "-Wl,-bnoentry" as part of the LDFLAGS_SL, which is sourced
from src/makefiles/Makefile.aix (I know that a non-gcc build on aix3.2.5
would use "-e _nostart" instead).

--
Seneca Cunningham
scunning@ca.afilias.info