Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Compiler warnings with installed static framework — Module debugging should be disabled when shipping static libraries #4338

Closed
1ec5 opened this issue Mar 15, 2016 · 1 comment
Assignees
Labels
build iOS Mapbox Maps SDK for iOS
Milestone

Comments

@1ec5
Copy link
Contributor

1ec5 commented Mar 15, 2016

When I install the Mapbox iOS SDK static framework into a project and build in Xcode 7.3b5, I get 21 errors that look like this:

while processing /Users/mxn/Documents/Playroom/Sedan/Mapbox.framework/Mapbox(reachability.o):
warning: /var/folders/cl/8cgpg37n5cl78pjkbpgml94w0000gn/C/org.llvm.clang.mxn/ModuleCache/2M9FX5S5W7EA5/Foundation-3DFYNEBRQSXST.pcm: No such file or directory
note: Module debugging should be disabled when shipping static libraries.

I’m unaware of any other symptoms, but we should set CLANG_ENABLE_MODULE_DEBUGGING=NO when building the static framework with debug symbols:

When this setting is enabled, clang will use the shared debug info available in clang modules and precompiled headers. Results in smaller build artifacts, faster compile times, and more complete debug info. This should only be disabled when building static libraries with debug info for distribution. [CLANG_ENABLE_MODULE_DEBUGGING, -gmodules]

/cc @boundsj @friedbunny

@1ec5 1ec5 added iOS Mapbox Maps SDK for iOS build labels Mar 15, 2016
@1ec5 1ec5 added this to the ios-v3.2.0 milestone Mar 15, 2016
1ec5 added a commit that referenced this issue Mar 18, 2016
There is now only one instance of mbgl::OfflineFileSource, created when the shared MGLOfflineStorage object is initialized. Also create and use the shared MGLOfflineStorage object when initializing an MGLMapView object. The unified cache file is located in a subdirectory of Application Support, where the SDK has control over the file’s lifetime. The subdirectory is already named after the host application’s bundle identifier, ensuring that each Mapbox-powered application has an independent tile limit. If there’s an ambient cache in a subdirectory of Caches, delete it. If there’s an offline cache in a subdirectory of Documents on iOS or Caches on OS X, move it to the unified cache location in a subdirectory of Application Support.

Fixes the iOS/OS X side of #4338.
@boundsj boundsj self-assigned this Mar 20, 2016
@boundsj
Copy link
Contributor

boundsj commented Mar 22, 2016

@1ec5 I'm unable to repro when building the SDK with Xcode 7.3 and compiling the static Mapbox.framework in client Objective-C or Swift apps in Xcode 7.2.x or Xcode 7.3. I'm also unable to repro the issue when building the SDK with Xcode 7.2.x and compiling in client apps in 7.2 or 7.3.

Closing now and will reopen and look again if a clear repro is found.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

No branches or pull requests

2 participants