cockroachdb / cockroachdb/cockroach

GEOS functionality on Mac ARM (M1/M2) does not work

オープン
#93,161 コメント 7 件 リアクション 8 件 担当者 0 名 GitHub で見る
C-bug docs-done docs-known-limitation T-dev-inf
主要言語
Go
スター
32.5k
フォーク
4.1k
PR マージ指標
PR 指標を取得中

説明

### This is a tracking issue with no planned fix

Please 👍 this comment if you have need of this issue being fixed.

---

**Describe the problem**

After downloading the Mac ARM v22.2.0 binary, attempting to use the geospatial capabilities (e.g. `select st_isvalid(st_makepoint(0, 0))`) results in this error:

```
ERROR: st_isvalid(): geos: error during GEOS init: geos: cannot load GEOS from dir "/usr/local/lib/cockroach": geos error: dlopen(/usr/local/lib/cockroach/libgeos.dylib, 0x0001): tried: '/usr/local/lib/cockroach/libgeos.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/lib/cockroach/libgeos.dylib' (no such file), '/usr/local/lib/cockroach/libgeos.dylib' (no such file)
```

Once the geospatial libraries are placed in the expected location, using the geospatial capabilites results in this error:

```
ERROR: st_isvalid(): geos: error during GEOS init: geos: cannot load GEOS from dir "/usr/local/lib/cockroach": geos error: dlopen(/usr/local/lib/cockroach/libgeos.dylib, 0x0001): tried: '/usr/local/lib/cockroach/libgeos.dylib' (code signature in <86488A59-9B22-36D8-B460-1AB24AAEA2DF> '/usr/local/lib/cockroach/libgeos.dylib' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?))
```

**To Reproduce**

To produce the first error:

1. Download and install cockroach
```
curl https://binaries.cockroachdb.com/cockroach-v22.2.0.darwin-11.0-aarch64.tgz > cockroach-v22.2.0.darwin-11.0-aarch64.tgz
tar -zxvf cockroach-v22.2.0.darwin-11.0-aarch64.tgz
cd cockroach-v22.2.0.darwin-11.0-aarch64
```
1. Run `./cockroach demo`
1. At the SQL prompt, run: `select st_isvalid(st_makepoint(0, 0));`

Then, to produce the second error:

1. Move the libraries to the expected location:
```
sudo mkdir -p /usr/local/lib/cockroach
sudo cp lib/libgeos* /usr/local/lib/cockroach
```
1. Run `./cockroach demo`
1. At the SQL prompt, run: `select st_isvalid(st_makepoint(0, 0));`

**Post Fix**

After the fix is made, consider reverting the doc changes in [cockroachdb/docs#15733 (files)](https://github.com/cockroachdb/docs/pull/15733/files) and converting the warning on the Mac Install page to a note that this isn't available in v22.2.0 and the other affected point releases. Perhaps also assess if there are other docs changes we want to make.

Jira issue: CRDB-22194

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。