Stefan Ciprian Hotoleanu
Stefan Ciprian Hotoleanu

Reputation: 2292

Build Perfect Swift error

I just cloned the PerfectTemplate repository on my machine. When I try to build the project I get the following error:

Compile Swift Module 'PerfectHTTPServer' (8 sources)
/Users/admin/Desktop/PerfectTemplate/Packages/PerfectHTTPServer-2.1.14/Sources/PerfectHTTPServer/HTTPContentCompression.swift:71:12: error: use of unresolved identifier 'UnsafeRawBufferPointer'
                let b2 = UnsafeRawBufferPointer(start: dest, count: Int(stream.total_out))
                         ^~~~~~~~~~~~~~~~~~~~~~
Swift.UnsafeBufferPointer:6:15: note: did you mean 'UnsafeBufferPointer'?
public struct UnsafeBufferPointer<Element> : Indexable, Collection, RandomAccessCollection {
              ^
<unknown>:0: error: build had 1 command failures
error: exit(1): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool -f /Users/admin/Desktop/PerfectTemplate/.build/debug.yaml
Macintosh:PerfectTemplate admin$ 

Did anyone faced with this error before ?

Upvotes: 0

Views: 278

Answers (2)

Rizwan Ahmed
Rizwan Ahmed

Reputation: 958

If you are trying to deploy Perfect on a mac, make sure you have the latest XCode (version 8.2.1 or later) and try running it again.

Upvotes: 0

nakano531
nakano531

Reputation: 523

According to this, UnsafeRawBufferPointer was added in swift 3.0.1.

Upvotes: 1

Related Questions