2

I have a process A which uses two shared libraries: libA.so and libB.so. Because the two libraries were written by different people. Unfortunately libA.so uses version 1.0 of the 3rd party library libD.so. While libB.so uses version 2.0 of the library in static form libD.a. I know that if libA.so and libA.so use libD.so, some errors might happen because of the Global Symbol Interpose. But does this situation have the same problem too?

I know the link flag -Bsymbolic could be used on libA.so or libB.so to force the symbol resolving symbols with the library first. In order to make process A run correctly, both of the two libraries must be linked with this flag, am I right? However, I don't have the source code of libA.so. So I cannot re-link the libA.so again.

To be more general, if one process uses two 3rd party libraries, which contains another same 3rd party library. Will the same thing happen? Is there anything I can do to solve this problem?

4

1 に答える 1

0

これは役に立つかもしれないし、役に立たないかもしれませんが、情報が不足していることを考えると、少なくともアイデアが浮かんだり、似たようなことにつながることを願っています.

これは、ディレクトリごとにシェル設定を変更できるアプリケーションです: https://github.com/zimbatm/direnv

ただし、ライブラリの1つをソースから再コンパイルする必要があるという問題が実際にあるようです。これは理想的ではありませんが、互換性のあるサードパーティ バージョンを使用したビルドがない場合は、元のタスクを達成するためにまったく別のライブラリを探す必要があります。

于 2013-08-14T19:40:34.350 に答える