Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode 13 Beta 1 Archive Error #913

Closed
1 task done
adamtharani opened this issue Jun 8, 2021 · 10 comments · Fixed by #915
Closed
1 task done

Xcode 13 Beta 1 Archive Error #913

adamtharani opened this issue Jun 8, 2021 · 10 comments · Fixed by #915
Labels

Comments

@adamtharani
Copy link

adamtharani commented Jun 8, 2021

  • I have read CONTRIBUTING and have done my best to follow them.

What did you do?

Carthage bootstrap or Archive the Nimble-macOS scheme for Apple Silicon, Intel

What did you expect to happen?

Carthage and Archiving to complete successfully

What actually happened instead?

Build Failure

uplicate symbol '_NDR_record' in:
    /Users/adamtharani/Library/Developer/Xcode/DerivedData/Nimble-axqdeefwusmvxqglfhxhyotpbetj/Build/Intermediates.noindex/ArchiveIntermediates/Nimble-macOS/IntermediateBuildFilesPath/Nimble.build/Release/Nimble-macOS.build/Objects-normal/x86_64/CwlDarwinDefinitions.o
    /Users/adamtharani/Library/Developer/Xcode/DerivedData/Nimble-axqdeefwusmvxqglfhxhyotpbetj/Build/Intermediates.noindex/ArchiveIntermediates/Nimble-macOS/IntermediateBuildFilesPath/Nimble.build/Release/Nimble-macOS.build/Objects-normal/x86_64/CwlCatchBadInstruction.o
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Environment

List the software versions you're using:

  • Quick: ?.?.?
  • Nimble: Main Branch
  • Xcode Version: Version 13.0 beta (13A5154h)
  • Swift Version: Xcode Default

Please also mention which package manager you used and its version. Delete the
other package managers in this list:

  • Carthage: 0.38.0
  • Swift Package Manager ?.?.? (swiftpm-???) (Use swift build --version in Terminal)

Project that demonstrates the issue

Please link to a project we can download that reproduces the issue. Feel free
to delete this section if it's not relevant to the issue (eg - feature request).

The project should be short, self-contained, and correct example.

@ikesyo
Copy link
Member

ikesyo commented Jun 10, 2021

Thanks for reporting this! I submitted a potential fix in #915. Could you try that branch?

@ikesyo ikesyo added the bug label Jun 10, 2021
@tattn
Copy link

tattn commented Jun 10, 2021

@ikesyo Thank you for your quick fix!
I tried #915, and then carthage bootstrap was successful 🎉

@nmccann
Copy link
Contributor

nmccann commented Jun 26, 2021

I've unfortunately run into the same issue using Xcode 13 Beta 2, and the latest from the main branch, however in my case I'm using Quick/Nimble as a Swift Package Manager dependency. Upon building and running my XCUI tests for an iOS app, I get the following error:

duplicate symbol '_NDR_record' in:
    /Users/USER/Library/Developer/Xcode/DerivedData/PROJECT/Build/Intermediates.noindex/CwlPreconditionTesting.build/Release-iphonesimulator/CwlPreconditionTesting.build/Objects-normal/x86_64/CwlBadInstructionException.o
    /Users/USER/Library/Developer/Xcode/DerivedData/PROJECT/Build/Intermediates.noindex/CwlPreconditionTesting.build/Release-iphonesimulator/CwlPreconditionTesting.build/Objects-normal/x86_64/CwlCatchBadInstruction.o
ld: 1 duplicate symbol for architecture x86_64

I was able to bypass the issue by creating a local copy of Nimble, and commenting out it's dependency on CwlPreconditionTesting (and any usages of it). I then tried to narrow things down further by modifying a local copy of CwlPreconditionTesting - if I comment out this line - I no longer get the build error. I haven't yet figured out how to resolve it without commenting out what I assume is a necessary line.

Any suggestions would be much appreciated - thanks!

Edit: Interestingly, my unit tests build and run successfully, but my UI tests get this build issue.

@ikesyo
Copy link
Member

ikesyo commented Jun 28, 2021

Release-iphonesimulator

I'm not sure why your UI test target and it's dependencies are built using Release configuration 🤔

@nmccann
Copy link
Contributor

nmccann commented Jun 28, 2021

🤦 That's a good catch - I'll have to see if changing to debug makes a difference.

I've recently moved from Debug builds to Release builds for my UI tests because of the significant decrease in run time - I've noticed with Debug builds, the tests spend a lot of time "waiting for app to idle" - in Release mode they run almost 4-5 times faster. I would have preferred to have them in Debug, but the time savings were hard to ignore.

Edit: And just to clarify, in these cases where the UI tests are "waiting for app to idle" - there doesn't appear to be anything preventing it from continuing - it'll just wait on a blank form (with no loading) for tens of seconds before it actually starts to fill in the form. That issue happens on both Xcode 12.5 and Xcode 13 Beta 2.

@nmccann
Copy link
Contributor

nmccann commented Jun 28, 2021

Switching to a Debug configuration resolved the issue I was having - I also remembered that it wasn't the Debug configuration that was resulting in the "waiting for app to idle" issues, instead those were due to having the debugger attached. So with a Debug configuration and the debugger disabled, it built fine and ran at the same speeds I was seeing before.

Thank you for the help!

@ElieJacquelin
Copy link

I seem to be hitting the same issue on simulator build only, let me know if you want me to create a brand new issue.

What did you do?

Trying to build unit tests for simulator using XCode 13 Beta 3 and using commit ae8b0845230da664025e471c92a8b2d0621350c3 of Nimble

What did you expect to happen?

Nimble can be successfully compiled.

What actually happened instead?

Build fails with the following error

duplicate symbol '_NDR_record' in:
    /Users/xxx/Library/Developer/Xcode/DerivedData/MyApp-ecpvoacgdbonzagbvaxvtiddtnvl/Build/Intermediates.noindex/Pods.build/UnitTest-iphonesimulator/Nimble.build/Objects-normal/x86_64/AdapterProtocols.o
    /Users/xxx/Library/Developer/Xcode/DerivedData/MyApp-ecpvoacgdbonzagbvaxvtiddtnvl/Build/Intermediates.noindex/Pods.build/UnitTest-iphonesimulator/Nimble.build/Objects-normal/x86_64/CwlDarwinDefinitions.o
ld: 1 duplicate symbol for architecture x86_64

Note This happens only when trying to build for the simulator, running tests on a physical device does not trigger the error

Environment

List the software versions you're using:

  • Quick: 4.0.0
  • Nimble: 9.2.0 Commit ae8b084 (I confirm that my local copy in the pods folder does contain the changes of that commit)
  • Xcode Version: 13.0 beta 3 (13A5192j)
  • Swift Version: Xcode Default

Please also mention which package manager you used and its version. Delete the
other package managers in this list:

  • Cocoapods: 1.10.1

@serges147
Copy link

Still exactly the same problem (with xcode 13.beta4, and Nimble main branch).

@serges147
Copy link

@ikesyo 👆

@freddiebo
Copy link

@serges147 i created new issue #919

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

Successfully merging a pull request may close this issue.

7 participants