-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #251 from fluxcd/pkg-config-openssl
Respect PKG_CONFIG_PATH from the environment
- Loading branch information
Showing
2 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,40 @@ $ brew install cmake [email protected] libssh2 pkg-config | |
$ LIBGIT2_FORCE=1 make libgit2 | ||
``` | ||
|
||
#### openssl and pkg-config | ||
|
||
You may see this message when trying to run a build: | ||
|
||
``` | ||
# pkg-config --cflags -- libgit2 | ||
Package openssl was not found in the pkg-config search path. | ||
Perhaps you should add the directory containing `openssl.pc' | ||
to the PKG_CONFIG_PATH environment variable | ||
Package 'openssl', required by 'libgit2', not found | ||
pkg-config: exit status 1 | ||
``` | ||
|
||
On some macOS systems `brew` will not link the pkg-config file for | ||
openssl into expected directory, because it clashes with a | ||
system-provided openssl. When installing it, or if you do | ||
|
||
```console | ||
brew link [email protected] | ||
Warning: Refusing to link macOS provided/shadowed software: [email protected] | ||
If you need to have [email protected] first in your PATH, run: | ||
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.profile | ||
|
||
For compilers to find [email protected] you may need to set: | ||
export LDFLAGS="-L/usr/local/opt/[email protected]/lib" | ||
export CPPFLAGS="-I/usr/local/opt/[email protected]/include" | ||
|
||
For pkg-config to find [email protected] you may need to set: | ||
export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig" | ||
``` | ||
|
||
.. it tells you (in the last part of the message) how to add `openssl` | ||
to your `PKG_CONFIG_PATH` so it can be found. | ||
|
||
### Linux | ||
|
||
```console | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters