Re: Question about Makefile templates for gtk

On Mon, Nov 08, 1999 at 12:03:52PM -0500, Owen Taylor wrote:
>  - AIX does its own peculiar thing. Shared libraries on AIX are
>    different from on any other system known to man.

You've got that right! :)

>    The details were explained to me at one point, but I no longer
>    remember them. Basically, though, AIX really wants to actually
>    link against all the symbols in the shared library when the 
>    shared library is created.

Yes.  The problem is basically this:  If A is a program, and B
and C are shared modules:
                         |   A  |
                       /         \
                ------             ------
               |   B  |           |   C  |
                ------             ------

On AIX, if B calls a function which is in C, then the AIX linker wants you
to link C to B when you create B.

The current gtk Makefile comments out linking gdk to gtk (B to C).

>    At least later versions of AIX have a compiler flag to
>    allow undefined symbols when building a shared library.
>    I presume that this flag does not result in a completely
>    broken library if undefined symbols are encountered - 
>    it would seem to be pointless.

This flag is for AIX's ld (-berok).  It is in the current libtool.
What this flag does, is it allows the module to be built even if
some symbols are unresolved.  So it would allow B to be built without
linking it to C.

However, when you build A and link B and C, then A will dump core
under AIX when B calls a function in C.

>    This flag was added to libtool; I presume with some testing.
> So, though I don't claim to understand everything that is going on,
> that's a rough outline.

You've outlined it accurately.  I don't know what's going no either....
I don't consider writing linkers for operating systems my specialty. :)

What's your recommendation on what to do from here?
Fix something in the Makefile?  Fix libtool?

Craig Rodrigues          

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]