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

Cannot install Pecker on macOS Big Sur 11.3 (beta) #62

Open
christiankm opened this issue Feb 5, 2021 · 5 comments
Open

Cannot install Pecker on macOS Big Sur 11.3 (beta) #62

christiankm opened this issue Feb 5, 2021 · 5 comments

Comments

@christiankm
Copy link

I cannot install Pecker on Big Sur (possibly due to being beta, but maybe you know).

If trying via Homebrew it throws an error, and trying a manual install via make install throws the following build error:

Cloning https://github.com/apple/swift-argument-parser.git
Resolving https://github.com/apple/swift-argument-parser.git at main
warning: Swift compiler no longer supports statically linking the Swift libraries. They're included in the OS by default starting with macOS Mojave 10.14.4 beta 3. For macOS Mojave 10.14.3 and earlier, there's an optional Swift library package that can be downloaded from "More Downloads" for Apple Developers at https://developer.apple.com/download/more/
warning: Swift compiler no longer supports statically linking the Swift libraries. They're included in the OS by default starting with macOS Mojave 10.14.4 beta 3. For macOS Mojave 10.14.3 and earlier, there's an optional Swift library package that can be downloaded from "More Downloads" for Apple Developers at https://developer.apple.com/download/more/
warning: Swift compiler no longer supports statically linking the Swift libraries. They're included in the OS by default starting with macOS Mojave 10.14.4 beta 3. For macOS Mojave 10.14.3 and earlier, there's an optional Swift library package that can be downloaded from "More Downloads" for Apple Developers at https://developer.apple.com/download/more/
/Users/christian/Pecker/.build/checkouts/Yams/Sources/Yams/Emitter.swift:338:32: warning: initialization of 'UnsafeMutablePointer<yaml_version_directive_t>' (aka 'UnsafeMutablePointer<yaml_version_directive_s>') results in a dangling pointer
            versionDirective = UnsafeMutablePointer(&versionDirectiveValue)
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/christian/Pecker/.build/checkouts/Yams/Sources/Yams/Emitter.swift:338:53: note: implicit argument conversion from 'yaml_version_directive_t' (aka 'yaml_version_directive_s') to 'UnsafeMutablePointer<yaml_version_directive_t>' (aka 'UnsafeMutablePointer<yaml_version_directive_s>') produces a pointer valid only for the duration of the call to 'init(_:)'
            versionDirective = UnsafeMutablePointer(&versionDirectiveValue)
                                                    ^~~~~~~~~~~~~~~~~~~~~~
/Users/christian/Pecker/.build/checkouts/Yams/Sources/Yams/Emitter.swift:338:53: note: use 'withUnsafeMutablePointer' in order to explicitly convert argument to pointer valid for a defined scope
            versionDirective = UnsafeMutablePointer(&versionDirectiveValue)
                                                    ^
/Users/christian/Pecker/Sources/Pecker/PeckerCommand.swift:22:6: error: referencing initializer 'init(name:help:)' on 'Flag' requires the types 'Bool' and 'Int' be equivalent
    @Flag(name: .shortAndLong, help: "Print the version and exit")
     ^
/Users/christian/Pecker/.build/checkouts/swift-argument-parser/Sources/ArgumentParser/Parsable Properties/Flag.swift:273:1: note: where 'Value' = 'Bool'
extension Flag where Value == Int {
^

make: *** [build] Error 1
christian@Christians-MacBook-Pro Pecker % 
@SattarFalahati
Copy link

I have the same problem. @christiankm did you resolve this problem ?

@christiankm
Copy link
Author

I have the same problem. @christiankm did you resolve this problem ?

No, I have not looked further into this. But it does not work on 11.3 Beta 1.

@SattarFalahati
Copy link

I have the same problem. @christiankm did you resolve this problem ?

No, I have not looked further into this. But it does not work on 11.3 Beta 1.

I did it (finally). But the problem wasn't the Big Sur, It was Xcode itself I had to select the correct version of xcode using sudo xcode-select -s /Applications/Xcode-12.4.0.app then run the make instal command.

@Iaroslav-kolesnik
Copy link

For me the error was following:

.build/checkouts/swift-argument-parser/Sources/ArgumentParser/Parsable Properties/Flag.swift:273:1: note: where 'Value' = 'Bool'
extension Flag where Value == Int {
^

I think the issue is in the wrong dependency.

.package(url: "https://github.com/apple/swift-argument-parser.git", .branch("main"))

change it to some stable release

.package(url: "https://github.com/apple/swift-argument-parser.git", from: "0.3.2")

@dirtyhabits97
Copy link

I have the same problem. @christiankm did you resolve this problem ?

No, I have not looked further into this. But it does not work on 11.3 Beta 1.

I was hitting this same issue. Looks like the compiler cannot differentiate between the init for Bool and Int, so I replaced line 22 in /Sources/Pecker/PeckerCommand.swift:

// before
@Flag(name: .shortAndLong, help: "Print the version and exit")
// after
@Flag(name: .shortAndLong, inversion: .prefixedNo,  help: "Print the version and exit")

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

4 participants