<div dir="ltr"><span class="gmail-im">&gt;</span>This patch look OK but it might be nice to also clean up this error<br>
message (and the Example comment a few lines above it) to drop the 3<br>
levels of version number. There should only be 2, ie the fully<br><div>
versioned filename would be libfoo.so.1.2 instead of libfoo.so.1.2.3<span class="gmail-im"><br></span></div><div><br></div><div>Yeah, sound reasonable. According to the tLDP (<a href="http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html">http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html</a>) <br></div><div>there can be be 3 levels, but last one is optional. Quote from tLDP: <i>&quot;The real name adds to the soname a period, a
minor <br></i></div><div><i>number, another period, and the release number.
The last period and release number <b>are</b> <b>optional</b>&quot;. <br></i></div><div><i><br></i></div><div>So yes, correct fully versioned name should contain at least two numbers</div><div><br></div><div>&gt;&quot;oe_soinstall: $libname soname is equal to fully versioned real (file) name. The soname should include the major version only (e.g.libfoo.so.1 instead of libfoo.so.1.2)&quot;</div><div><br></div><div>Good point. But what if library real name is libfoo.so.1 and soname is libfoo.so.1 too? In my opinion there is two ways: <br></div><div><br></div><div>1) Add one more check: parse $sonamelink and throw bbwarn if soname is incorrect. &quot;Incorrect&quot; in this case means that <br></div><div>soname contain more than one version (libfoo.so.1.2)<br></div><div><br></div><div>2) Mention both possible problems in bbwarn. Like: &quot; $libname soname is equal to fully versioned real (file)<br>
name. The soname should include the major version only (e.g. libfoo.so.1 instead of libfoo.so.1.2) or minor version <br></div><div>should be added to library real name (e.g. libfoo.so.1.2 instead of libfoo.so.1) ; &quot;</div><div><br></div><div>First one is definitely clearer. So I&#39;m going to implement it and send version 2 of patch<br></div><div><i></i></div><div><span class="gmail-im"></span></div><div><span class="gmail-im"></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 26, 2020 at 10:08 PM Andre McCurdy &lt;<a href="mailto:armccurdy@gmail.com">armccurdy@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Feb 25, 2020 at 6:17 AM Yevhenii Shchehlov<br>
&lt;<a href="mailto:eugenyshcheglov@gmail.com" target="_blank">eugenyshcheglov@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; This patch fixes an issue when oe_soinstall function creates<br>
&gt; non-functional recursive symlinks in case library soname is equal<br>
&gt; to library real (file) name.<br>
&gt;<br>
&gt; Signed-off-by: Yevhenii Shchehlov &lt;<a href="mailto:eugenyshcheglov@gmail.com" target="_blank">eugenyshcheglov@gmail.com</a>&gt;<br>
&gt; ---<br>
&gt;  meta/classes/utils.bbclass | 8 ++++++--<br>
&gt;  1 file changed, 6 insertions(+), 2 deletions(-)<br>
&gt;<br>
&gt; diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass<br>
&gt; index cd3d05709e..dea824f54f 100644<br>
&gt; --- a/meta/classes/utils.bbclass<br>
&gt; +++ b/meta/classes/utils.bbclass<br>
&gt; @@ -25,7 +25,7 @@ oe_soinstall() {<br>
&gt;         libname=`basename $1`<br>
&gt;         case &quot;$libname&quot; in<br>
&gt;             *.so)<br>
&gt; -               bbfatal &quot;oe_soinstall: Shared library must haved versioned filename (e.g. libfoo.so.1.2.3)&quot;<br>
&gt; +               bbfatal &quot;oe_soinstall: Shared library must haved versioned filename (e.g. libfoo.so.1.2.3 instead of libfoo.so)&quot;<br>
<br>
This patch look OK but it might be nice to also clean up this error<br>
message (and the Example comment a few lines above it) to drop the 3<br>
levels of version number. There should only be 2, ie the fully<br>
versioned filename would be libfoo.so.1.2 instead of libfoo.so.1.2.3<br>
<br>
&gt;                 ;;<br>
&gt;         esac<br>
&gt;         install -m 755 $1 $2/$libname<br>
&gt; @@ -33,8 +33,12 @@ oe_soinstall() {<br>
&gt;         if [ -z $sonamelink ]; then<br>
&gt;                 bbfatal &quot;oe_soinstall: $libname is missing ELF tag &#39;SONAME&#39;.&quot;<br>
&gt;         fi<br>
&gt; +       if [ &quot;$sonamelink&quot; == &quot;$libname&quot; ]; then<br>
&gt; +               bbwarn &quot;oe_soinstall: $libname soname is equal to real (file) name. Minor version should be added to a real name (e.g. libfoo.so.1.2 instead of libfoo.so.1)&quot;<br>
<br>
It might be clearer to say:<br>
<br>
&quot;oe_soinstall: $libname soname is equal to fully versioned real (file)<br>
name. The soname should include the major version only (e.g.<br>
libfoo.so.1 instead of libfoo.so.1.2)&quot;<br>
<br>
&gt; +       else<br>
&gt; +               ln -sf $libname $2/$sonamelink<br>
&gt; +       fi<br>
&gt;         solink=`echo $libname | sed -e &#39;s/\.so\..*/.so/&#39;`<br>
&gt; -       ln -sf $libname $2/$sonamelink<br>
&gt;         ln -sf $libname $2/$solink<br>
&gt;  }<br>
&gt;<br>
&gt; --<br>
&gt; 2.25.1<br>
&gt;<br>
&gt; --<br>
&gt; _______________________________________________<br>
&gt; Openembedded-core mailing list<br>
&gt; <a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
&gt; <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div>