pg.ddx.io pgvector/pgvector GitHub issues and pull requests
help / color / mirror / Atom feed[pgvector/pgvector] issue #137: Mac support
12+ messages / 4 participants
[nested] [flat]
* [pgvector/pgvector] issue #137: Mac support
@ 2023-05-24 16:20 "ammarck (@ammarck)" <noreply+ammarck@github.com>
0 siblings, 0 replies; 12+ messages in thread
From: ammarck (@ammarck) @ 2023-05-24 16:20 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
I get an error when I ran `make`:
```
❯ make
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Werror=unguarded-availability-new -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -Os -mmacosx-version-min=10.12 -arch arm64 -arch x86_64 -march=native -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math -I. -I./ -I/Applications/Postgres.app/Contents/Versions/14/include/postgresql/server -I/Applications/Postgres.app/Contents/Versions/14/include/postgresql/internal -I/Applications/Postgres.app/Contents/Versions/14/share/icu -I/Applications/Postgres.app/Contents/Versions/14/include/libxml2 -I/Applications/Postgres.app/Contents/Versions/14/include -I/Applications/Postgres.app/Contents/Versions/14/include -c -o src/ivfbuild.o src/ivfbuild.c
clang: error: the clang compiler does not support '-march=native'
make: *** [src/ivfbuild.o] Error 1
```
Also I saw [this line](https://github.com/pgvector/pgvector/blob/master/Makefile#L14) does this mean that mac is not supported?
^ permalink raw [nested|flat] 12+ messages in thread
* Re: [pgvector/pgvector] issue #137: Mac support
@ 2023-05-24 18:01 "ankane (@ankane)" <noreply+ankane@github.com>
10 siblings, 0 replies; 12+ messages in thread
From: ankane (@ankane) @ 2023-05-24 18:01 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Hi @ammarck, Mac is supported. What's the output of:
```sh
uname -msrp
```
^ permalink raw [nested|flat] 12+ messages in thread
* Re: [pgvector/pgvector] issue #137: Mac support
@ 2023-05-24 18:05 "ammarck (@ammarck)" <noreply+ammarck@github.com>
10 siblings, 0 replies; 12+ messages in thread
From: ammarck (@ammarck) @ 2023-05-24 18:05 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
@ankane
`Darwin 22.3.0 x86_64 i386`
^ permalink raw [nested|flat] 12+ messages in thread
* Re: [pgvector/pgvector] issue #137: Mac support
@ 2023-05-24 18:09 "ankane (@ankane)" <noreply+ankane@github.com>
10 siblings, 0 replies; 12+ messages in thread
From: ankane (@ankane) @ 2023-05-24 18:09 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Thanks, it looks like it's trying to build a universal binary (`-arch arm64 -arch x86_64`) for some reason. Does it work with:
```sh
make OPTFLAGS=""
```
^ permalink raw [nested|flat] 12+ messages in thread
* Re: [pgvector/pgvector] issue #137: Mac support
@ 2023-05-24 18:22 "ammarck (@ammarck)" <noreply+ammarck@github.com>
10 siblings, 0 replies; 12+ messages in thread
From: ammarck (@ammarck) @ 2023-05-24 18:22 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
It didn't fail, so I don't know if that is a success?
```
❯ make OPTFLAGS=""
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Werror=unguarded-availability-new -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -Os -mmacosx-version-min=10.12 -arch arm64 -arch x86_64 -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math -I. -I./ -I/Applications/Postgres.app/Contents/Versions/14/include/postgresql/server -I/Applications/Postgres.app/Contents/Versions/14/include/postgresql/internal -I/Applications/Postgres.app/Contents/Versions/14/share/icu -I/Applications/Postgres.app/Contents/Versions/14/include/libxml2 -I/Applications/Postgres.app/Contents/Versions/14/include -I/Applications/Postgres.app/Contents/Versions/14/include -c -o src/ivfbuild.o src/ivfbuild.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Werror=unguarded-availability-new -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -Os -mmacosx-version-min=10.12 -arch arm64 -arch x86_64 -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math -I. -I./ -I/Applications/Postgres.app/Contents/Versions/14/include/postgresql/server -I/Applications/Postgres.app/Contents/Versions/14/include/postgresql/internal -I/Applications/Postgres.app/Contents/Versions/14/share/icu -I/Applications/Postgres.app/Contents/Versions/14/include/libxml2 -I/Applications/Postgres.app/Contents/Versions/14/include -I/Applications/Postgres.app/Contents/Versions/14/include -c -o src/ivfflat.o src/ivfflat.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Werror=unguarded-availability-new -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -Os -mmacosx-version-min=10.12 -arch arm64 -arch x86_64 -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math -I. -I./ -I/Applications/Postgres.app/Contents/Versions/14/include/postgresql/server -I/Applications/Postgres.app/Contents/Versions/14/include/postgresql/internal -I/Applications/Postgres.app/Contents/Versions/14/share/icu -I/Applications/Postgres.app/Contents/Versions/14/include/libxml2 -I/Applications/Postgres.app/Contents/Versions/14/include -I/Applications/Postgres.app/Contents/Versions/14/include -c -o src/ivfinsert.o src/ivfinsert.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Werror=unguarded-availability-new -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -Os -mmacosx-version-min=10.12 -arch arm64 -arch x86_64 -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math -I. -I./ -I/Applications/Postgres.app/Contents/Versions/14/include/postgresql/server -I/Applications/Postgres.app/Contents/Versions/14/include/postgresql/internal -I/Applications/Postgres.app/Contents/Versions/14/share/icu -I/Applications/Postgres.app/Contents/Versions/14/include/libxml2 -I/Applications/Postgres.app/Contents/Versions/14/include -I/Applications/Postgres.app/Contents/Versions/14/include -c -o src/ivfkmeans.o src/ivfkmeans.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Werror=unguarded-availability-new -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -Os -mmacosx-version-min=10.12 -arch arm64 -arch x86_64 -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math -I. -I./ -I/Applications/Postgres.app/Contents/Versions/14/include/postgresql/server -I/Applications/Postgres.app/Contents/Versions/14/include/postgresql/internal -I/Applications/Postgres.app/Contents/Versions/14/share/icu -I/Applications/Postgres.app/Contents/Versions/14/include/libxml2 -I/Applications/Postgres.app/Contents/Versions/14/include -I/Applications/Postgres.app/Contents/Versions/14/include -c -o src/ivfscan.o src/ivfscan.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Werror=unguarded-availability-new -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -Os -mmacosx-version-min=10.12 -arch arm64 -arch x86_64 -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math -I. -I./ -I/Applications/Postgres.app/Contents/Versions/14/include/postgresql/server -I/Applications/Postgres.app/Contents/Versions/14/include/postgresql/internal -I/Applications/Postgres.app/Contents/Versions/14/share/icu -I/Applications/Postgres.app/Contents/Versions/14/include/libxml2 -I/Applications/Postgres.app/Contents/Versions/14/include -I/Applications/Postgres.app/Contents/Versions/14/include -c -o src/ivfutils.o src/ivfutils.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Werror=unguarded-availability-new -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -Os -mmacosx-version-min=10.12 -arch arm64 -arch x86_64 -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math -I. -I./ -I/Applications/Postgres.app/Contents/Versions/14/include/postgresql/server -I/Applications/Postgres.app/Contents/Versions/14/include/postgresql/internal -I/Applications/Postgres.app/Contents/Versions/14/share/icu -I/Applications/Postgres.app/Contents/Versions/14/include/libxml2 -I/Applications/Postgres.app/Contents/Versions/14/include -I/Applications/Postgres.app/Contents/Versions/14/include -c -o src/ivfvacuum.o src/ivfvacuum.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Werror=unguarded-availability-new -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -Os -mmacosx-version-min=10.12 -arch arm64 -arch x86_64 -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math -I. -I./ -I/Applications/Postgres.app/Contents/Versions/14/include/postgresql/server -I/Applications/Postgres.app/Contents/Versions/14/include/postgresql/internal -I/Applications/Postgres.app/Contents/Versions/14/share/icu -I/Applications/Postgres.app/Contents/Versions/14/include/libxml2 -I/Applications/Postgres.app/Contents/Versions/14/include -I/Applications/Postgres.app/Contents/Versions/14/include -c -o src/vector.o src/vector.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Werror=unguarded-availability-new -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -Os -mmacosx-version-min=10.12 -arch arm64 -arch x86_64 -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math -bundle -multiply_defined suppress -o vector.so src/ivfbuild.o src/ivfflat.o src/ivfinsert.o src/ivfkmeans.o src/ivfscan.o src/ivfutils.o src/ivfvacuum.o src/vector.o -L/Applications/Postgres.app/Contents/Versions/14/lib -L/Applications/Postgres.app/Contents/Versions/14/lib -L/Applications/Postgres.app/Contents/Versions/14/lib -L/Applications/Postgres.app/Contents/Versions/14/lib -Wl,-dead_strip_dylibs -bundle_loader /Applications/Postgres.app/Contents/Versions/14/bin/postgres
cp sql/vector.sql sql/vector--0.4.2.sql
```
Then I ran
```
❯ make install
/bin/sh /Applications/Postgres.app/Contents/Versions/14/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -d '/Applications/Postgres.app/Contents/Versions/14/lib/postgresql'
/bin/sh /Applications/Postgres.app/Contents/Versions/14/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -d '/Applications/Postgres.app/Contents/Versions/14/share/postgresql/extension'
/bin/sh /Applications/Postgres.app/Contents/Versions/14/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -d '/Applications/Postgres.app/Contents/Versions/14/share/postgresql/extension'
/usr/bin/install -c -m 755 vector.so '/Applications/Postgres.app/Contents/Versions/14/lib/postgresql/vector.so'
install: /Applications/Postgres.app/Contents/Versions/14/lib/postgresql/vector.so: Operation not permitted
make: *** [install-lib-shared] Error 71
```
Which failed
^ permalink raw [nested|flat] 12+ messages in thread
* Re: [pgvector/pgvector] issue #137: Mac support
@ 2023-05-24 18:39 "ankane (@ankane)" <noreply+ankane@github.com>
10 siblings, 0 replies; 12+ messages in thread
From: ankane (@ankane) @ 2023-05-24 18:39 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Use `sudo make install` to fix `Operation not permitted`.
From what I can tell, the original issue affects Postgres.app on x86_64. Will try to find a way to make things work automatically, but for now, users should use:
```sh
make OPTFLAGS=""
```
^ permalink raw [nested|flat] 12+ messages in thread
* Re: [pgvector/pgvector] issue #137: Mac support
@ 2023-05-24 18:39 "ankane (@ankane)" <noreply+ankane@github.com>
10 siblings, 0 replies; 12+ messages in thread
From: ankane (@ankane) @ 2023-05-24 18:39 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
@ankane closed this.
^ permalink raw [nested|flat] 12+ messages in thread
* Re: [pgvector/pgvector] issue #137: Mac support
@ 2023-05-24 18:42 "ammarck (@ammarck)" <noreply+ammarck@github.com>
10 siblings, 0 replies; 12+ messages in thread
From: ammarck (@ammarck) @ 2023-05-24 18:42 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
```
❯ sudo make install
/bin/sh /Applications/Postgres.app/Contents/Versions/14/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -d '/Applications/Postgres.app/Contents/Versions/14/lib/postgresql'
/bin/sh /Applications/Postgres.app/Contents/Versions/14/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -d '/Applications/Postgres.app/Contents/Versions/14/share/postgresql/extension'
/bin/sh /Applications/Postgres.app/Contents/Versions/14/lib/postgresql/pgxs/src/makefiles/../../config/install-sh -c -d '/Applications/Postgres.app/Contents/Versions/14/share/postgresql/extension'
/usr/bin/install -c -m 755 vector.so '/Applications/Postgres.app/Contents/Versions/14/lib/postgresql/vector.so'
install: /Applications/Postgres.app/Contents/Versions/14/lib/postgresql/vector.so: Operation not permitted
make: *** [install-lib-shared] Error 71
```
Even with `sudo` it doesn't work. It doesn't look like the file `/Applications/Postgres.app/Contents/Versions/14/lib/postgresql/vector.so` is even there.
^ permalink raw [nested|flat] 12+ messages in thread
* Re: [pgvector/pgvector] issue #137: Mac support
@ 2023-05-24 18:58 "ankane (@ankane)" <noreply+ankane@github.com>
10 siblings, 0 replies; 12+ messages in thread
From: ankane (@ankane) @ 2023-05-24 18:58 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
It looks like you may need to give your terminal [permission](https://github.com/PostgresApp/PostgresApp/issues/716#issuecomment-1537467805) to modify apps to install extensions with Postgres.app (but not sure I'd recommend that).
Also, Postgres.app now [includes pgvector](https://github.com/PostgresApp/PostgresApp/issues/716#issuecomment-1544406741), so you could try upgrading to the latest version.
^ permalink raw [nested|flat] 12+ messages in thread
* Re: [pgvector/pgvector] issue #137: Mac support
@ 2023-05-25 16:20 "ammarck (@ammarck)" <noreply+ammarck@github.com>
10 siblings, 0 replies; 12+ messages in thread
From: ammarck (@ammarck) @ 2023-05-25 16:20 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
I tried the latest postgres app with latest postgresql and it didn't work.
```
postgres=# CREATE TABLE items (id bigserial PRIMARY KEY, embedding vector(3));
ERROR: type "vector" does not exist
LINE 1: ... TABLE items (id bigserial PRIMARY KEY, embedding vector(3))...
```
```
postgres=# \dx
List of installed extensions
Name | Version | Schema | Description
---------+---------+------------+------------------------------
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
(1 row)
postgres=# SELECT *
postgres-# FROM pg_extension;
oid | extname | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition
-------+---------+----------+--------------+----------------+------------+-----------+--------------
13823 | plpgsql | 10 | 11 | f | 1.0 | |
(1 row)
```
^ permalink raw [nested|flat] 12+ messages in thread
* Re: [pgvector/pgvector] issue #137: Mac support
@ 2025-01-10 19:26 "albertski (@albertski)" <noreply+albertski@github.com>
10 siblings, 0 replies; 12+ messages in thread
From: albertski (@albertski) @ 2025-01-10 19:26 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
> Also, Postgres.app now [includes pgvector](https://github.com/PostgresApp/PostgresApp/issues/716#issuecomment-1544406741), so you could try upgrading to the latest version.
Thanks @ankane. I was having issues getting it working too, but I may have had it already included but had to run:
```
CREATE EXTENSION vector;
```
^ permalink raw [nested|flat] 12+ messages in thread
* Re: [pgvector/pgvector] issue #137: Mac support
@ 2025-01-11 02:41 "jkatz (@jkatz)" <noreply+jkatz@github.com>
10 siblings, 0 replies; 12+ messages in thread
From: jkatz (@jkatz) @ 2025-01-11 02:41 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
This is a standard PostgreSQL command to install an extension; it's included as the first part in the [Getting Started](https://github.com/pgvector/pgvector?tab=readme-ov-file#getting-started) page.
^ permalink raw [nested|flat] 12+ messages in thread
end of thread, other threads:[~2025-01-11 02:41 UTC | newest]
Thread overview: 12+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-05-24 16:20 [pgvector/pgvector] issue #137: Mac support "ammarck (@ammarck)" <noreply+ammarck@github.com>
2023-05-24 18:01 ` "ankane (@ankane)" <noreply+ankane@github.com>
2023-05-24 18:05 ` "ammarck (@ammarck)" <noreply+ammarck@github.com>
2023-05-24 18:09 ` "ankane (@ankane)" <noreply+ankane@github.com>
2023-05-24 18:22 ` "ammarck (@ammarck)" <noreply+ammarck@github.com>
2023-05-24 18:39 ` "ankane (@ankane)" <noreply+ankane@github.com>
2023-05-24 18:39 ` "ankane (@ankane)" <noreply+ankane@github.com>
2023-05-24 18:42 ` "ammarck (@ammarck)" <noreply+ammarck@github.com>
2023-05-24 18:58 ` "ankane (@ankane)" <noreply+ankane@github.com>
2023-05-25 16:20 ` "ammarck (@ammarck)" <noreply+ammarck@github.com>
2025-01-10 19:26 ` "albertski (@albertski)" <noreply+albertski@github.com>
2025-01-11 02:41 ` "jkatz (@jkatz)" <noreply+jkatz@github.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox