But it requires the person building pants to have ...
# development
a
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
I think @aloof-angle-91616 is your man here
a
@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
hey sorry they moved my desk three floors and it’s screwing with my back
is pkg-config not available or not working?
a
Doesn’t appear to work for brew-installed openssl
w
@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
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
ahh
a
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
so, the
openssl-sys
crate uses the
pkgconfig
crate to find things
(...but perhaps that's only on linux)
a
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
it does talk about its strategies though: https://docs.rs/openssl/0.10.15/openssl/
a
ok great i’ll check that
e
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
i can try to help debug that if so
a
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
ah!
a
But
/usr/local/Cellar/openssl/1.0.2n
exists and is good
e
And what about the brew version of pkg-config? Are there two and you're using OSX's?
a
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
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
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
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
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
No worries 🙂 I’ve got it - thanks!
a
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)