-
Notifications
You must be signed in to change notification settings - Fork 378
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
add homebrew locations for openssl, icu4c, python3 #894
Conversation
How about LibreSSL? :) I think it's also in homebrew. |
@Mikaela since ZNC was not yet tested against LibreSSL so I didn't think about it. |
libressl works, but it needs an extra header to be included in csocket or it won't compile |
What kind of header? Does it break OopenSSL or anything else? If not, it should probably be PRed to Csocket. |
Additional headers could be added via configure as well. |
I opened jimloco/Csocket#47 |
On See also: |
5121c97
to
18bd05e
Compare
@Mikaela thanks - I changed it accordingly. |
Proper openssl (like one from homebrew) is already tested in travis as part of linux test. |
@@ -50,10 +50,8 @@ install: | |||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew config; fi | |||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew list --versions; fi | |||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi | |||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install swig python3 icu4c jq; fi | |||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install jq swig python3 icu4c openssl; fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After this change jq
is not needed anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not sure - because in the next line you use it print all installed versions from brew...
Not sure if it any benefit...
ok - so not installing openssl via homebrew is ok for you? |
https://github.com/Homebrew/homebrew/blob/master/Library/Formula/znc.rb#L26 so the Homebrew ZNC formula currently depends on openssl (from homebrew), not sure how that is working... |
You can add another travis build, with different configurations, to test more (libressl/openssl from homebrew/etc). But I'm not sure it's very different from what happens on linux. |
Someone (@Kriechi?) was on #znc earlier today asking how to build ZNC using brewed OpenSSL and I also think that it's better to install from there than possibly very old OS X's version of OpenSSL. I also got the picture that they wanted to compile ZNC by themselves possibly with custom modules which means compiling outside of Homebrew. |
402ef4c
to
a0d386f
Compare
I changed the Travis build matrix to do two jobs on OS X:
I checked the Homebrew formula for ZNC, and yes it does automatically add homebrew-openssl paths. As @Mikaela pointed out, this PR is of use if somebody wants to compile ZNC from the repo or their own fork. It is better to include the homebrew openssl because the OSX version is deprecated and might get removed with the next OSX release. And it creates lots of nasty warnings during compilation. |
d93d61b
to
f88701b
Compare
@Mikaela |
python3_prefix=$(dirname "$(find "$($BREW --prefix python3)/" -name python3.pc)") | ||
export PKG_CONFIG_PATH="$python3_prefix:$PKG_CONFIG_PATH" | ||
|
||
if test -z "$USE_SYSTEM_OPENSSL" -o "$USE_SYSTEM_OPENSSL" = "false"; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think configure should depend on travis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO this does not depend on travis.
If the user want to compile ZNC using the system openssl USE_SYSTEM_OPENSSL
can be used in the same way.
Maybe I should add a description line to the configure script so this is documented somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. But please add some ifs for ssl/python/icu: if they are installed in homebrew, put some message that using version from homebrew.
Makes debugging easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how to do that. I only add the pkg-config path here. If PKG_CHECK_MODULES finds it in there is a different question...
Maybe we should just print a summary of found libs at the end (with some nicer formatting)?
echo $openssl_LIBS
echo $python_LIBS
echo $icu_LIBS
mikaela@terasar ~
% sh
$ echo Hi $(whoami)
Hi mikaela |
@DarthGandalf @Mikaela yes % ls -lah /bin/sh
-r-xr-xr-x 1 root wheel 1.2M Jan 31 12:57 /bin/sh
% /bin/sh
sh-3.2$ echo Hi $(date)
Hi Fri Feb 27 10:21:28 GMT 2015 (tested on OSX with a real % ls -lah /bin/sh
lrwxrwxrwx 1 root root 4 Mar 1 2012 /bin/sh -> dash
% /bin/sh
$ echo Hi $(date)
Hi Fri Feb 27 11:06:38 CET 2015 (tested on Debian 7.8 with see http://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html#tag_23_02_06_03 |
f88701b
to
d1e03f0
Compare
I added a description for the
|
Well, dash is not real sh. 2015-02-27 2:38 GMT-08:00 Thomas Kriechbaumer notifications@github.com:
|
AFAIR, some BSD had a real sh |
@DarthGandalf still not convinced, would you like me to change it? |
d1e03f0
to
53e5e99
Compare
I changed the |
Oh, that was overlooked maybe. We just don't have enough tests for such broken systems. |
add homebrew locations for openssl, icu4c, python3
improves building on Mac OS X:
The default is now to use openssl from Homebrew if available, as fallback it uses the system openssl.
If the environment variable
USE_SYSTEM_OPENSSL
is"true"
then the system openssl is always used, no matter if a Homebrew version is installed.Travis now tests using the Homebrew OpenSSL and the system OpenSSL on OS X.