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

RateLimit is not Bitcode compatible #18

Closed
calebd opened this issue Nov 26, 2015 · 15 comments
Closed

RateLimit is not Bitcode compatible #18

calebd opened this issue Nov 26, 2015 · 15 comments

Comments

@calebd
Copy link
Contributor

calebd commented Nov 26, 2015

This one is hard to explain. If I upload a build that both contains RateLimit and has Bitcode enabled I get this:

screen shot 2015-11-25 at 11 31 07 pm

Thanks to @mattbischoff, I found the following message in this developer forum thread:

To see the error, achive/export/developer enable bitcode gen. Then when it errors, click the 'view logs' button to see the problem.

And indeed there it was:

error: Ld: cd /var/folders/1g/fssqm74d49qb4m09k14h_8780000gn/T/tempdVAWUo
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" "-arch" "armv7" "-dylib" "-compatibility_version" "1.0.0" "-current_version" "1.0.0.0.0" "-install_name" "@rpath/RateLimit.framework/RateLimit" "-ios_version_min" "8.0.0" "-rpath" "@executable_path/Frameworks" "-rpath" "@loader_path/Frameworks" "-dead_strip" "-application_extension" "-syslibroot" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk" "-sdk_version" "9.1.0" "-ignore_auto_link" "-allow_dead_duplicates" "1.o" "2.o" "3.o" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk/usr/lib/libSystem.B.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation.tbd" "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk/usr/lib/libobjc.A.tbd" "/var/folders/1g/fssqm74d49qb4m09k14h_8780000gn/T/ipatool20151125-21309-1yedmou/MachOs/iphoneos/armv7/(dylibs)/libswiftCore.dylib" "/var/folders/1g/fssqm74d49qb4m09k14h_8780000gn/T/ipatool20151125-21309-1yedmou/MachOs/iphoneos/armv7/(dylibs)/libswiftDarwin.dylib" "/var/folders/1g/fssqm74d49qb4m09k14h_8780000gn/T/ipatool20151125-21309-1yedmou/MachOs/iphoneos/armv7/(dylibs)/libswiftDispatch.dylib" "/var/folders/1g/fssqm74d49qb4m09k14h_8780000gn/T/ipatool20151125-21309-1yedmou/MachOs/iphoneos/armv7/(dylibs)/libswiftFoundation.dylib" "/var/folders/1g/fssqm74d49qb4m09k14h_8780000gn/T/ipatool20151125-21309-1yedmou/MachOs/iphoneos/armv7/(dylibs)/libswiftObjectiveC.dylib" "-L" "/var/folders/1g/fssqm74d49qb4m09k14h_8780000gn/T/ipatool20151125-21309-1yedmou/MachOs/iphoneos/armv7/(dylibs)" "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.0.0/lib/darwin/libclang_rt.ios.a" "-o" "/private/var/folders/1g/fssqm74d49qb4m09k14h_8780000gn/T/RateLimitkGMPU9/RateLimit.armv7.out" 
-= Output =-
Undefined symbols for architecture armv7:
  "_llvm_gcov_init", referenced from:
      ___hidden#311_ in 3.o
  "_llvm_gcda_start_file", referenced from:
      ___hidden#309_ in 3.o
  "_llvm_gcda_summary_info", referenced from:
      ___hidden#309_ in 3.o
  "_llvm_gcda_end_file", referenced from:
      ___hidden#309_ in 3.o
ld: symbol(s) not found for architecture armv7
Exited with 1


error: Failed to compile bundle: /var/folders/1g/fssqm74d49qb4m09k14h_8780000gn/T/RateLimitkGMPU9/RateLimit.armv7.xar}

I'm now trying to figure out exactly what these symbols are and why they are allegedly referenced from RateLimit. I will post back here when I know more.

@calebd
Copy link
Contributor Author

calebd commented Nov 26, 2015

Those symbols appear to be related to the GCC_GENERATE_TEST_COVERAGE_FILES build setting which is enabled. Is that needed @soffes? If not I can submit a pull request that disables that build setting.

@soffes
Copy link
Owner

soffes commented Nov 29, 2015

Go for it

@calebd
Copy link
Contributor Author

calebd commented Nov 30, 2015

I don't know how to fix this. I disabled the build setting and get the same error. I can't find any other build settings and I don't see anything suspicious in the build log. @soffes can you think of any reason the compiler would emit coverage-related symbols for this framework?

@soffes
Copy link
Owner

soffes commented Nov 30, 2015

No idea :(

You could try just deleting the project and making a new one maybe. It's such a simple framework. Annoying that it's causing so much trouble.

@calebd
Copy link
Contributor Author

calebd commented Nov 30, 2015

Ok. I'll take a look at it again later. Thanks!

@mbbischoff
Copy link

@soffes
Copy link
Owner

soffes commented Nov 30, 2015

Good call @mattbischoff!

@mbbischoff
Copy link

😄

@calebd
Copy link
Contributor Author

calebd commented Nov 30, 2015

I don't think that's it. I have coverage turned on in other frameworks and those do not have this problem.

I found another coverage-related build setting that was turned on that is off by default in new Xcode projects.

@calebd
Copy link
Contributor Author

calebd commented Nov 30, 2015

Both of the build settings referenced in the above commits were added in 3f34224.

@calebd
Copy link
Contributor Author

calebd commented Nov 30, 2015

Boom. Disabling those settings fixes the problem. Do you still use Slather @soffes? It appears as though these settings and Bitcode are mutually exclusive. If you want I can just revert 3f34224.

@soffes
Copy link
Owner

soffes commented Nov 30, 2015

@calebd I used too. Good to know. cc @marklarr

@soffes
Copy link
Owner

soffes commented Nov 30, 2015

Done

@soffes soffes closed this as completed Nov 30, 2015
@marklarr
Copy link

@soffes, I remember that an issue was opened for this a while back, SlatherOrg/slather#73. It sounds like we should definitely come up with a solution

@soffes
Copy link
Owner

soffes commented Nov 30, 2015

Cool. Wanted to make sure you knew about it @marklarr 😄

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

No branches or pull requests

4 participants