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

Vapor build error with toolbox 2 and vapor 1.* project #162

Closed
mludi opened this issue Apr 24, 2017 · 4 comments
Closed

Vapor build error with toolbox 2 and vapor 1.* project #162

mludi opened this issue Apr 24, 2017 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@mludi
Copy link
Contributor

mludi commented Apr 24, 2017

Hi, on a Vapor 1 project is a build error with toolbox 2 beta.

On my machine I'm running
Vapor Toolbox: 2.0.0-beta.2
Vapor Framework: 1.5.15

So with

vapor build -Xswiftc -I/usr/local/bin/mysql -Xlinker -L/usr/local/bin/mysql

or

vapor build -Xswiftc -I/usr/local/include/mysql -Xlinker -L/usr/local/bin

I got the error

Output:
Compile Swift Module 'App' (30 sources)
Linking ./.build/debug/App
ld: library not found for -lmysqlclient for architecture x86_64
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)

For a temporary fix the SPM helps

swift build -Xswiftc -I/usr/local/include/mysql -Xlinker -L/usr/local/lib

@hhanesand
Copy link

hhanesand commented Apr 24, 2017

I don't think Vapor 1.x is compatible with Toolbox 2.x...

I could be wrong, but does going back to Toolbox 1.x fix your problem?

If that doesn't help, please take a look at this issue.

@mludi
Copy link
Contributor Author

mludi commented Apr 24, 2017

That will work but it's a known bug

@tanner0101
Copy link
Member

Please use this for the time being (thanks @mludi):

swift build -Xswiftc -I/usr/local/include/mysql -Xlinker -L/usr/local/lib

We're working on a solution for the next update.

@BrettRToomey BrettRToomey added the bug Something isn't working label May 3, 2017
@BrettRToomey BrettRToomey added this to the 2.0 milestone May 3, 2017
@tanner0101
Copy link
Member

Closing this since we are about to tag Toolbox 2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants