openframeworks / openframeworks/openFrameworks
OSX Makefile Build Bug Fix
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
Solution to this problem: http://forum.openframeworks.cc/index.php/topic,13235.msg56894.html
Since config.osx.default.mk only looks for the latest SDK version installed, the version may not match the current OSX. In order to get current OSX version instead of the latest SDK version, I changed config.osx.default.mk as
diff --git a/libs/openFrameworksCompiled/project/osx/config.osx.default.mk b/libs/openFrameworksCompiled/project/osx/config.osx.default.mk
index ad4c5bb..d05f69b 100644
--- a/libs/openFrameworksCompiled/project/osx/config.osx.default.mk
+++ b/libs/openFrameworksCompiled/project/osx/config.osx.default.mk
@@ -90,13 +90,7 @@ endif
#endif
ifndef MAC_OS_SDK
- ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX10.8.sdk),$(MAC_OS_SDK_PATH)/MacOSX10.8.sdk)
- MAC_OS_SDK=10.8
- else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX10.7.sdk),$(MAC_OS_SDK_PATH)/MacOSX10.7.sdk)
- MAC_OS_SDK=10.7
- else ifeq ($(wildcard $(MAC_OS_SDK_PATH)/MacOSX10.6.sdk),$(MAC_OS_SDK_PATH)/MacOSX10.6.sdk)
- MAC_OS_SDK=10.6
- endif
+ MAC_OS_SDK=$(shell sw_vers -productVersion | cut -f1,2 -d.)
endif
MAC_OS_SDK_ROOT = $(MAC_OS_SDK_PATH)/MacOSX$(MAC_OS_SDK).sdk
It worked on my 10.7.5 machine, whose latest SDK version is 10.8.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with libs/openFrameworksCompiled/project/osx/config.osx.default.mk and inspect how MAC_OS_SDK and MAC_OS_SDK_ROOT are selected. Verify that the build chooses the current macOS version rather than only the newest installed SDK, including the 10.7.5 case described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, shell
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100