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

Failed to compile on machine without Vapor #9

Closed
fassko opened this issue May 12, 2018 · 4 comments
Closed

Failed to compile on machine without Vapor #9

fassko opened this issue May 12, 2018 · 4 comments
Labels
question Further information is requested

Comments

@fassko
Copy link
Contributor

fassko commented May 12, 2018

I was building Websocket and HTTP on Circle CI without Vapor installed.

After having this issue I found from vapor/vapor#1562 that I need to install libressl with brew install libressl

If someone would help me I would like to try to fix myself this.

Error from Circle CI with Xcode 9.3:

Compile Swift Module 'NIOOpenSSL' (11 sources)
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "/Users/distiller/project/TestWebsockets/.build/checkouts/swift-nio-ssl.git-1370587408992578247/Sources/CNIOOpenSSL/include/c_nio_openssl.h"
        ^
/Users/distiller/project/TestWebsockets/.build/checkouts/swift-nio-ssl.git-1370587408992578247/Sources/CNIOOpenSSL/include/c_nio_openssl.h:17:10: error: 'openssl/conf.h' file not found
#include <openssl/conf.h>
         ^
/Users/distiller/project/TestWebsockets/.build/checkouts/swift-nio-ssl.git-1370587408992578247/Sources/NIOOpenSSL/OpenSSLHandler.swift:16:8: error: could not build Objective-C module 'CNIOOpenSSL'
import CNIOOpenSSL
       ^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "/Users/distiller/project/TestWebsockets/.build/checkouts/swift-nio-ssl.git-1370587408992578247/Sources/CNIOOpenSSL/include/c_nio_openssl.h"
        ^
/Users/distiller/project/TestWebsockets/.build/checkouts/swift-nio-ssl.git-1370587408992578247/Sources/CNIOOpenSSL/include/c_nio_openssl.h:17:10: error: 'openssl/conf.h' file not found
#include <openssl/conf.h>
         ^
/Users/distiller/project/TestWebsockets/.build/checkouts/swift-nio-ssl.git-1370587408992578247/Sources/NIOOpenSSL/OpenSSLHandler.swift:16:8: error: could not build Objective-C module 'CNIOOpenSSL'
import CNIOOpenSSL
       ^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "/Users/distiller/project/TestWebsockets/.build/checkouts/swift-nio-ssl.git-1370587408992578247/Sources/CNIOOpenSSL/include/c_nio_openssl.h"
        ^
/Users/distiller/project/TestWebsockets/.build/checkouts/swift-nio-ssl.git-1370587408992578247/Sources/CNIOOpenSSL/include/c_nio_openssl.h:17:10: error: 'openssl/conf.h' file not found
#include <openssl/conf.h>
         ^
/Users/distiller/project/TestWebsockets/.build/checkouts/swift-nio-ssl.git-1370587408992578247/Sources/NIOOpenSSL/OpenSSLHandler.swift:16:8: error: could not build Objective-C module 'CNIOOpenSSL'
import CNIOOpenSSL
       ^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "/Users/distiller/project/TestWebsockets/.build/checkouts/swift-nio-ssl.git-1370587408992578247/Sources/CNIOOpenSSL/include/c_nio_openssl.h"
        ^
/Users/distiller/project/TestWebsockets/.build/checkouts/swift-nio-ssl.git-1370587408992578247/Sources/CNIOOpenSSL/include/c_nio_openssl.h:17:10: error: 'openssl/conf.h' file not found
#include <openssl/conf.h>
         ^
/Users/distiller/project/TestWebsockets/.build/checkouts/swift-nio-ssl.git-1370587408992578247/Sources/NIOOpenSSL/OpenSSLHandler.swift:16:8: error: could not build Objective-C module 'CNIOOpenSSL'
import CNIOOpenSSL
       ^
error: terminated(1): /Applications/Xcode-9.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool -f /Users/distiller/project/TestWebsockets/.build/debug.yaml main output:
@vzsg
Copy link
Member

vzsg commented May 12, 2018

On Linux, you need to have the libssl-dev and pkg-config packages installed to get the same development libraries.

It's more effective however to copy/adapt the CircleCI 2.0 configuration from one of the Vapor repos than figuring it out from scratch, however.

@fassko
Copy link
Contributor Author

fassko commented May 12, 2018

Sorry I forgot to mention that it was on macOS and using Circle CI 2.0.

@vzsg
Copy link
Member

vzsg commented May 14, 2018

On macOS, you need to have pkg-config and libressl installed via Homebrew. If those are available, this package should compile just fine.

@tanner0101 tanner0101 added the question Further information is requested label May 14, 2018
@fassko
Copy link
Contributor Author

fassko commented May 17, 2018

Thanks @vzsg for the tips. I think we can close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants