deps: require zlib 1.2+

This commit is contained in:
Aofei Sheng
2024-07-31 08:56:03 +08:00
parent d2cb96a9e5
commit 45b4315842
3 changed files with 37 additions and 22 deletions

View File

@@ -317,8 +317,7 @@ Here are the Go packages that can be imported correctly:
- [pkg-config 0.29+](https://www.freedesktop.org/wiki/Software/pkg-config/)
- [bdwgc/libgc 8.0+](https://www.hboehm.info/gc/)
- [OpenSSL 3.0+](https://www.openssl.org/)
- [cJSON 1.7+](https://github.com/DaveGamble/cJSON) (optional, for [github.com/goplus/llgo/c/cjson](https://pkg.go.dev/github.com/goplus/llgo/c/cjson))
- [SQLite 3](https://www.sqlite.org) (optional, for [github.com/goplus/llgo/c/sqlite](https://pkg.go.dev/github.com/goplus/llgo/c/sqlite))
- [zlib 1.2+](https://www.zlib.net)
- [Python 3.12+](https://www.python.org) (optional, for [github.com/goplus/llgo/py](https://pkg.go.dev/github.com/goplus/llgo/py))
## How to install
@@ -328,10 +327,9 @@ Follow these steps to generate the `llgo` command (its usage is the same as the
### on macOS
```sh
brew update # execute if needed
brew update
brew install llvm@18 pkg-config bdw-gc openssl
brew install cjson sqlite python@3.12 # optional
export PATH=$(brew --prefix llvm@18)/bin:$PATH # you may want to add this to your shell RC file, e.g. ~/.zshrc
brew install python@3.12 # optional
go install -v github.com/goplus/llgo/cmd/llgo@latest
```
@@ -340,10 +338,9 @@ go install -v github.com/goplus/llgo/cmd/llgo@latest
```sh
echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-18 main" | sudo tee /etc/apt/sources.list.d/llvm.list
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update # execute if needed
sudo apt-get install -y llvm-18-dev clang-18 lld-18 pkg-config libgc-dev libssl-dev
sudo apt-get install -y libcjson-dev libsqlite3-dev python3.12-dev # optional
export PATH=/usr/lib/llvm-18/bin:$PATH # you may want to add this to your shell RC file, e.g. ~/.bashrc
sudo apt-get update
sudo apt-get install -y llvm-18-dev clang-18 lld-18 pkg-config libgc-dev libssl-dev zlib1g-dev
sudo apt-get install -y python3.12-dev # optional
go install -v github.com/goplus/llgo/cmd/llgo@latest
```