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

Re: png2/3 problem apparently successfully solved with -Bsymbolic

On Tue, 20 Aug 2002, Luca Barbieri wrote:
> I propose to do the following to solve the libpng2/3 problem. I've
> recompiled libpng2. libpng3 and libgtk2.0-0png3 locally and the system
> seems to work correctly.

>         1. Recompile libpng2 and libpng3 with -Bsymbolic

Well, either this or using versioned symbols is required, and would have
almost the same effect.

>         2. Recompile all libraries that use either libpng2 or libpng3 to
>            explicitly link to them and to use -Bsymbolic

This should not be needed if versioned symbols are used. Do note that if you
compile something with -Bsymbolic, you cannot override the symbols it
both defines and uses.  So, -Bsymbolic is more prone to cause side-efects
than versioned symbols.

> Note2: "recompile with -Bsymbolic" means "add -Wl,-Bsymbolic to the
> flags passed to the compiler in the linking stage, rebuild and upload
> the new package"

Versioning would be -Wl,-soname,$@.$(MAJOR)  where $(MAJOR) is the
versioning we want to apply.

> I'll now explain what the problem is and why this solution works.
> The problem is that libpng2 and libpng3 have symbols with different
> names and we want to have both loaded in the same address space.

I would like to have them in different address spaces, thank you very much
:)  That's what symbol versioning does.

> So we can solve this by making sure that anything that wants to use png
> symbols:
>         1. Directly links to the desired version of libpng
>         2. Is either the main program or is linked with -Bsymbolic

(2) should NOT be needed. At least not if the explanation of -Bsymbolic drow
gave me on IRC (which seems to be what the ld info page says about the
matter) is correct.

Could you try that again without using -Bsymbolic in anything but png2 and

> Are there any problems that would be caused by these changes?

Well, -Bsymbolic is rumored not to be very portable, but as long as ld
supports it in all of our archs, that's a moot problem.

  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

Reply to: