pragha-music-player / pragha

Pragha is a Lightweight Music Player for GNU/Linux.
GNU General Public License v3.0
176 stars 35 forks source link

libkeybinder.so.0 names conflict #74

Closed LazyKent closed 9 years ago

LazyKent commented 9 years ago

keybinder plugin for Pragha provides the libkeybinder.so.0 library. This causes a conflict in names with the libkeybinder.so.0 provided by the libkeybinder0 package (at least in openSUSE).

% zypper se --provides libkeybinder.so.0
S | Name           | Summary                       | Type   
--+----------------+-------------------------------+--------
i | libkeybinder0  | Library Package for Keybinder | package
i | pragha-plugins | Plugins for Pragha            | package

No matter if they are installed in different directories.

matiasdelellis commented 9 years ago

D'Oh!. Excuse, github never notify me of new bugs!. :disappointed:

You're right. The same applies to libnotify and perhaps other plugins. I'll replace them with libpkeybinder and libpnotify.

gber commented 9 years ago

Actually the right fix to avoid soname conflicts is to disable libtool versioning for plugins.

matiasdelellis commented 9 years ago

I'm not sure of the effect of this commit.. honestly do not know what does. :sweat_smile:

But if you are sure the change will merge it. :wink:

But not later than tomorrow I will release a version with the current changes. The next version will take some time. So please, tell me you are sure of change!. :smile:

Regards, and thanks for all.

gber commented 9 years ago

The main thing it does is to turn off libtool versioning and naming constraints. I'll try to explain the libtool flags:

-module tells libtool to create a shared object but without the requirement of a lib-prefix because you dlopen it by its pathname rather than dynamically linking against it.

-avoid-version turns off libtool versioning of the filename and SONAME, e.g. on Linux with versioning libtool creates $libdir/pragha/plugins/acoustid/libacoustid.so.0.0.0 with the SONAME libacoustid.so.0 and two symlinks /usr/lib/pragha/plugins/acoustid/libacoustid.so and /usr/lib/pragha/plugins/acoustid/libacoustid.so.0 without versioning it'll create /usr/lib/pragha/plugins/acoustid/libacoustid.so with the SONAME libacoustid.so. Again this is desirable because you dlopen it by its pathname and you avoid conflicting SONAMES which are a hassle with modern packaging systems that use it for automatically creating dependencies.

-shared tells it to only create a shared library since you can't do a static build with plugins anyway.

-export-dynamic tells libtool to make any exposed symbols available for use with dlopen/dlsym.

-no-undefined means that all dependent libraries have been explicitly specified and there will be no unresolved symbols, I believe this is necessary on Windows.

You might want to have a look at the libtool documentation, in particular: https://www.gnu.org/software/libtool/manual/html_node/Link-mode.html https://www.gnu.org/software/libtool/manual/html_node/Versioning.html https://www.gnu.org/software/libtool/manual/html_node/Dlopened-modules.html

matiasdelellis commented 9 years ago

Ohh.. Ok. You're right!.

Thanks you. Regards.

LazyKent commented 9 years ago

Fixed. Thanks.