<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I think I found the answer to my own question. <br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
The problem with the linker warning messages regarding the Frameworks are "out of sync" appears to plague only Mac users running High Sierra or Mojave especially after they have upgraded XCode.<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Sometimes the problem can be solved by reinstalling the XCode Command Line Tools. (That did not work for me).</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Otherwise, one needs to set SDKROOT as follows:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<blockquote style="margin-top:0;margin-bottom:0">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<b>export SDKROOT=$(xcrun --show-sdk-path)</b></div>
</blockquote>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
It is best to set SDKROOT in one's <code>~/.bash_profile</code></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
See<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<a href="https://stackoverflow.com/questions/51314888/ld-warning-text-based-stub-file-are-out-of-sync-falling-back-to-library-file" id="LPNoLPOWALinkPreview">https://stackoverflow.com/questions/51314888/ld-warning-text-based-stub-file-are-out-of-sync-falling-back-to-library-file</a></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
In any event, without setting SDKROOT, it appears that the fallback "to library file for linking" does work and the linker can finish doing its job.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
One can try to fix it in the Portfile like I did by setting <b>-isysroot</b> etc but that appears to interfere with MacPorts trace mode. When installing a port in trace mode with
<b>-sysroot </b>set, the linker will be unable to find common headers like stdio.h. At least that is my experience.<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I will just ignore these linker warning messages that get genearted on High Sierra or Mojave. It is really not a Macports issue but a macOS issue.<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Rob<br>
</div>
<div class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview _EReadonly_1"></div>
<br>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> macports-dev <macports-dev-bounces@lists.macports.org> on behalf of Robert Kennedy <amtor@hotmail.com><br>
<b>Sent:</b> August 16, 2022 7:17 PM<br>
<b>To:</b> macports-dev@lists.macports.org <macports-dev@lists.macports.org><br>
<b>Subject:</b> ld: waning messages -- Frameworks out of sync.</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div class="x_elementToProof" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I have been experimenting with building my M2VDownsizer port on other Macs running newer MacOS. M2VDownsizer uses a Makefile to build the binary from source code written in C. (see PR
<a href="https://github.com/macports/macports-ports/pull/15636" id="LPNoLPOWALinkPreview">
https://github.com/macports/macports-ports/pull/15636</a> )<br>
</div>
<div class="x__Entity x__EType_OWALinkPreview x__EId_OWALinkPreview x__EReadonly_1">
</div>
<br>
<div class="x_elementToProof" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_elementToProof" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I find that on newer Macs (e.g. 10.13), the following linker warning messages are often generated:</div>
<div class="x_elementToProof" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_elementToProof" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<blockquote style="margin-top:0; margin-bottom:0">ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
are out of sync. Falling back to library file for linking.<br>
</blockquote>
<div><br>
</div>
<div>I can get rid of these warning messages if I include the following in the Portfile:</div>
<div><br>
</div>
<div>
<blockquote style="margin-top:0; margin-bottom:0">
<div>set MAJOR_MACOS_VERSION [ exec sh -c { sw_vers -productVersion | cut -d '.' -f 1,2 } ]</div>
<br>
<div>set SDK_PATH [ exec xcrun --show-sdk-path ]</div>
<div><br>
</div>
<div>configure.cflags-append -mmacosx-version-min=${MAJOR_MACOS_VERSION}</div>
<div><br>
</div>
<div>configure.cflags-append -isysroot ${SDK_PATH}</div>
</blockquote>
<div><br>
</div>
<div>The port builds just fine unless one uses trace mode.</div>
<div>i.e. sudo port -vst install M2VDwnsizer</div>
<div><br>
</div>
<div>I suspect that setting SYSROOT using -isysroot interferes with MacPorts trace mode.</div>
<div><br>
</div>
<div>I will probably just delete the extra statements above from the Portfile and just live with the warning messages.</div>
<div><br>
</div>
<div>Has anyone else dealt with this issue?<br>
</div>
<div><br>
</div>
<div>Rob<br>
</div>
<div><br>
</div>
</div>
<br>
</div>
</div>
</body>
</html>