Closed markwillowtree closed 3 weeks ago
can you try
RUSTFLAGS="-C target-feature=+avx2,+fma" cargo pgrx install --release
Thanks, that has helped move me forward but I have encountered new problems with the installation procedure.
With the new command I got a new error about a missing library
RUSTFLAGS="-C target-feature=+avx2,+fma" cargo pgrx install --release
error: linking with `cc` failed: exit status: 1
...
/usr/bin/ld: cannot find -lopenblas: No such file or directory
collect2: error: ld returned 1 exit status
I fixed this issue by installing libopenblas
sudo apt-get install libopenblas-dev
Now compilation succeeds, but the copying of the file fails due to lack of permissions.
0: failed writing `/home/linux/pgvectorscale/pgvectorscale/vectorscale.control` to `/usr/share/postgresql/16/extension/vectorscale.control`
1: Permission denied (os error 13)
So I copied this file manually using sudo.
sudo cp vectorscale.control /usr/share/postgresql/16/extension
and then ran this SQL in pgadmin
CREATE EXTENSION IF NOT EXISTS vectorscale CASCADE;
and got the following error.
ERROR: extension "vectorscale" has no installation script nor update path for version "@CARGO_VERSION@"
I figured the permissions issue out. I've added the necessary steps below in case anyone else is having the same problem.
Change permissions on postgres extensions folder to allow postgres user access.
sudo chown postgres -R /usr/share/postgresql/16/extension/
sudo chown postgres -R /usr/lib/postgresql/16/lib/
Compile the code as the postgres user and specify target features.
sudo -u postgres -i
RUSTFLAGS="-C target-feature=+avx2,+fma" cargo pgrx install --release
The following SQL should now work.
CREATE EXTENSION IF NOT EXISTS vectorscale CASCADE;
I am running postgresql16 on ubuntu 22.04 with a 14900k cpu.
I have followed the instructions to compile from source on this page https://github.com/timescale/pgvectorscale/blob/main/DEVELOPMENT.md and am getting the following errors
Could you advise on how to proceed, please?