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

Compiling fails with error #75

Open
iComputerfreak opened this issue Jan 30, 2019 · 3 comments
Open

Compiling fails with error #75

iComputerfreak opened this issue Jan 30, 2019 · 3 comments

Comments

@iComputerfreak
Copy link

iComputerfreak commented Jan 30, 2019

When compiling a new SwiftPM project with your library it fails with the following errors

<ProjectPath>/.build/checkouts/SwiftDiscord--7968038837483286921/Sources/SwiftDiscord/Voice/DiscordVoiceEngine.swift:235:96: error: cannot convert value of type '[UInt8]' to expected argument type 'UInt8'
        let success = crypto_secretbox_easy(encrypted, &buf, UInt64(buf.count), &nonce, &secret!)
                                                                                         ~~~~~~^
<ProjectPath>/.build/checkouts/SwiftDiscord--7968038837483286921/Sources/SwiftDiscord/Voice/DiscordVoiceEngine.swift:255:114: error: cannot convert value of type '[UInt8]' to expected argument type 'UInt8'
        let success = crypto_secretbox_open_easy(unencrypted, voiceData, UInt64(data.count - 12), &nonce, &secret!)
                                                                                                           ~~~~~~^
error: terminated(1): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool -f '<ProjectPath>/.build/debug.yaml' main output:
    


Here is my full output when I run the compile command: https://pastebin.com/vUrpzfQS

My main.swift only contains this:

import SwiftDiscord

print("Hello, world!")

First I used version 6.0.0 of your library, like suggested in the README.md, but now I tried 9.0.0, which doesn't work either.
I am using Swift 4 on macOS, but I tried it on Linux Ubuntu 16.04 too.

@nuclearace
Copy link
Owner

What version of sodium got installed?

Also FYI, this project has been a bit lacking in maintenance recently since I've been busy with work, but I'm hoping to start back into it soon. In the meantime, you might want to also check out https://github.com/azoy/sword.

@iComputerfreak
Copy link
Author

According to Package.resolved, Sodium version 2.0.0.

{
  "package": "Sodium",
  "repositoryURL": "https://github.com/nuclearace/Sodium",
  "state": {
    "branch": null,
    "revision": "5812a3d879b77aae0fdfbd62d0e8354e914d15ae",
    "version": "2.0.0"
  }
}

But brew installed version 1.0.17 and on Ubuntu I used the libsodium-stable-2019-01-30.tar.gz (which seems to be 1.0.17 as well)

@iComputerfreak
Copy link
Author

I will check out Sword, but I would prefer to use your library, since it has a much better documentation.

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

2 participants