PerfectTemplate icon indicating copy to clipboard operation
PerfectTemplate copied to clipboard

Error building PerfectThread

Open iFreedive opened this issue 9 years ago • 9 comments

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<Void>' (aka 'UnsafeMutablePointer<()>') to expected argument type 'UnsafeMutablePointer<_>' let unleakyObject = Unmanaged<IsThisRequired>.fromOpaque(UnsafeMutablePointer<Void>(p)).takeRetainedValue() ^ /Users/gary/PerfectTemplate/Packages/PerfectThread-0.10.0/Sources/ThreadQueue.swift:233:37: error: value of type 'Unmanaged<IsThisRequired>' 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

iFreedive avatar Jun 30 '16 09:06 iFreedive

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

ghost avatar Jun 30 '16 11:06 ghost

I have the same problem on mac OS

pmusolino avatar Jun 30 '16 15:06 pmusolino

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).

alexguichet avatar Jul 03 '16 03:07 alexguichet

I have the same error -> Ubuntu 14.04 LTS

iwheelbuy avatar Jul 04 '16 13:07 iwheelbuy

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

samdods avatar Jul 05 '16 08:07 samdods

If you have installed xcode 8, you can solve the problem this way: https://camo.githubusercontent.com/e2cbfcd5b784b0489653bf2bbf756b4693d369b3/687474703a2f2f7777772e706572666563742e6f72672f646f63732f6173736574732f78636f64655f70726566732e706e67

pmusolino avatar Jul 05 '16 08:07 pmusolino

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!

samdods avatar Jul 05 '16 09:07 samdods

What about Linux without xcode?

iwheelbuy avatar Jul 05 '16 09:07 iwheelbuy

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!

ghost avatar Jul 05 '16 13:07 ghost