mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-11 10:18:21 +09:00
Simplify build on macOS (#35570)
* Check for OpenSSL (and pkg-config) in the check_prereqs() function * Simplify OpenSSL installation instructions * Automatically pick the OpenSSL version installed by Homebrew by exporting the proper PKG_CONFIG_PATH environment variable * Improve the error message if cmake can't find OpenSSL The previous instructions were asking the user to add symbolic links inside /usr/local/lib/ and /usr/local/lib/pkgconfig/ for OpenSSL related files. There is no need for a complicated setup with symbolic links when the PKG_CONFIG_PATH environment variable points to the right pkgconfig, which is now done in build-commons.sh. Co-Authored-By: Jan Kotas <jkotas@microsoft.com> Co-Authored-By: Jeremy Barton <jbarton@microsoft.com>
This commit is contained in:
parent
c2b10188d5
commit
f6aad636c9
8 changed files with 34 additions and 68 deletions
|
@ -23,9 +23,7 @@ git clone https://github.com/dotnet/runtime
|
|||
CMake
|
||||
-----
|
||||
|
||||
CoreCLR has a dependency on CMake for the build. You can download it from [CMake downloads](http://www.cmake.org/download/).
|
||||
|
||||
Alternatively, you can install CMake from [Homebrew](http://brew.sh/).
|
||||
CoreCLR has a dependency on CMake for the build. You can install it with [Homebrew](https://brew.sh/).
|
||||
|
||||
```sh
|
||||
brew install cmake
|
||||
|
@ -33,11 +31,10 @@ brew install cmake
|
|||
|
||||
ICU
|
||||
---
|
||||
ICU (International Components for Unicode) is also required to build and run. It can be obtained via [Homebrew](http://brew.sh/).
|
||||
ICU (International Components for Unicode) is also required to build and run. It can be obtained via [Homebrew](https://brew.sh/).
|
||||
|
||||
```sh
|
||||
brew install icu4c
|
||||
brew link --force icu4c
|
||||
```
|
||||
|
||||
Build the Runtime and System.Private.CoreLib
|
||||
|
|
|
@ -23,47 +23,14 @@ Install the following packages:
|
|||
- cmake 3.15.5 or newer
|
||||
- autoconf
|
||||
- automake
|
||||
- icu4c
|
||||
- libtool
|
||||
- openssl 1.1
|
||||
- pkg-config
|
||||
- python3
|
||||
- icu4c
|
||||
|
||||
The lines to install all the packages above using Homebrew.
|
||||
|
||||
```
|
||||
brew install cmake autoconf automake libtool pkg-config python3 icu4c
|
||||
brew link --force icu4c
|
||||
```
|
||||
|
||||
OpenSSL
|
||||
-------
|
||||
|
||||
To build the libraries on macOS, you must install and configure links for OpenSSL 1.1.
|
||||
|
||||
```sh
|
||||
brew install openssl
|
||||
|
||||
# You might need to "link" pkg-config:
|
||||
brew link pkg-config
|
||||
|
||||
# We need to make the runtime libraries discoverable, as well as make
|
||||
# pkg-config be able to find the headers and current ABI version.
|
||||
#
|
||||
# Ensure the paths we will need exist
|
||||
mkdir -p /usr/local/lib/pkgconfig
|
||||
|
||||
# The rest of these instructions assume a default Homebrew path of
|
||||
# `/usr/local/opt/<module>`, with `brew --prefix` returning `/usr/local`
|
||||
# and `brew --prefix openssl` returning `/usr/local/opt/openssl@1.1`.
|
||||
# In this case, `brew info openssl` shows:
|
||||
# `openssl@1.1: stable 1.1.1d (bottled) [keg-only]`.
|
||||
|
||||
# Runtime dependencies
|
||||
ln -s /usr/local/opt/openssl\@1.1/lib/libcrypto.1.1.dylib /usr/local/lib/
|
||||
ln -s /usr/local/opt/openssl\@1.1/lib/libssl.1.1.dylib /usr/local/lib/
|
||||
|
||||
# Compile-time dependencies (for pkg-config)
|
||||
ln -s /usr/local/opt/openssl\@1.1/lib/pkgconfig/libcrypto.pc /usr/local/lib/pkgconfig/
|
||||
ln -s /usr/local/opt/openssl\@1.1/lib/pkgconfig/libssl.pc /usr/local/lib/pkgconfig/
|
||||
ln -s /usr/local/opt/openssl\@1.1/lib/pkgconfig/openssl.pc /usr/local/lib/pkgconfig/
|
||||
brew install cmake autoconf automake icu4c libtool openssl@1.1 pkg-config python3
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue