Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

xctool fails to query the list of test cases when building w/ ONLY_ACTIVE_ARCH=NO #203

Closed
fpotter opened this issue Oct 11, 2013 · 7 comments
Assignees
Labels

Comments

@fpotter
Copy link
Contributor

fpotter commented Oct 11, 2013

@sandervandenbrink discovered the problem (see #170 (comment))

As of the Xcode 5 GM, if ONLY_ACTIVE_ARCH=NO is supplied when doing simulator builds, xcodebuild/xctool will produce Universal simulator binaries (i.e. i386 + x86_64).

The problem happens when we need to query the test cases in an Application Test bundle. To do that, we we have to load the main .app while injecting otest-query-ios-dylib.dylib. With ONLY_ACTIVE_ARCH=NO, the .app is Universal, and when we launch it, we'll get the x86_64 flavor by default. But, since otest-query-ios-dylib.dylib is still i386 only, the dylib fails to load and the process crashes.

Short-term fix:
Force the i386 flavor. See #200. The downside is that we won't properly support the 64-bit simulator, but that's OK since a whole bunch of other work has to happen to support that anyway.

Long-term fix:
Make otest-query and otest-shim Universal binaries, and use the -destination argument to decide which flavor to use.

If destination is "iPhone Retina (4-inch 64-bit)", we should force the x86_64 flavor. Otherwise, we should force the i386 flavor.

@ghost ghost assigned ryanrhee Oct 14, 2013
@ryanrhee
Copy link
Contributor

How should we go about making a universal binary for things like otest-query-ios? The biggest problem is that we need to up the version of iOS using $IOS_SDK_VERSION. I think setting that to 7.0 would drop support for iOS 5 & iOS 6, which is a pretty shitty solution. On the other hand, we get a bunch of undefined symbols if we try to build with support for iOS 5 && iOS 6. :(

@ryanrhee
Copy link
Contributor

I have an idea -- we can build a 32-bit version targeting 5.0 and a 64-bit targeting 7.0, and lipo them together. I think this should cover all the cases.

@ryanrhee
Copy link
Contributor

A PR for building universal binaries is up: #211

@ryanrhee
Copy link
Contributor

A PR that enables 64-bit application tests via -destination is up: #217

@ryanrhee
Copy link
Contributor

Seems like the combination of #211 and #217 also fixes this issue? I'm not exactly sure how this issue differs from #205.
Edit Nvm, this also has to do with application tests. Coincidentally, it seems like the fix for this and #204 are identical.

@jessesquires
Copy link

Hey @fpotter - any updates on this? not sure if this is related: travis-ci/travis-ci#2179

@ghost
Copy link

ghost commented Aug 5, 2015

Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.

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

No branches or pull requests

4 participants