Incorrect install name for dylib on macOS

Benjamin Bertrand via omniORB-list <[email protected]> Fri, 18 Apr 2025 09:32:14 +0000
Newsgroups gmane.comp.corba.omniorb.user
Message-ID <GV3P280MB13286E168B0983AC187D6EECA0BF2@GV3P280MB1328.SWEP280.PROD.OUTLOOK.COM>
--===============2289301122777598440==
Content-Language: en-GB
Content-Type: multipart/alternative;
	boundary="_000_GV3P280MB13286E168B0983AC187D6EECA0BF2GV3P280MB1328SWEP_"

--_000_GV3P280MB13286E168B0983AC187D6EECA0BF2GV3P280MB1328SWEP_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

Hello,

After compiling omniORB 4.3.3, I noticed that we still have issue on macOS.
cpptango is still compiled against the exact version: @rpath/libomniORB4.3.=
3.dylib (instead of @rpath/libomniORB4.3.dylib).

I thought setting the compatibility version would fix that, but the problem=
 comes from the install name.

$ otool -L libomniORB4.dylib
libomniORB4.dylib:
@rpath/libomniORB4.3.3.dylib (compatibility version 4.3.0, current version =
4.3.3) @rpath/libomnithread.4.3.dylib (compatibility version 4.3.0, current=
 version 4.3.0) @rpath/libc++.1.dylib (compatibility version 1.0.0, current=
 version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, cu=
rrent version 1351.0.0)

$ otool -D  libomniORB4.dylib
libomniORB4.dylib:
@rpath/libomniORB4.3.3.dylib

otool -D should return =94@rpath/libomniORB4.3.dylib=94

I tested changing the id name with =93install_name_tool=94 and cpptango lin=
ks against the proper file afterwards.

To fix omniORB, it seems =93-install_name=94 should be passed in LDFLAGS on=
 macOS.
Could that be added to the build system?

Thanks

Benjamin


--_000_GV3P280MB13286E168B0983AC187D6EECA0BF2GV3P280MB1328SWEP_
Content-Type: text/html; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" xmlns:w=3D"urn:sc=
hemas-microsoft-com:office:word" xmlns:m=3D"http://schemas.microsoft.com/of=
fice/2004/12/omml" xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DWindows-1=
252">
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Aptos;
	panose-1:2 11 0 4 2 2 2 2 2 4;}
@font-face
	{font-family:-webkit-standard;
	panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	font-size:12.0pt;
	font-family:"Aptos",sans-serif;
	mso-ligatures:standardcontextual;
	mso-fareast-language:EN-US;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;
	mso-ligatures:none;
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style>
</head>
<body lang=3D"en-SE" link=3D"#467886" vlink=3D"#96607D" style=3D"word-wrap:=
break-word">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span lang=3D"SV" style=3D"font-size:13.5pt;font-fam=
ily:&quot;-webkit-standard&quot;,serif;color:black">Hello,<o:p></o:p></span=
></p>
<p class=3D"MsoNormal"><span lang=3D"SV" style=3D"font-size:13.5pt;font-fam=
ily:&quot;-webkit-standard&quot;,serif;color:black"><o:p>&nbsp;</o:p></span=
></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:13.5pt;font-=
family:&quot;-webkit-standard&quot;,serif;color:black">After compiling omni=
ORB 4.3.3, I noticed that we still have issue on macOS.<br>
cpptango is still compiled against the exact version: </span><span style=3D=
"font-size:13.5pt;font-family:&quot;-webkit-standard&quot;,serif;color:blac=
k">@rpath/libomniORB4.3.3.dylib</span><span style=3D"font-size:13.5pt;font-=
family:&quot;-webkit-standard&quot;,serif;color:black">
<span lang=3D"EN-US">(instead of </span></span><span style=3D"font-size:13.=
5pt;font-family:&quot;-webkit-standard&quot;,serif;color:black">@rpath/libo=
mniORB4.3.dylib</span><span lang=3D"EN-US" style=3D"font-size:13.5pt;font-f=
amily:&quot;-webkit-standard&quot;,serif;color:black">).<br>
<br>
I thought setting the compatibility version would fix that, but the problem=
 comes from the install name.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:13.5pt;font-=
family:&quot;-webkit-standard&quot;,serif;color:black"><o:p>&nbsp;</o:p></s=
pan></p>
<p class=3D"MsoNormal"><span style=3D"font-size:13.5pt;font-family:&quot;-w=
ebkit-standard&quot;,serif;color:black">$ otool -L libomniORB4.dylib</span>=
<span lang=3D"SV" style=3D"font-size:13.5pt;font-family:&quot;-webkit-stand=
ard&quot;,serif;color:black"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:13.5pt;font-family:&quot;-w=
ebkit-standard&quot;,serif;color:black">libomniORB4.dylib:</span><span lang=
=3D"SV" style=3D"font-size:13.5pt;font-family:&quot;-webkit-standard&quot;,=
serif;color:black"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:13.5pt;font-family:&quot;-w=
ebkit-standard&quot;,serif;color:black">@rpath/libomniORB4.3.3.dylib (compa=
tibility version 4.3.0, current version 4.3.3) @rpath/libomnithread.4.3.dyl=
ib (compatibility version 4.3.0, current version
 4.3.0) @rpath/libc++.1.dylib (compatibility version 1.0.0, current version=
 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current ve=
rsion 1351.0.0)
</span><span lang=3D"EN-US" style=3D"font-size:13.5pt;font-family:&quot;-we=
bkit-standard&quot;,serif;color:black"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:13.5pt;font-=
family:&quot;-webkit-standard&quot;,serif;color:black"><o:p>&nbsp;</o:p></s=
pan></p>
<p class=3D"MsoNormal"><span style=3D"font-size:13.5pt;font-family:&quot;-w=
ebkit-standard&quot;,serif;color:black">$ otool -D &nbsp;libomniORB4.dylib<=
/span><span lang=3D"EN-US" style=3D"font-size:13.5pt;font-family:&quot;-web=
kit-standard&quot;,serif;color:black"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:13.5pt;font-family:&quot;-w=
ebkit-standard&quot;,serif;color:black">libomniORB4.dylib:</span><span lang=
=3D"EN-US" style=3D"font-size:13.5pt;font-family:&quot;-webkit-standard&quo=
t;,serif;color:black"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:13.5pt;font-family:&quot;-w=
ebkit-standard&quot;,serif;color:black">@rpath/libomniORB4.3.3.dylib</span>=
<span lang=3D"SV" style=3D"font-size:13.5pt;font-family:&quot;-webkit-stand=
ard&quot;,serif;color:black"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"SV" style=3D"font-size:13.5pt;font-fam=
ily:&quot;-webkit-standard&quot;,serif;color:black"><o:p>&nbsp;</o:p></span=
></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:13.5pt;font-=
family:&quot;-webkit-standard&quot;,serif;color:black">otool -D should retu=
rn =94</span><span style=3D"font-size:13.5pt;font-family:&quot;-webkit-stan=
dard&quot;,serif;color:black">@rpath/libomniORB4.3.dylib</span><span lang=
=3D"EN-US" style=3D"font-size:13.5pt;font-family:&quot;-webkit-standard&quo=
t;,serif;color:black">=94<br>
<br>
I tested changing the id name with =93install_name_tool=94 and cpptango lin=
ks against the proper file afterwards.<br>
<br>
To fix omniORB, it seems =93-install_name=94 should be passed in LDFLAGS on=
 macOS.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:13.5pt;font-=
family:&quot;-webkit-standard&quot;,serif;color:black">Could that be added =
to the build system?<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:13.5pt;font-=
family:&quot;-webkit-standard&quot;,serif;color:black"><o:p>&nbsp;</o:p></s=
pan></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:13.5pt;font-=
family:&quot;-webkit-standard&quot;,serif;color:black">Thanks<o:p></o:p></s=
pan></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:13.5pt;font-=
family:&quot;-webkit-standard&quot;,serif;color:black"><o:p>&nbsp;</o:p></s=
pan></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US" style=3D"font-size:13.5pt;font-=
family:&quot;-webkit-standard&quot;,serif;color:black">Benjamin<br>
<br>
</span><span lang=3D"EN-US"><o:p></o:p></span></p>
</div>
</body>
</html>

--_000_GV3P280MB13286E168B0983AC187D6EECA0BF2GV3P280MB1328SWEP_--


--===============2289301122777598440==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
omniORB-list mailing list
[email protected]
https://www.omniorb-support.com/mailman/listinfo/omniorb-list

--===============2289301122777598440==--