https://pantsbuild.org/ logo
#development
Title
# development
a

average-vr-56795

11/05/2018, 4:15 PM
But it requires the person building pants to have an env var specified which points at their openssl install… Does anyone know of any tips for locating openssl [i.e. its include and lib dirs]? There are a few standard-ish directories AFAICT…
@aloof-angle-91616 @enough-analyst-54434 may have some ideas…?
e

enough-analyst-54434

11/05/2018, 4:15 PM
I think @aloof-angle-91616 is your man here
a

average-vr-56795

11/05/2018, 6:14 PM
@aloof-angle-91616 Any better ideas for “Where is openssl” than
for dir in /usr /usr/local /usr/local/Cellar ...; do if [[ -e "${dir}/openssl/include" ]]; then echo "Found openssl: ${dir}"; done
?
a

aloof-angle-91616

11/05/2018, 6:16 PM
hey sorry they moved my desk three floors and it’s screwing with my back
is pkg-config not available or not working?
a

average-vr-56795

11/05/2018, 6:19 PM
Doesn’t appear to work for brew-installed openssl
w

witty-crayon-22786

11/05/2018, 6:20 PM
@average-vr-56795: could you set the env var conditionally on linux, and let OSX continue to do what it was doing?
(assuming that it is the openssl-sys crate consuming this...?)
a

average-vr-56795

11/05/2018, 6:21 PM
Sadly not; we’re changing how grpcio is consuming libssl - before it was statically linking from bundled sources, and now it’s dynamically linking from the system (which means it needs to find the system install)
w

witty-crayon-22786

11/05/2018, 6:22 PM
ahh
a

average-vr-56795

11/05/2018, 6:22 PM
I don’t think this is going to end up looking too horrible… But something broke between the version I saw working on linux and the version I PR’d from a mac, so I’m back to Linux 🙂
w

witty-crayon-22786

11/05/2018, 6:22 PM
so, the
openssl-sys
crate uses the
pkgconfig
crate to find things
(...but perhaps that's only on linux)
a

aloof-angle-91616

11/05/2018, 6:24 PM
pkg-config the crate works on osx but it may be that pkg-config the utility is borked or can’t see brew installed openssl
w

witty-crayon-22786

11/05/2018, 6:24 PM
it does talk about its strategies though: https://docs.rs/openssl/0.10.15/openssl/
a

aloof-angle-91616

11/05/2018, 6:24 PM
ok great i’ll check that
e

enough-analyst-54434

11/05/2018, 6:28 PM
So @average-vr-56795 using
pkg-config libssl --variable=includedir
and
pkg-config libssl --variable=libdir
manually for osx fails to reveal brew openssl paths?
a

aloof-angle-91616

11/05/2018, 6:28 PM
i can try to help debug that if so
a

average-vr-56795

11/05/2018, 6:29 PM
Copy code
$ pkg-config --list-all | grep -i ssl
grpc_unsecure             gRPC unsecure - high performance general RPC framework without SSL
grpc++_unsecure           gRPC++ unsecure - C++ wrapper for gRPC without SSL
libevent_openssl          libevent_openssl - libevent_openssl adds openssl-based TLS support to libevent
a

aloof-angle-91616

11/05/2018, 6:29 PM
ah!
a

average-vr-56795

11/05/2018, 6:29 PM
But
/usr/local/Cellar/openssl/1.0.2n
exists and is good
e

enough-analyst-54434

11/05/2018, 6:29 PM
And what about the brew version of pkg-config? Are there two and you're using OSX's?
a

average-vr-56795

11/05/2018, 6:30 PM
I have two `pkg-config`s. The other one shows the same result except without
libevent_openssl
So… Different, but not in a useful way 😄
* disappears into a meeting for a bit
w

witty-crayon-22786

11/05/2018, 6:30 PM
my link above to https://docs.rs/openssl/0.10.15/openssl/#automatic was to suggest that some copy-pasta from whatever they are doing might be a good idea
because they reference
brew
and pkgconfig awareness
a

aloof-angle-91616

11/05/2018, 6:34 PM
where are the two pkg-configs? if one is non homebrew and one is from homebrew that might make sense (or not at all) — having more than one is confusing to me but i can’t say whether it’s strange or wrong
(i know you’re in a meeting)
a

average-vr-56795

11/05/2018, 7:13 PM
Copy code
$ which -a pkg-config
/opt/twitter_mde/bin/pkg-config
/usr/local/bin/pkg-config
I’ll have a look at the openssl link, hopefully it will make everything clear 🙂 Thanks for your help!
a

aloof-angle-91616

11/05/2018, 7:35 PM
hey, i had to go home because of the desk thing but i am back now. i can't determine whether there is something i can do to assist here, but since it is whatever o clock in london right now, i have time to pick it up today if that would unblock you
a

average-vr-56795

11/05/2018, 8:02 PM
No worries 🙂 I’ve got it - thanks!
a

aloof-angle-91616

11/05/2018, 9:27 PM
ok, awesome! i am deeply aware of the fact that
pkg-config
can be screwy and especially with homebrew (and i should really turn my feelings about homebrew into pull requests). i'm going to figure out and fix the GOROOT issue you identified a few days ago right now (stu mentioned there could be an interaction with an existing go install, which i hadn't considered, so the problem may be way simpler)