Skip to content

DDHidLib and Release vs Debug builds #64

Open
@getaaron

Description

I am trying to understand why CI is not working. It has something to do with release vs debug builds

This command succeeds:

xcodebuild -derivedDataPath ./build -workspace Boxer.xcworkspace -scheme "Boxer CI" -configuration "Debug"

However, CI should use the Release configuration. When I use that instead...

xcodebuild -derivedDataPath ./build -workspace Boxer.xcworkspace -scheme "Boxer CI" -configuration "Release"

...I get this failure:

** BUILD FAILED **
The following build commands failed:
	Ld /Users/runner/work/Boxer/Boxer/build/Build/Intermediates.noindex/DDHidLib.build/Release/DDHidLib.build/Objects-normal/x86_64/Binary/DDHidLib normal x86_64 (in target 'DDHidLib' from project 'DDHidLib')
(1 failure)
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'OpenEmuShaders' from project 'OpenEmuShaders')
/Users/runner/work/Boxer/Boxer/Vendor/MT32Emu/Boxer-MT32Emu.xcodeproj: warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.9, but the range of supported deployment target versions is 10.13 to 14.0.99. (in target 'Framework' from project 'Boxer-MT32Emu')
/Users/runner/work/Boxer/Boxer/Vendor/DDHidLib/DDHidLib.xcodeproj: warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.9, but the range of supported deployment target versions is 10.13 to 14.0.99. (in target 'DDHidLib' from project 'DDHidLib')
Error: Process completed with exit code 65.

I tried to see how the run configurations were different. The only thing I noticed were the BOXER_DEBUG and USE_PRIVATE_APIS preprocessor macros, but the build still failed when I tried adding them to the release build.

Workaround

I can workaround this issue by manually editing ./Vendor/DDHidLib/DDHidLib.xcodeproj/project.pbxproj:

diff --git a/DDHidLib.xcodeproj/project.pbxproj b/DDHidLib.xcodeproj/project.pbxproj
index bbdc976..218c650 100644
--- a/DDHidLib.xcodeproj/project.pbxproj
+++ b/DDHidLib.xcodeproj/project.pbxproj
@@ -1263,7 +1263,7 @@
                                GCC_WARN_UNINITIALIZED_AUTOS = YES;
                                GCC_WARN_UNUSED_FUNCTION = YES;
                                GCC_WARN_UNUSED_VARIABLE = YES;
-                               MACOSX_DEPLOYMENT_TARGET = 10.9;
+                               MACOSX_DEPLOYMENT_TARGET = 10.14;
                                ONLY_ACTIVE_ARCH = YES;
                                SDKROOT = macosx;
                        };
@@ -1303,7 +1303,7 @@
                                GCC_WARN_UNINITIALIZED_AUTOS = YES;
                                GCC_WARN_UNUSED_FUNCTION = YES;
                                GCC_WARN_UNUSED_VARIABLE = YES;
-                               MACOSX_DEPLOYMENT_TARGET = 10.9;
+                               MACOSX_DEPLOYMENT_TARGET = 10.14;
                                SDKROOT = macosx;
                        };
                        name = Release;

Then it will make a release build successfully. But ideally should not need to edit vendor dependencies to get a release build.

Do you know a better approach?

Do you know why 10.9 is fine on debug builds but not on release builds?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions