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 14 & iOS 16 compile errors #189

Open
1 task done
stevenen opened this issue Aug 5, 2022 · 14 comments
Open
1 task done

Xcode 14 & iOS 16 compile errors #189

stevenen opened this issue Aug 5, 2022 · 14 comments

Comments

@stevenen
Copy link

stevenen commented Aug 5, 2022

The libray doesn't compile under Xcode 14 and iOS 16 beta 4

Swift Algorithms version: 1.0.0

Checklist

  • [x ] If possible, I've reproduced the issue using the main branch of this package
  • I've searched for existing GitHub issues
@mdznr
Copy link
Contributor

mdznr commented Aug 5, 2022

What build errors are you seeing?

@Arnold75
Copy link

Arnold75 commented Aug 21, 2022

Screen Shot 2022-08-21 at 10 42 51

I think same issue here, a ton of "let" property... use self.init in the pod files, something like 50 errors in the various files

/and already did a complete reinstall of Xcode/

@stevenen
Copy link
Author

same errors as @Arnold75 shown in the comment above.

@Arnold75
Copy link

@stevenen I tried all the solutions on the following page:
https://stackoverflow.com/questions/46690619/build-fails-with-command-failed-with-a-nonzero-exit-code?page=1&tab=scoredesc#tab-top

Saw that one? maybe one of them helps you... no success for me ... still clueless, lost hours over this. Even uninstalled xcode, the derived data folder, ... no success

@dhruvilpatel07
Copy link

dhruvilpatel07 commented Sep 13, 2022

@Arnold75 or @stevenen were you able to fix this issue? I'm getting same error as above in Xcode 14.0!! Please let me know.

@idemche
Copy link

idemche commented Sep 14, 2022

Screen Shot 2022-08-21 at 10 42 51

I think same issue here, a ton of "let" property... use self.init in the pod files, something like 50 errors in the various files
/and already did a complete reinstall of Xcode/

If you use Cocoapods, try adding the following into post_install do |installer| in Podfile so it looks like:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
        if target.name == "SwiftAlgorithms"
           config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'NO'
       end
    end
  end
end

and then run pod install. That might help

@jonasrotilli
Copy link

if target.name == "SwiftAlgorithms"
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'NO'
end

That solved it for me! I use cocoaPod.
Thanks!

@djs-code
Copy link

djs-code commented Sep 22, 2022

Seeing these same errors as well when trying to pull in the Charts library (4.1.0) via Carthage. We're building this as part of an SDK we distribute, so we require BUILD_LIBRARY_FOR_DISTRIBUTION to be enabled.

@djs-code
Copy link

It seems that decorating the culprit Sequences and Collections (e.g. AdjacentPairsSequence, AdjacentPairsCollection, etc) with the @frozen modifier fixes this. Alas, ABI Stability isn't quite my forte.

@natecook1000 @xwu and anyone else who may know, does application of the @frozen decorator sound like the Correct™ approach here? If so, I'd be happy to follow up with a PR. Otherwise, I'll turn my attention to Charts.

@MikePetitfils
Copy link

Same issue here. Any update on this ?

@ansonlv
Copy link

ansonlv commented Oct 27, 2022

Any update on this? We need to use this framework in our SDK. Please update it to support BUILD_LIBRARY_FOR_DISTRIBUTION = Yes.

@dung-nguyen1
Copy link

Any update on this as we using framework in our SDK with BUILD_LIBRARY_FOR_DISTRIBUTION = Yes.

@niorko
Copy link

niorko commented Nov 24, 2022

We are also using this library in SDK and we require BUILD_LIBRARY_FOR_DISTRIBUTION option to be enabled.

Snippet to simulate this issue:
xcodebuild archive -scheme swift-algorithms -destination "generic/platform=iOS" -configuration Release -archivePath Archive SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES
output.txt

@sanderdekoning
Copy link

Bump; how can BUILD_LIBRARY_FOR_DISTRIBUTION be enabled?

Please fix.

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

No branches or pull requests