openframeworks / openframeworks/openFrameworks

OSX Makefile Build Bug Fix

Open
#2,579 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

automation bug makefile prelim-analysis
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.