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

Error building PerfectThread #1

Open
iFreedive opened this issue Jun 30, 2016 · 9 comments
Open

Error building PerfectThread #1

iFreedive opened this issue Jun 30, 2016 · 9 comments

Comments

@iFreedive
Copy link

Hi

When I run the following in terminal...
git clone https://github.com/PerfectlySoft/PerfectTemplate.git
cd PerfectTemplate
swift build
.build/debug/PerfectTemplate

I get the following error.

Compile Swift Module 'PerfectThread' (2 sources)
/Users/gary/PerfectTemplate/Packages/PerfectThread-0.10.0/Sources/ThreadQueue.swift:210:97: error: cannot convert value of type 'UnsafeMutablePointer' (aka 'UnsafeMutablePointer<()>') to expected argument type 'UnsafeMutablePointer<_>'
let unleakyObject = Unmanaged.fromOpaque(UnsafeMutablePointer(p)).takeRetainedValue()
^
/Users/gary/PerfectTemplate/Packages/PerfectThread-0.10.0/Sources/ThreadQueue.swift:233:37: error: value of type 'Unmanaged' has no member 'toOpaque'
let leakyObject = Unmanaged.passRetained(holderObject).toOpaque()
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~
:0: error: build had 1 command failures
error: exit(1): /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool -f /Users/gary/PerfectTemplate/.build/debug.yaml
Garys-MacBook:PerfectTemplate gary$ .build/debug/PerfectTemplate
-bash: .build/debug/PerfectTemplate: No such file or directory

@ghost
Copy link

ghost commented Jun 30, 2016

Same for problem me. Commnand line tools set properly to Xcode 8.0 (8S128d) as per the guide instructions.

@pmusolino
Copy link

I have the same problem on mac OS

@alexguichet
Copy link

I'm also seeing this same issue. Fresh install of Xcode 8.0 (8S128d) with the 6/20 swift development snapshot and the command line tools set to 8.0 (8S128d).

@iwheelbuy
Copy link

I have the same error -> Ubuntu 14.04 LTS

@samdods
Copy link

samdods commented Jul 5, 2016

I have the same error, using latest development snapshot from June 20th.

@pmusolino
Copy link

@samdods
Copy link

samdods commented Jul 5, 2016

very weird. i had done that already, and i didn't need to change anything, but it works now, as if by magic. thanks anyway!

@iwheelbuy
Copy link

What about Linux without xcode?

@ghost
Copy link

ghost commented Jul 5, 2016

Ok I think I've nailed it! The problem for me was that I wasn't careful in reading the instructions. Although I installed the latest beta of Xcode 8.0 (8S128d) and subsequently set the command line tools to use it, I didn't download and install the latest Swift snapshot (DEVELOPMENT-SNAPSHOT-2016-06-20-a). Make sure you install it and set the $PATH variable to use it. The path is

/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin

The terminal should produce the following

$ swift --version

Apple Swift version 3.0-dev (LLVM c191431197, Clang c6195325c5, Swift add621a959)
Target: x86_64-apple-macosx10.9

The error was thrown because of the wrong version of Swift in the following call

swift build

I hope this helps!

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

5 participants