0

I'm suddenly getting errors and warnings in a build that was working fine a few weeks ago - I went on holiday, came back, no workie. The only one of concern is this error:

ld: warning: ignoring file /Users/maury/Develop/MARL/ThirdParty/Flurry/libFlurry_4.2.3.a, missing required architecture x86_64 in file /Users/maury/Develop/MARL/ThirdParty/Flurry/libFlurry_4.2.3.a (4 slices)

Either the error string is wrong and it's actually looking for some other architecture, or I'm very confused as to what it's trying to do. Why would an iOS app be looking for a x86_64 arch? Is this something to do with the simulator? If so, why didn't I get this error two weeks ago?

I'm building for iOS7 on XCode5/MacOS10.9.x

Maury Markowitz
  • 9,082
  • 11
  • 46
  • 98

1 Answers1

4

If you upgraded Xcode to 5.1, you are getting that because the default architectures for your build now include 64-bit, but your library doesn't support it, so it can't link.

You can override the default by setting Architectures (ARCHS) in your build settings to something else, probably $(ARCHS_STANDARD_32_BIT)

Something like this:

enter image description here

z00b
  • 356
  • 2
  • 3
  • If the setting you mean is the one in the project file, it is already set to ARCHS_STANDARD_32_BIT. – Maury Markowitz Mar 20 '14 at 16:12
  • Yeah, that should be the one. What is the output of: `xcodebuild -project -scheme -showBuildSettings | grep ARCHS` – z00b Mar 20 '14 at 16:36
  • What should I put in for the scheme? – Maury Markowitz Mar 20 '14 at 16:37
  • Whichever one you are building in Xcode. You can find the options with `xcodebuild -project -list` – z00b Mar 20 '14 at 16:40
  • Holy crap could they make this more confusing? I get two projects and schemes, both with the same name. Any attempt to use them with -project or -scheme says they don't exist. So I just removed those to make it use the defaults, and I get: – Maury Markowitz Mar 20 '14 at 16:45
  • ARCHS = armv7 armv7s arm64 ARCHS_STANDARD = armv7 armv7s arm64 ARCHS_STANDARD_32_64_BIT = armv7 armv7s arm64 ARCHS_STANDARD_32_BIT = armv7 armv7s ARCHS_STANDARD_64_BIT = arm64 ARCHS_STANDARD_INCLUDING_64_BIT = armv7 armv7s arm64 ARCHS_UNIVERSAL_IPHONE_OS = armv7 armv7s arm64 VALID_ARCHS = arm64 armv7 armv7s – Maury Markowitz Mar 20 '14 at 16:45
  • Everything looks fine, and I still don't understand why it would complain about x86_64? – Maury Markowitz Mar 20 '14 at 16:46
  • `ARCHS` is what gets used in the build and includes 64-bit in your settings. So it doesn't look like it's being overridden. I'll edit the answer to include a screenshot from XCode. – z00b Mar 20 '14 at 16:51
  • Again though, why would x86_64 be a problem? This is not an x86 project, and x86 is not listed in any of the ARCH types. – Maury Markowitz Mar 20 '14 at 19:05
  • xcode uses a simulator, not an emulator, so it compiles for the simulator using the arch of your machine. the definition of `ARCHS_STANDARD` in that case will also include 64 bit (x86_64). if you use `ARCHS_STANDARD_32_BIT` it should limit to i386. – z00b Mar 20 '14 at 19:11
  • Very interesting Z00b, that's a bit of underlying tech I was unaware of. Actually, given this, it's fascinating they managed to make it work at all. – Maury Markowitz Mar 23 '14 at 15:19