Carthage linker error

Created on 19 Jan 2021  路  11Comments  路  Source: Carthage/Carthage

  • carthage version: 0.36.1
  • xcodebuild -version: 12C33
  • Are you using --no-build? No
  • Are you using --no-use-binaries? No
  • Are you using --use-submodules? No
  • Are you using --cache-builds? No

After upgrading to latest carthage version when I compile the project it fails. I have copy script in Run Scrip
/usr/local/bin/carthage copy-frameworks if I comment that out it compiles otherwise I get following error:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: one of -create, -thin <arch_type>, -extract <arch_type>, -remove <arch_type>, -replace <arch_type> <file_name>, -verify_arch <arch_type> ... , -archs, -info, or -detailed_info must be specified

This work working fine in 0.36.0

Most helpful comment

A number of Loop users have been experiencing this as well, and it has been established that pinning Carthage to 0.36.0 does work around the issue:
https://github.com/LoopKit/Loop/issues/1468

Same carthage command (carthage copy-frameworks):
https://github.com/LoopKit/Loop/blob/18af414396f5eaad1f06b8efff369b77143e5f94/Scripts/copy-frameworks.sh#L40-L41

Same error:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: one of -create, -thin <arch_type>, -extract <arch_type>, -remove <arch_type>, -replace <arch_type> <file_name>, -verify_arch <arch_type> ... , -archs, -info, or -detailed_info must be specified

Would be nice to see this one addressed in 0.37.0 if that's the next release. Thanks!

All 11 comments

A number of Loop users have been experiencing this as well, and it has been established that pinning Carthage to 0.36.0 does work around the issue:
https://github.com/LoopKit/Loop/issues/1468

Same carthage command (carthage copy-frameworks):
https://github.com/LoopKit/Loop/blob/18af414396f5eaad1f06b8efff369b77143e5f94/Scripts/copy-frameworks.sh#L40-L41

Same error:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: one of -create, -thin <arch_type>, -extract <arch_type>, -remove <arch_type>, -replace <arch_type> <file_name>, -verify_arch <arch_type> ... , -archs, -info, or -detailed_info must be specified

Would be nice to see this one addressed in 0.37.0 if that's the next release. Thanks!

Same problem here. We have to pin to 0.36.0.

I'm experiencing this same issue since upgrading from 0.36.0 to 0.37.0. Based on the error message, it looks like /usr/bin/xcrun <input_file> -output <output_file> is being executed (instead of the previous /usr/bin/xcrun <input_file> <command> -output <output_file>). I'm not sure what the actual <command> should be, but it seems to now be being omitted.

Given this bug was seemingly introduced in 0.36.1, I went looking at the diff and I think that https://github.com/Carthage/Carthage/pull/3066 is the PR that likely introduced the bug (given the various changes involving xcrun lipo contained within).

@tmspzz Pinging you since you were involved in that PR - does this seem like the right theory?

@danielrbrowne Good analysis, this seems right.

Hey guys, are there any news about this topic? Unfortunately I can't stick to 0.36.0 since it fails building the Bolts-ObjC framework.

@tmspzz (or anyone else) - is anyone following up on my comment above? Despite locally working around this myself by using the 0.36.0 release, I am now hitting this issue again because Bitrise (the mobile CI solution my team uses) has now upgraded from 0.35.0 to 0.37.0.

If the issue is not a bug introduced in that PR and instead by design due to a change in how lipo is invoked via the Carthage Copy Framework build phase in our project files, then any necessary changes to the build phase should be communicated here IMHO.

Another example of the same issue in the wild: https://www.loopnlearn.org/carthage-0-36-0/

@danielrbrowne no, this is not being addressed. I haven't looked into it, but I don't believe this was intentional. The missing command is most probably lipo.

I suggest trying to take matters into your own hands and submitting a PR.

@tmspzz Ok that's fair enough. I will take a look at the logic in the diff I mentioned and see if I can figure it out.

FWIW, the bug appears to be that a required argument has gone missing from a call to lipo (rather than the entire call missing) based on the error message.

I think this should be fixed as of #3155 and v0.38.0. Feel free to reopen if you're still having issues.

Was this page helpful?
0 / 5 - 0 ratings