pgvector / pgvector

Open-source vector similarity search for Postgres

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue installing on mac

dixpac opened this issue · comments

Whey I try to make on mac m1 i get this error
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 -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/bitutils.o src/bitutils.c In file included from src/bitutils.c:17: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.3/include/intrin.h:12:15: fatal error: 'intrin.h' file not found #include_next <intrin.h> ^~~~~~~~~~ 1 error generated. make: *** [src/bitutils.o] Error 1

I've installed xcode command line tools.
I'm on macOS: 13.2.1

Did anyone had this issue in the past?

Thanks

Hi @dixpac, it looks like it's trying to build a universal binary (similar to #137). Try compiling it with:

make clean && PG_CFLAGS="-DDISABLE_DISPATCH" make

Thanks @ankane ...works like a charm

Great. Also pushed a fix in the commit above so additional flags won't be needed for 0.7.1+.