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

[SR-2977] materializeForSet not getting synthesized for subscript #45567

Closed
swift-ci opened this issue Oct 18, 2016 · 10 comments
Closed

[SR-2977] materializeForSet not getting synthesized for subscript #45567

swift-ci opened this issue Oct 18, 2016 · 10 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself optimized only Flag: An issue whose reproduction requires optimized compilation

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Oct 18, 2016

Previous ID SR-2977
Radar None
Original Reporter Akalyn (JIRA User)
Type Bug
Status Closed
Resolution Done

Attachment: Download

Environment

Swift 3 and Xcode 8 (AppStore ver.)

Additional Detail from JIRA
Votes 1
Component/s Compiler
Labels Bug, OptimizedOnly
Assignee None
Priority Medium

md5: b3c8ac5929faf08678674b65a36feb3b

Issue Description:

results.sorted { $0.status!.intValue < $1.status!.intValue }

, where

results: [Task]
status: NSNumber?

gives me error during Archive:

Undefined symbols for architecture armv7:
  "Swift.UnsafeMutableBufferPointer.(subscript.materializeForSet : (Swift.Int) -> A).(closure #&#8203;1)", referenced from:
      function signature specialization <Arg[2] = Exploded> of generic specialization <Swift.UnsafeMutableBufferPointer<TODOApp.Task> with Swift.UnsafeMutableBufferPointer<TODOApp.Task> : Swift.MutableCollection in Swift and Swift.UnsafeMutableBufferPointer<TODOApp.Task> : Swift.RandomAccessCollection in Swift> of Swift._siftDown <A where A: Swift.MutableCollection, A: Swift.RandomAccessCollection> (inout A, index : A.Index, subRange : Swift.Range<A.Index>, by : inout (A.Iterator.Element, A.Iterator.Element) -> Swift.Bool) -> () in TasksLocalDataManager.o
      function signature specialization <Arg[1] = Exploded> of generic specialization <Swift.UnsafeMutableBufferPointer<TODOApp.Task> with Swift.UnsafeMutableBufferPointer<TODOApp.Task> : Swift.MutableCollection in Swift and Swift.UnsafeMutableBufferPointer<TODOApp.Task> : Swift.RandomAccessCollection in Swift> of Swift._heapSort <A where A: Swift.MutableCollection, A: Swift.RandomAccessCollection> (inout A, subRange : Swift.Range<A.Index>, by : inout (A.Iterator.Element, A.Iterator.Element) -> Swift.Bool) -> () in TasksLocalDataManager.o
      function signature specialization <Arg[1] = Exploded> of generic specialization <Swift.UnsafeMutableBufferPointer<TODOApp.Task> with Swift.UnsafeMutableBufferPointer<TODOApp.Task> : Swift.MutableCollection in Swift and Swift.UnsafeMutableBufferPointer<TODOApp.Task> : Swift.RandomAccessCollection in Swift> of Swift._partition <A where A: Swift.MutableCollection, A: Swift.RandomAccessCollection> (inout A, subRange : Swift.Range<A.Index>, by : inout (A.Iterator.Element, A.Iterator.Element) -> Swift.Bool) -> A.Index in TasksLocalDataManager.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@belkadan
Copy link
Contributor

Can you attach the whole project here?

@swift-ci
Copy link
Collaborator Author

Comment by Artem Kalinovsky (JIRA)

I guess, I can send over link with project at your email.

@belkadan
Copy link
Contributor

Is the concern over attaching it here just size, or privacy as well? If the latter, is it all right to attach it to a Radar? That'll be easier for us to hand it to whoever works on it, but keep it within Apple's bug-tracking system.

@swift-ci
Copy link
Collaborator Author

Comment by Darren Mo (JIRA)

I have this issue too; I was just about to create a bug report. It only fails to link when Whole Module Optimization is turned on. I tried every workaround I could think of, to no avail. Also couldn’t reproduce in a sample project.

Here’s the error message for mine:

Undefined symbols for architecture x86_64:
  "Swift.UnsafeMutableBufferPointer.(subscript.materializeForSet : (Swift.Int) -> A).(closure #&#8203;1)", referenced from:
      function signature specialization <Arg[2] = Exploded> of generic specialization <Swift.UnsafeMutableBufferPointer<Swift.String> with Swift.UnsafeMutableBufferPointer<Swift.String> : Swift.MutableCollection in Swift and Swift.UnsafeMutableBufferPointer<Swift.String> : Swift.RandomAccessCollection in Swift> of Swift._siftDown <A where A: Swift.MutableCollection, A: Swift.RandomAccessCollection, A.Iterator.Element: Swift.Comparable> (inout A, index : A.Index, subRange : Swift.Range<A.Index>) -> () in MyFile.o

Also, there is a StackOverflow question for this error and a Developer Forum post.

@swift-ci
Copy link
Collaborator Author

Comment by Artem Kalinovsky (JIRA)

Hi all,

@belkadan, I've attached sample project, where I reproduced this issue

@swift-ci
Copy link
Collaborator Author

Comment by Artem Kalinovsky (JIRA)

fumoboy007 (JIRA User) , thanks for links!

@swift-ci
Copy link
Collaborator Author

Comment by Bastiaan Marinus van de Weerd (JIRA)

FYI, I ran into this same issue yesterday using Xcode 8.0, and noticed it was resolved using Xcode 8.1 (GM seed, 8T61a).

@swift-ci
Copy link
Collaborator Author

Comment by Artem Kalinovsky (JIRA)

bm-w (JIRA User) ok, waiting for Xcode 8.1 release...

@swift-ci
Copy link
Collaborator Author

Comment by Darren Mo (JIRA)

Confirmed, fixed in Xcode 8.1!

@swift-ci
Copy link
Collaborator Author

Comment by Bastiaan Marinus van de Weerd (JIRA)

Yes, in my case as well.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself optimized only Flag: An issue whose reproduction requires optimized compilation
Projects
None yet
Development

No branches or pull requests

2 participants