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

Compile error CTLS module #34

Closed
Alex293 opened this issue Mar 19, 2017 · 17 comments
Closed

Compile error CTLS module #34

Alex293 opened this issue Mar 19, 2017 · 17 comments

Comments

@Alex293
Copy link

Alex293 commented Mar 19, 2017

Hi, I can't build a newly downloaded version of master on my mac :

.../jwt-master-2/Packages/CTLS-0.1.1/shim.h:4:10: 'openssl/conf.h' file not found
.../jwt-master-2/Packages/Crypto-2.0.0-alpha.4/Sources/Crypto/Cipher/Cipher+Method.swift:1:8: Could not build Objective-C module 'CTLS'

NB : I did got it working couple weeks ago !

@tanner0101
Copy link
Member

tanner0101 commented Mar 19, 2017

@Alex293
Copy link
Author

Alex293 commented Mar 19, 2017

eval "$(curl -sL openssl.vapor.sh)"
give me Swift 3.1 is required.

but
curl -sL check.vapor.sh | bash

tel me it's ok. Hw can I upgrade my tool chain ? Xcode is up to date

@tanner0101
Copy link
Member

This package uses Vapor 2. That script is for Vapor 1.

eval "$(curl -sL check2.vapor.sh)"

You'll need to either:

@Alex293
Copy link
Author

Alex293 commented Mar 19, 2017

Thanks you for your answer gonna try to update those and try agin

@tanner0101
Copy link
Member

tanner0101 commented Mar 19, 2017

You may also need to add this to your bash profile:

export TOOLCHAINS=swift

That will make the terminal use the latest version of Swift on your computer. You can test to see if it's using Swift 3.1 with swift --version

@vzsg
Copy link
Member

vzsg commented Mar 19, 2017

Or as an alternative, you could stick with the 0.8 version of the library if you don't want to make the jump to Vapor 2's alpha.

@Alex293
Copy link
Author

Alex293 commented Mar 19, 2017

After export TOOLCHAINS=swift, swift --version still give me 3.0.2. I'm upgrading so I can move to Vapor 2 as I was experiencing some compatibility issues with some providers. Is jwt-provider ready for Vapor 2 ?

I'm building a bearer auth system based on jwt.

@Alex293
Copy link
Author

Alex293 commented Mar 19, 2017

I've installed Xcode 8.3 beta 4, selected the beta with Xcode-select. Both scripts seems to perform ok :

eval "$(curl -sL openssl.vapor.sh)" 
✅  Compatible with Vapor 2
✅  OpenSSL available
 eval "$(curl -sL check2.vapor.sh)"
✅  Compatible with Vapor 2
swift --version
Apple Swift version 3.1 (swiftlang-802.0.42.1 clang-802.0.36)
Target: x86_64-apple-macosx10.9

So everything should work but I still have the same error. Also tried couple things like clean, rebuilt etc..

@Alex293
Copy link
Author

Alex293 commented Mar 19, 2017

Tried to clone again the project as I may have broken something but same result
Also updated vapor with vapor self update

@tanner0101
Copy link
Member

tanner0101 commented Mar 20, 2017

@Alex293
Copy link
Author

Alex293 commented Mar 20, 2017

I've restarted my computer, downloaded a fresh version of the repo, got all the scripts to say it's ok but it's always stuck at compile time.

@tanner0101
Copy link
Member

Can you paste me the output of the following two commands on your computer:

Gyda:~ tanner$ pkg-config openssl --cflags
-I/usr/local/opt/openssl/include
Gyda:~ tanner$ pkg-config openssl --libs
-L/usr/local/opt/openssl/lib -lssl -lcrypto -lz -lcrypto -lz

Additionally, is it the same error Could not build Objective-C module 'CTLS' from above or a different one?

@ryan-luas
Copy link

@Alex293 https://github.com/kylef/swiftenv is a great tool for managing your swift version & tool chain. Often you can set the tool chain in Xcode preferences, however that doesn't switch the one used in your shell environment... so that's a great tool to view and switch quickly.

@Alex293
Copy link
Author

Alex293 commented Mar 29, 2017

Did the had time to test but avec the last Xcode it should ok I think

@BrettRToomey
Copy link

Closing due to inactivity. Please feel free to reopen.

@ryanmjt
Copy link

ryanmjt commented Jun 5, 2017

I am running into this issue now. I have the latest Xcode installed (8.3.2) along with CLI tools and vapor (2.0.3) installed from homebrew tap. swift --version says 3.1.

The only thing "special" about my setup is that homebrew is installed to a non-standard location (i.e. not /usr/local).

Edit, the output:

> pkg-config openssl --cflags

> pkg-config openssl --libs
-lssl -lcrypto -lz

Edit 2:

If I manually specify -Xswiftc -I ... -Xlinker -L ... to my brew info openssl paths it works. Is there a way to set this in some config or something so I don't have to do this for every build?

Since my machine has a custom path I don't want to commit these paths up to the repository.

@jhoughjr
Copy link

Still an issue on ARM. Hypriot 1.5 Swift 3.1.1

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

No branches or pull requests

7 participants