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
https://github.com/macports/macports-ports/pull/15636 )
I find that on newer Macs (e.g. 10.13), the following linker warning messages
are often generated:
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.
I can get rid of these warning messages if I include the following in the
Portfile:
set MAJOR_MACOS_VERSION [ exec sh -c { sw_vers -productVersion | cut -d
'.' -f 1,2 } ]
set SDK_PATH [ exec xcrun --show-sdk-path ]
configure.cflags-append -mmacosx-version-min=${MAJOR_MACOS_VERSION}
configure.cflags-append -isysroot ${SDK_PATH}
The port builds just fine unless one uses trace mode.
i.e. sudo port -vst install M2VDwnsizer
I suspect that setting SYSROOT using -isysroot interferes with MacPorts trace
mode.
I will probably just delete the extra statements above from the Portfile and
just live with the warning messages.
Has anyone else dealt with this issue?
Rob