[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-buildsystem
Subject:    Re: Review Request 124892: bug 342962: kdeclarative plugins should be built as a bundle plugin and n
From:       "Marco Martin" <notmart () gmail ! com>
Date:       2015-08-26 9:33:49
Message-ID: 20150826093349.4103.97513 () mimi ! kde ! org
[Download RAW message or body]

--===============2983964198882275761==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit



> On Aug. 25, 2015, 2:22 p.m., René J.V. Bertin wrote:
> > > When built as SHARED as in the current code, libdraganddropplugin.dylib gets \
> > > installed to $PREFIX/share/qt5/qml/org/kde/draganddrop, but is given an OS X \
> > > install_name of $PREFIX/lib/libdraganddropplugin.dylib. This mismatch can cause \
> > > problems. It is also given a compatibility_version of 0.0.0.
> > 
> > Both properties are used only when the `dylib` is used as a shared library, \
> > because AFAIK they're only used by the dynamic loader when the reference \
> > information is available (i.e. stored in the binary by the link editor). Using \
> > `dlopen` on a random file, dylib or other, does not provide such information and \
> > thus it shouldn't matter what the loaded file claims for its install_name and/or \
> > compatibility_version. 
> > By contrast, there *is* a difference between shared libraries and loadable \
> > modules ("plugins" or `bundles` in OS X speak) on OS X. The latter cannot be used \
> > as shared libraries by the link editor (something that certain KDE4 projects sin \
> > against) while the former can be used as plugins without any issue. However, only \
> > plugins can have automatic access to the loader's symbols but that requires the \
> > loader to be specified at link time so not of much interest for generic plugins, \
> >                 kparts etc.
> > NB: the `bundle` in this context is unfortunate because they are not generally \
> >                 bundles in the "app bundle" way.
> > NB2: those KDE projects that use modules as shared libraries (kparts, in unit \
> > tests IIRC) led me to propose a patch to MacPorts's port:cmake which made cmake \
> > create modules with the same linker options as shared libraries (i.e. \
> > `-dynamiclib` instead of `-bundle`). I've since tried to get that patch removed, \
> > but it is still out there.

if this breaks on linux, it should be reverted for now


- Marco


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124892/#review84338
-----------------------------------------------------------


On Aug. 23, 2015, 9:16 p.m., Hanspeter Niederstrasser wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124892/
> -----------------------------------------------------------
> 
> (Updated Aug. 23, 2015, 9:16 p.m.)
> 
> 
> Review request for Build System, KDE Software on Mac OS X, KDE Frameworks, Plasma, \
> and Harald Sitter. 
> 
> Bugs: 342962
> https://bugs.kde.org/show_bug.cgi?id=342962
> 
> 
> Repository: kdeclarative
> 
> 
> Description
> -------
> 
> The kdeclarative plugins (draganddropplugin, kcoreaddonsplugin, kio, \
> kquickcontrolsprivateplugin, and kquickcontrolsaddonsplugin) are being built as \
> shared libraries. They should be built as bundles (MODULE) in the CMakeLists.txt \
> file. 
> When built as SHARED as in the current code, libdraganddropplugin.dylib gets \
> installed to $PREFIX/share/qt5/qml/org/kde/draganddrop, but is given an OS X \
> install_name of $PREFIX/lib/libdraganddropplugin.dylib. This mismatch can cause \
> problems. It is also given a compatibility_version of 0.0.0. 
> 
> Diffs
> -----
> 
> src/qmlcontrols/draganddrop/CMakeLists.txt e8127e4 
> src/qmlcontrols/kcoreaddons/CMakeLists.txt 3f77f2d 
> src/qmlcontrols/kioplugin/CMakeLists.txt 7b258e0 
> src/qmlcontrols/kquickcontrols/private/CMakeLists.txt da355c1 
> src/qmlcontrols/kquickcontrolsaddons/CMakeLists.txt 5b711e1 
> 
> Diff: https://git.reviewboard.kde.org/r/124892/diff/
> 
> 
> Testing
> -------
> 
> Since the plugin is not supposed to be a linkable library, it should be built as \
> MODULE in CMakeLists.txt. The physical install location remains the same and \
> plugins don't have install_names. This corrects the install_name/install location \
> mismatch. The change should not have any effect on non-OS X systems. 
> 
> Thanks,
> 
> Hanspeter Niederstrasser
> 
> 


--===============2983964198882275761==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/124892/">https://git.reviewboard.kde.org/r/124892/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On August 25th, 2015, 2:22 p.m. UTC, <b>René J.V. \
Bertin</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><blockquote style="text-rendering: inherit;padding: 0 0 0 \
1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: \
inherit;"> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">When built as SHARED as in the current code, \
libdraganddropplugin.dylib gets installed to \
$PREFIX/share/qt5/qml/org/kde/draganddrop, but is given an OS X install_name of \
$PREFIX/lib/libdraganddropplugin.dylib. This mismatch can cause problems. It is also \
given a compatibility_version of 0.0.0.</p> </blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Both properties are used only when the <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">dylib</code> is used as a shared library, because AFAIK \
they're only used by the dynamic loader when the reference information is available \
(i.e. stored in the binary by the link editor). Using <code style="text-rendering: \
inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">dlopen</code> on a random file, dylib or other, does not provide such \
information and thus it shouldn't matter what the loaded file claims for its \
install_name and/or compatibility_version.</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">By contrast, there <em \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
normal;">is</em> a difference between shared libraries and loadable modules \
("plugins" or <code style="text-rendering: inherit;color: #4444cc;padding: \
0;white-space: normal;margin: 0;line-height: inherit;">bundles</code> in OS X speak) \
on OS X. The latter cannot be used as shared libraries by the link editor (something \
that certain KDE4 projects sin against) while the former can be used as plugins \
without any issue. However, only plugins can have automatic access to the loader's \
symbols but that requires the loader to be specified at link time so not of much \
                interest for generic plugins, kparts etc.
NB: the <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: \
normal;margin: 0;line-height: inherit;">bundle</code> in this context is unfortunate \
                because they are not generally bundles in the "app bundle" way.
NB2: those KDE projects that use modules as shared libraries (kparts, in unit tests \
IIRC) led me to propose a patch to MacPorts's port:cmake which made cmake create \
modules with the same linker options as shared libraries (i.e. <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">-dynamiclib</code> instead of <code style="text-rendering: \
inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">-bundle</code>). I've since tried to get that patch removed, but it is \
still out there.</p></pre>  </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">if \
this breaks on linux, it should be reverted for now</p></pre> <br />










<p>- Marco</p>


<br />
<p>On August 23rd, 2015, 9:16 p.m. UTC, Hanspeter Niederstrasser wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for Build System, KDE Software on Mac OS X, KDE Frameworks, \
Plasma, and Harald Sitter.</div> <div>By Hanspeter Niederstrasser.</div>


<p style="color: grey;"><i>Updated Aug. 23, 2015, 9:16 p.m.</i></p>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="https://bugs.kde.org/show_bug.cgi?id=342962">342962</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kdeclarative
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">The kdeclarative plugins (draganddropplugin, \
kcoreaddonsplugin, kio, kquickcontrolsprivateplugin, and kquickcontrolsaddonsplugin) \
are being built as shared libraries. They should be built as bundles (MODULE) in the \
CMakeLists.txt file.</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">When built as SHARED as in the current \
code, libdraganddropplugin.dylib gets installed to \
$PREFIX/share/qt5/qml/org/kde/draganddrop, but is given an OS X install_name of \
$PREFIX/lib/libdraganddropplugin.dylib. This mismatch can cause problems. It is also \
given a compatibility_version of 0.0.0.</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Since the plugin is not supposed to be a linkable \
library, it should be built as MODULE in CMakeLists.txt. The physical install \
location remains the same and plugins don't have install_names. This corrects the \
install_name/install location mismatch. The change should not have any effect on \
non-OS X systems.</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/qmlcontrols/draganddrop/CMakeLists.txt <span style="color: \
grey">(e8127e4)</span></li>

 <li>src/qmlcontrols/kcoreaddons/CMakeLists.txt <span style="color: \
grey">(3f77f2d)</span></li>

 <li>src/qmlcontrols/kioplugin/CMakeLists.txt <span style="color: \
grey">(7b258e0)</span></li>

 <li>src/qmlcontrols/kquickcontrols/private/CMakeLists.txt <span style="color: \
grey">(da355c1)</span></li>

 <li>src/qmlcontrols/kquickcontrolsaddons/CMakeLists.txt <span style="color: \
grey">(5b711e1)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/124892/diff/" style="margin-left: \
3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>


--===============2983964198882275761==--


[Attachment #3 (text/plain)]

_______________________________________________
Kde-buildsystem mailing list
Kde-buildsystem@kde.org
https://mail.kde.org/mailman/listinfo/kde-buildsystem


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic