Bug 342897 - solidextensionplugin should be built as a bundle plugin and not a shared library
Summary: solidextensionplugin should be built as a bundle plugin and not a shared library
Status: REPORTED
Alias: None
Product: frameworks-solid
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Fink Packages macOS
: NOR normal
Target Milestone: ---
Assignee: Lukáš Tinkl
URL: https://developer.apple.com/library/m...
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-16 04:31 UTC by Hanspeter Niederstrasser
Modified: 2021-03-23 01:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hanspeter Niederstrasser 2015-01-16 04:31:26 UTC
solidextensionplugin is being built as a SHARED library (src/imports/CMakeLists.txt), but it should be MODULE instead.

https://developer.apple.com/library/mac/documentation/Porting/Conceptual/PortingUnix/compiling/compiling.html#//apple_ref/doc/uid/TP40002850-TPXREF103


Reproducible: Always


Actual Results:  
When built as SHARED as in the current code, libsolidextensionplugin.dylib gets installed to $PREFIX/share/qt5/qml/org/kde/solid/, but is given an install_name of $PREFIX/lib/libsolidextensionplugin.dylib.  This mismatch can cause problems. It is also given a compatibility_version of 0.0.0.

Expected Results:  
Since the plugin is not supposed to be a linkable library, it should be built as MODULE in CMakeLists.txt. This corrects the install_name/install location mismatch. The change should not have any effect on non-OS X systems.

This patch fixes it:

--- solid-5.6.0-orig/src/imports/CMakeLists.txt	2014-11-02 06:26:53.000000000 -0600
+++ solid-5.6.0/src/imports/CMakeLists.txt	2014-11-20 05:32:30.000000000 -0600
@@ -18,7 +18,7 @@
     devices.cpp
     )
 
-add_library(solidextensionplugin SHARED ${solidextensionplugin_SRCS})
+add_library(solidextensionplugin MODULE ${solidextensionplugin_SRCS})
 
 target_link_libraries(
     solidextensionplugin
Comment 1 Justin Zobel 2021-03-09 05:54:14 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 2 Hanspeter Niederstrasser 2021-03-23 01:53:25 UTC
Current code still calls the plugin as a shared library

https://github.com/KDE/solid/blob/master/src/imports/CMakeLists.txt#L21

So the problem probably still exists (I can't build solid now).
But there's data elsewhere that changing these plugins to be shared libraries on macOS is problematic: https://bugs.kde.org/show_bug.cgi?id=342962