Zig1375/SwiftMySQL

dispatch not linked as a dependency

Closed this issue · 5 comments

hello, tried to compile it into my program:

/home/admin2/Desktop/R1Importer/Packages/MySQL-1.2.5/Sources/MySQL/Core/Pool/Pool.swift:2:8: error: no such module 'Dispatch'
import Dispatch
^
:0: error: build had 1 command failures
error: exit(1): /home/admin2/swift-DEVELOPMENT-SNAPSHOT-2016-04-12-a-ubuntu15.10/usr/bin/swift-build-tool -f /home/admin2/Desktop/R1Importer/.build/debug.yaml default
admin2@ubuntu:~/Desktop/R1Importer/Sources$

Sorry, I forgot to update readme file..
To install libdispatch:

git clone -b experimental/foundation https://github.com/apple/swift-corelibs-libdispatch.git
cd swift-corelibs-libdispatch
git submodule init
git submodule update
sh ./autogen.sh
./configure --with-swift-toolchain=/usr --prefix=/usr
make && sudo make install

Thanks, I got this far:

admin2@ubuntu:/Desktop/R1Importer$ cd Sources/
admin2@ubuntu:
/Desktop/R1Importer/Sources$ swift build
Compile Swift Module 'MySQL' (13 sources)
:0: error: module 'Dispatch' requires feature 'blocks'
:0: error: could not build Objective-C module 'Dispatch'
:0: error: module 'Dispatch' requires feature 'blocks'
:0: error: could not build Objective-C module 'Dispatch'
:0: error: module 'Dispatch' requires feature 'blocks'
:0: error: could not build Objective-C module 'Dispatch'
:0: error: module 'Dispatch' requires feature 'blocks'
:0: error: could not build Objective-C module 'Dispatch'
:0: error: module 'Dispatch' requires feature 'blocks'
:0: error: could not build Objective-C module 'Dispatch'
:0: error: module 'Dispatch' requires feature 'blocks'
:0: error: could not build Objective-C module 'Dispatch'
:0: error: module 'Dispatch' requires feature 'blocks'
:0: error: could not build Objective-C module 'Dispatch'
:0: error: module 'Dispatch' requires feature 'blocks'
:0: error: could not build Objective-C module 'Dispatch'
:0: error: build had 1 command failures
error: exit(1): /home/admin2/swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a-ubuntu15.10/usr/bin/swift-build-tool -f /home/admin2/Desktop/R1Importer/.build/debug.yaml

Then I did this:

swift build -Xcc -fblocks -Xlinker -ldispatch

admin2@ubuntu:~/Desktop/R1Importer/Sources$ swift build -Xcc -fblocks -Xlinker -ldispatch
Compile Swift Module 'MySQL' (13 sources)
/home/admin2/Desktop/R1Importer/Packages/MySQL-1.2.5/Sources/MySQL/Helper/String.swift:6:74: error: type 'NSRegularExpressionOptions' has no member 'CaseInsensitive'
let regex = try! NSRegularExpression(pattern: pattern, options: .CaseInsensitive);
^~~~~~~~~~~~~~~
/home/admin2/Desktop/R1Importer/Packages/MySQL-1.2.5/Sources/MySQL/Core/Parameters.swift:94:23: error: value of type 'NSDateFormatter' has no member 'stringFromDate'
values[key] = formatter.stringFromDate(value);
^~~~~~~~~ ~~~~~~~~~~~~~~
:0: error: build had 1 command failures
error: exit(1): /home/admin2/swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a-ubuntu15.10/usr/bin/swift-build-tool -f /home/admin2/Desktop/R1Importer/.build/debug.yaml

I fix it tomorrow..
This version work on swift-DEVELOPMENT-SNAPSHOT-2016-04-12-a

got it i'll try out 4-12

thanks again

Now supported swift at April 25, 2016

Tag 1.3.0
.Package(url: "https://github.com/Zig1375/MySQL.git", majorVersion: 1, minor: 3)