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

XcodeGen: error: ambiguous use of 'arc4random_uniform' on Linux distros #845

Closed
Howler4695 opened this issue Aug 20, 2024 · 2 comments · Fixed by #846
Closed

XcodeGen: error: ambiguous use of 'arc4random_uniform' on Linux distros #845

Howler4695 opened this issue Aug 20, 2024 · 2 comments · Fixed by #846
Labels

Comments

@Howler4695
Copy link
Contributor

Context 🕵️‍♀️

When compiling XcodeGen on Linux distros using Swift 5.10.1 the compile will fail with the error:

/root/XcodeGen/.build/checkouts/XcodeProj/Sources/XcodeProj/Extensions/String+Utils.swift:25:31: error: ambiguous use of 'arc4random_uniform'
            let randomValue = arc4random_uniform(UInt32(base.count))

Related XcodeGen issue: yonaskolb/XcodeGen#1495

What

I believe this error is being caused by the random number generator arc4random_uniform and the pattern that overwrites it for linux distros

Proposal 🎉

I propose the following fix: https://github.com/Howler4695/XcodeProj/blob/main/Sources/XcodeProj/Extensions/String%2BUtils.swift

I've tested it on my linux distros and it's fixed my issue and I haven't found any others arising from it. I'm not familiar with swift though so this fix could cause problems with older swift versions or something.

Copy link

Hola 👋,

We want to inform you that the issue has been marked as stale. This means that there hasn't been any activity or updates on it for quite some time, and it's possible that it may no longer be relevant or actionable.
If you still believe that this issue is valid and requires attention, please provide an update or any additional information that can help us address it. Otherwise, we may consider closing it in the near future.
Thank you for your understanding.

@github-actions github-actions bot added the stale label Sep 20, 2024
Copy link

Hola 👋,

We want to inform you that we have decided to close this stale issue as there hasn't been any activity or response regarding it after marking it as stale.

We understand that circumstances may have changed or priorities may have shifted, and that's completely understandable. If you still believe that this issue needs to be addressed, please feel free to reopen it and provide any necessary updates or additional information.

We appreciate your understanding and look forward to your continued contributions to the project.

Thank you.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 25, 2024
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.

1 participant