-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Path to Mac SDK missing when building for osx with Cocoapods #353
Comments
Did you specify Foundation for osx platform similar way? |
Yes I tried that. extender/server/src/main/java/com/defold/extender/Extender.java Lines 846 to 853 in 06b486a
|
The osx build does not include a |
I'm confused. I don't see any of these flags in the osx build: https://github.com/defold/defold/blob/dev/share/extender/build_input.yml#L131 |
I get the flags, including sysroot, but I'm missing the cocoapod includes, which perhaps says they're not resolved:
|
Yeah, once I resolved the pods, it triggers the source build for the cocoapods, and it doesn't seem to use the command line that the rest of the build system is using. |
The culprit is in the cocopod builder, which deletes all flags:
And, since the platforms are setup slightly differently in our build config, you will then get different results:
Which then ofc adds the isysroot flag to iOS but not macOS. Question is what reason in particular that the "flags" field was cleared, as it sidesteps the build system. I can of course modify the defold sdk so that the sysroot flag is part of the base flags, as a fix. |
Attempting to build extension-firebase for osx (adding a Podfile, allowing firebase_ios.mm to also build for DM_PLATFORM_OSX) fails with errors such as:
Examining the logs for the failed build, a typical compiler invocation looks like this:
Log from osx extension-firebase build
clang++ -c -DDLIB_LOG_DOMAIN="PROMISESOBJC" -DDDF_EXPOSE_DESCRIPTORS -DDM_PLATFORM_MACOS -DDM_PLATFORM_OSX -DGL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED -DDM_DEBUG -fobjc-arc --language=objective-c -fmodules -fmodule-name=FBLPromises -fmodule-map-file=/var/folders/ny/05wk595149v2zs2zz5jtwct40000gn/T/job8963115461759210323/CocoaPodsService/generated/PromisesObjC/module.modulemap -Iupload/ -Iupload/firebase/include/ -ICocoaPodsService/Pods/PromisesObjC/Sources/FBLPromises/include/ -ICocoaPodsService/Pods/PromisesObjC/Sources/FBLPromises/ -ICocoaPodsService/Pods/PromisesObjC/ -ICocoaPodsService/generated/PromisesObjC/ -ICocoaPodsService/Pods/GoogleUtilities/ -ICocoaPodsService/generated/Privacy/ -ICocoaPodsService/Pods/GoogleUtilities/GoogleUtilities/Environment/Public/GoogleUtilities/ -ICocoaPodsService/Pods/GoogleUtilities/GoogleUtilities/Environment/Public/ -ICocoaPodsService/Pods/GoogleUtilities/third_party/IsAppEncrypted/Public/ -ICocoaPodsService/Pods/GoogleUtilities/third_party/IsAppEncrypted/ -ICocoaPodsService/Pods/GoogleUtilities/ -ICocoaPodsService/generated/Environment/ -ICocoaPodsService/Pods/GoogleUtilities/GoogleUtilities/Logger/Public/GoogleUtilities/ -ICocoaPodsService/Pods/GoogleUtilities/GoogleUtilities/Logger/Public/ -ICocoaPodsService/Pods/GoogleUtilities/ -ICocoaPodsService/generated/Logger/ -ICocoaPodsService/Pods/GoogleUtilities/GoogleUtilities/UserDefaults/Public/GoogleUtilities/ -ICocoaPodsService/Pods/GoogleUtilities/GoogleUtilities/UserDefaults/Public/ -ICocoaPodsService/Pods/GoogleUtilities/ -ICocoaPodsService/generated/UserDefaults/ -ICocoaPodsService/Pods/GoogleUtilities/GoogleUtilities/NSData+zlib/Public/GoogleUtilities/ -ICocoaPodsService/Pods/GoogleUtilities/GoogleUtilities/NSData+zlib/Public/ -ICocoaPodsService/Pods/GoogleUtilities/ -ICocoaPodsService/generated/NSData+zlib/ -ICocoaPodsService/Pods/FirebaseCoreInternal/ -ICocoaPodsService/generated/FirebaseCoreInternal/ -ICocoaPodsService/Pods/FirebaseCore/FirebaseCore/Sources/Public/FirebaseCore/ -ICocoaPodsService/Pods/FirebaseCore/FirebaseCore/Sources/Public/ -ICocoaPodsService/Pods/FirebaseCore/FirebaseCore/Sources/ -ICocoaPodsService/Pods/FirebaseCore/FirebaseCore/ -ICocoaPodsService/Pods/FirebaseCore/FirebaseCore/Extension/ -ICocoaPodsService/Pods/FirebaseCore/ -ICocoaPodsService/generated/FirebaseCore/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsIDController/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Public/FirebaseInstallations/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Public/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Private/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsAPI/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Errors/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/IIDMigration/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseInstallations/Source/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseCore/Extension/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseCore/ -ICocoaPodsService/Pods/FirebaseInstallations/ -ICocoaPodsService/generated/FirebaseInstallations/ -I/usr/local/extender/sdk/37a4a8548850a7243055bb820e45580cfdae5f32/defoldsdk//include -I/usr/local/extender/sdk/37a4a8548850a7243055bb820e45580cfdae5f32/defoldsdk//sdk/include -I/usr/local/extender/sdk/37a4a8548850a7243055bb820e45580cfdae5f32/defoldsdk//ext/include CocoaPodsService/Pods/PromisesObjC/Sources/FBLPromises/FBLPromise+Do.m -obuild/FBLPromise+Do.m_7.owhereas the equivalent for a successful iOS build is:
Log from ios extension-firebase build
clang++ -c -arch arm64 -target arm-apple-darwin19 -m64 -O2 -g -stdlib=libc++ -miphoneos-version-min=11.0 -isysroot /usr/local/extender-stage/platformsdk/iPhoneOS16.2.sdk -nostdinc++ -DDLIB_LOG_DOMAIN="PROMISESOBJC" -DDDF_EXPOSE_DESCRIPTORS -DDM_PLATFORM_IOS -DDM_DEBUG -fobjc-arc --language=objective-c -fmodules -fmodule-name=FBLPromises -fmodule-map-file=/var/folders/2b/mpxyl1m54jvg2rcs2cnbsqxc0000gn/T/job9297218435465495137/CocoaPodsService/generated/PromisesObjC/module.modulemap -Iupload/ -Iupload/firebase/include/ -ICocoaPodsService/Pods/PromisesObjC/Sources/FBLPromises/include/ -ICocoaPodsService/Pods/PromisesObjC/Sources/FBLPromises/ -ICocoaPodsService/Pods/PromisesObjC/ -ICocoaPodsService/generated/PromisesObjC/ -ICocoaPodsService/Pods/GoogleUtilities/ -ICocoaPodsService/generated/Privacy/ -ICocoaPodsService/Pods/GoogleUtilities/GoogleUtilities/Environment/Public/GoogleUtilities/ -ICocoaPodsService/Pods/GoogleUtilities/GoogleUtilities/Environment/Public/ -ICocoaPodsService/Pods/GoogleUtilities/third_party/IsAppEncrypted/Public/ -ICocoaPodsService/Pods/GoogleUtilities/third_party/IsAppEncrypted/ -ICocoaPodsService/Pods/GoogleUtilities/ -ICocoaPodsService/generated/Environment/ -ICocoaPodsService/Pods/GoogleUtilities/GoogleUtilities/Logger/Public/GoogleUtilities/ -ICocoaPodsService/Pods/GoogleUtilities/GoogleUtilities/Logger/Public/ -ICocoaPodsService/Pods/GoogleUtilities/ -ICocoaPodsService/generated/Logger/ -ICocoaPodsService/Pods/GoogleUtilities/GoogleUtilities/UserDefaults/Public/GoogleUtilities/ -ICocoaPodsService/Pods/GoogleUtilities/GoogleUtilities/UserDefaults/Public/ -ICocoaPodsService/Pods/GoogleUtilities/ -ICocoaPodsService/generated/UserDefaults/ -ICocoaPodsService/Pods/GoogleUtilities/GoogleUtilities/NSData+zlib/Public/GoogleUtilities/ -ICocoaPodsService/Pods/GoogleUtilities/GoogleUtilities/NSData+zlib/Public/ -ICocoaPodsService/Pods/GoogleUtilities/ -ICocoaPodsService/generated/NSData+zlib/ -ICocoaPodsService/Pods/FirebaseCoreInternal/ -ICocoaPodsService/generated/FirebaseCoreInternal/ -ICocoaPodsService/Pods/FirebaseCore/FirebaseCore/Sources/Public/FirebaseCore/ -ICocoaPodsService/Pods/FirebaseCore/FirebaseCore/Sources/Public/ -ICocoaPodsService/Pods/FirebaseCore/FirebaseCore/Sources/ -ICocoaPodsService/Pods/FirebaseCore/FirebaseCore/ -ICocoaPodsService/Pods/FirebaseCore/FirebaseCore/Extension/ -ICocoaPodsService/Pods/FirebaseCore/ -ICocoaPodsService/generated/FirebaseCore/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsIDController/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Public/FirebaseInstallations/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Public/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Private/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsAPI/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/Errors/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/IIDMigration/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/InstallationsStore/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseInstallations/Source/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseCore/Extension/ -ICocoaPodsService/Pods/FirebaseInstallations/FirebaseCore/ -ICocoaPodsService/Pods/FirebaseInstallations/ -ICocoaPodsService/generated/FirebaseInstallations/ -ICocoaPodsService/frameworks/headers/arm64-ios/ -F/var/folders/2b/mpxyl1m54jvg2rcs2cnbsqxc0000gn/T/job9297218435465495137/CocoaPodsService/frameworks/lib/arm64-ios -I/usr/local/extender-stage/sdk/37a4a8548850a7243055bb820e45580cfdae5f32/defoldsdk//include -I/usr/local/extender-stage/sdk/37a4a8548850a7243055bb820e45580cfdae5f32/defoldsdk//sdk/include -I/usr/local/extender-stage/sdk/37a4a8548850a7243055bb820e45580cfdae5f32/defoldsdk//ext/include CocoaPodsService/Pods/PromisesObjC/Sources/FBLPromises/FBLPromise+Do.m -obuild/FBLPromise+Do.m_7.oI'm suspicious that a path to the Mac SDK is not specified with -isysroot, which would normally be the case, i.e. this is an empty objective-c file being built for osx in a test project:
Log from osx non-podfile objective-c file compile
clang++ -c -isystem /usr/local/extender/platformsdk/MacOSX13.1.sdk/usr/include/c++/v1 -DDLIB_LOG_DOMAIN="DEFOLDIMGUI" -DDDF_EXPOSE_DESCRIPTORS -DDM_PLATFORM_MACOS -DDM_PLATFORM_OSX -DGL_DO_NOT_WARN_IF_MULTI_GL_VERSION_HEADERS_INCLUDED -O2 -g -stdlib=libc++ -mmacosx-version-min=10.13 -isysroot /usr/local/extender/platformsdk/MacOSX13.1.sdk -nostdinc++ -fno-exceptions -fvisibility=hidden -Werror=format -arch arm64 -target arm64-apple-darwin19 -m64 -Iupload/imgui/include/ -Ibuild/imgui/ -Iupload/ -I/usr/local/extender/sdk/37a4a8548850a7243055bb820e45580cfdae5f32/defoldsdk//include -I/usr/local/extender/sdk/37a4a8548850a7243055bb820e45580cfdae5f32/defoldsdk//sdk/include -I/usr/local/extender/sdk/37a4a8548850a7243055bb820e45580cfdae5f32/defoldsdk//ext/include upload/imgui/src/empty_file.m -obuild/empty_file.m_0.oNB this is when running a local standalone server, on this commit
The text was updated successfully, but these errors were encountered: