Forked from wawiesel/fix-macos-framework-links.sh
Last active
December 1, 2021 07:00
-
-
Save karololszacki/dec8fd80b20e081b0e91a6bbd639c8fe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# script that fixes weird macOS 10.14 SDK issues | |
# SO: https://stackoverflow.com/questions/51314888/ld-warning-text-based-stub-file-are-out-of-sync-falling-back-to-library-file#comment93288538_53111739 | |
# script source: https://gist.github.com/wawiesel/eba461de5f5e38f7f0ac93ae3676b484 | |
# slightly modified to include PrivateFrameworks too | |
F=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks | |
G=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/PrivateFrameworks | |
for d in $F/*.framework; | |
do | |
[[ -d $d ]] || break | |
sudo ln -s $d /Library/Frameworks/; | |
done | |
for d in $F/ApplicationServices.framework/Versions/A/Frameworks/*.framework; | |
do | |
[[ -d $d ]] || break | |
sudo ln -s $d /Library/Frameworks/; | |
done | |
for d in $F/CoreServices.framework/Versions/A/Frameworks/*.framework; | |
do | |
[[ -d $d ]] || break | |
sudo ln -s $d /Library/Frameworks/; | |
done | |
for d in $F/Carbon.framework/Versions/A/Frameworks/*.framework; | |
do | |
[[ -d $d ]] || break | |
sudo ln -s $d /Library/Frameworks/; | |
done | |
for d in $G/*.framework; | |
do | |
[[ -d $d ]] || break | |
sudo ln -s $d /Library/Frameworks/; | |
done |
Thankyou very much for the script.
I was trying to install FTDI Driver in my MacOS (10.13.6) and the test set that came with the driver wasn't building.
I just copied and pasted the script above in a new file, and runt it. After that the files using MacOS Dependencies at 'ld' command were built correctly.
Best regards.
I cannot overstate how helpful this has been. Had been struggling with the Library/stub/link errors for weeks while using create-react-app. This problem had effectively shut down my React self-training. Back on track now.
Thank you @karololszacki
Boudhayan RoyChowdhury
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome work 👍