cockroachdb / cockroachdb/cockroach
GEOS functionality on Mac ARM (M1/M2) does not work
- Lingua principale
- Go
- Stelle
- 32.5k
- Fork
- 4.1k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
### 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
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.