pg.ddx.io pgvector/pgvector GitHub issues and pull requests
help / color / mirror / Atom feed[pgvector/pgvector] issue #592: can't make pgvector
10+ messages / 6 participants
[nested] [flat]
* [pgvector/pgvector] issue #592: can't make pgvector
@ 2024-06-11 02:09 "ZacharyWu11 (@ZacharyWu11)" <noreply+ZacharyWu11@github.com>
0 siblings, 0 replies; 10+ messages in thread
From: ZacharyWu11 (@ZacharyWu11) @ 2024-06-11 02:09 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
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 -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -mmacosx-version-min=10.15 -arch x86_64 -arch arm64 -O2 -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math -I. -I./ -I/Library/PostgreSQL/15/include/postgresql/server -I/Library/PostgreSQL/15/include/postgresql/internal -I/opt/local/Current_v15/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -I/opt/local/20220418/include/libxml2 -I/opt/local/Current_v15/include -I/opt/local/Current_v15/include -I/opt/local/Current_v15/include/libxml2 -I/opt/local/Current_v15/include -I/opt/local/Current_v15/include/openssl/ -c -o src/bitutils.o src/bitutils.c
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk' [-Wmissing-sysroot]
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk' [-Wmissing-sysroot]
In file included from src/bitutils.c:1:
In file included from /Library/PostgreSQL/15/include/postgresql/server/postgres.h:46:
/Library/PostgreSQL/15/include/postgresql/server/c.h:59:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
make: *** [src/bitutils.o] Error 1
this is the error.
ls /Library/Developer/CommandLineTools/SDKs/
MacOSX.sdk MacOSX13.3.sdk MacOSX13.sdk MacOSX14.4.sdk MacOSX14.sdk
^ permalink raw [nested|flat] 10+ messages in thread
* Re: [pgvector/pgvector] issue #592: can't make pgvector
@ 2024-06-11 04:39 ` "ankane (@ankane)" <noreply+ankane@github.com>
8 siblings, 0 replies; 10+ messages in thread
From: ankane (@ankane) @ 2024-06-11 04:39 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Hi @ZacharyWu11, check out [this section](https://github.com/pgvector/pgvector?tab=readme-ov-file#missing-sdk) of the docs.
^ permalink raw [nested|flat] 10+ messages in thread
* Re: [pgvector/pgvector] issue #592: can't make pgvector
@ 2024-06-11 04:39 ` "ankane (@ankane)" <noreply+ankane@github.com>
8 siblings, 0 replies; 10+ messages in thread
From: ankane (@ankane) @ 2024-06-11 04:39 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
@ankane closed this.
^ permalink raw [nested|flat] 10+ messages in thread
* Re: [pgvector/pgvector] issue #592: can't make pgvector
@ 2024-06-19 06:40 ` "ZacharyWu11 (@ZacharyWu11)" <noreply+ZacharyWu11@github.com>
8 siblings, 0 replies; 10+ messages in thread
From: ZacharyWu11 (@ZacharyWu11) @ 2024-06-19 06:40 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
MacBook-Pro pgvector-master % ls /Library/Developer/CommandLineTools/SDKs
MacOSX.sdk MacOSX13.3.sdk MacOSX13.sdk MacOSX14.4.sdk MacOSX14.sdk
MacBook-Pro pgvector-master % 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 -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -mmacosx-version-min=10.15 -arch x86_64 -arch arm64 -O2 -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math -I. -I./ -I/Library/PostgreSQL/15/include/postgresql/server -I/Library/PostgreSQL/15/include/postgresql/internal -I/opt/local/Current_v15/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -I/opt/local/20220418/include/libxml2 -I/opt/local/Current_v15/include -I/opt/local/Current_v15/include -I/opt/local/Current_v15/include/libxml2 -I/opt/local/Current_v15/include -I/opt/local/Current_v15/include/openssl/ -c -o src/bitutils.o src/bitutils.c
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk' [-Wmissing-sysroot]
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk' [-Wmissing-sysroot]
In file included from src/bitutils.c:1:
In file included from /Library/PostgreSQL/15/include/postgresql/server/postgres.h:46:
/Library/PostgreSQL/15/include/postgresql/server/c.h:59:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
I have already execute. "sudo rm -rf /Library/Developer/CommandLineTools"
and execute " xcode-select --install" ,but the SDKS version is MacOSX.sdk MacOSX13.3.sdk MacOSX13.sdk MacOSX14.4.sdk MacOSX14.sdk, doesn't have 11.3
> 你好@ZacharyWu11,请查看文档的[这一部分。](https://github.com/pgvector/pgvector?tab=readme-ov-file#missing-sdk)
^ permalink raw [nested|flat] 10+ messages in thread
* Re: [pgvector/pgvector] issue #592: can't make pgvector
@ 2024-06-19 06:40 ` "ZacharyWu11 (@ZacharyWu11)" <noreply+ZacharyWu11@github.com>
8 siblings, 0 replies; 10+ messages in thread
From: ZacharyWu11 (@ZacharyWu11) @ 2024-06-19 06:40 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
@ankane
^ permalink raw [nested|flat] 10+ messages in thread
* Re: [pgvector/pgvector] issue #592: can't make pgvector
@ 2024-06-19 06:56 ` "ankane (@ankane)" <noreply+ankane@github.com>
8 siblings, 0 replies; 10+ messages in thread
From: ankane (@ankane) @ 2024-06-19 06:56 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
It's likely an issue with your Postgres installation (which will prevent compiling any extension, not just pgvector). You can check `pg_config` to confirm it has the non-existent path. You'll likely need to recompile Postgres to fix.
^ permalink raw [nested|flat] 10+ messages in thread
* Re: [pgvector/pgvector] issue #592: can't make pgvector
@ 2024-06-21 12:40 ` "Luminilion (@Luminilion)" <noreply+Luminilion@github.com>
8 siblings, 0 replies; 10+ messages in thread
From: Luminilion (@Luminilion) @ 2024-06-21 12:40 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Had the same problem and indeed `make` (as instructed for Linux and Mac in the `README`) uses the Command Line Tools referred to by Postgresql. So it's not pgvector's fault.
In my case, it's because the Mac installer from https://www.postgresql.org/download/ installs Postgresql configured to use outdated version of Command Line Tools.
I solved it like this:
- Uninstall Postgresql (there is an uninstall file in `/Library/Postgresql/16/`)
- Install it again using homebrew: `brew install postgresql@16`
- Run `pg_config`, you should have the installed version of Command Line Tools configured
- If `pg_config` fails, maybe you forgot to export the bin folder path. To do so run: `echo 'export PATH="/opt/homebrew/opt/postgresql@16/bin:$PATH"' >> ~/.zshrc`
- Then `make` ... (as per installation instructions)
Here are some other things to try:
- Check that indeed it's the case by running `pg_config`. You should see the faulty SDK.
- Try to reinstall Command Line Tools to see if this gets you the right version
- Rename `/Library/Developer/CommandLineTools` to `/Library/Developer/CommandLineTools_BACKUP` or whatever, for an eventual backup.
- run `xcode-select --install`
- Follow the install wizard
- Check if you now have the right SDKs inside `/Library/Developer/CommandLineTools/SDKs/`
- Otherwise you can try to install the (most probably) outdated version from https://developer.apple.com/download/all/ (You need an apple ID to login).
- In my case it simply told me none of the disks were an option for the installation because the OS does not support it.
^ permalink raw [nested|flat] 10+ messages in thread
* Re: [pgvector/pgvector] issue #592: can't make pgvector
@ 2024-06-22 15:41 ` "nicefella (@nicefella)" <noreply+nicefella@github.com>
8 siblings, 0 replies; 10+ messages in thread
From: nicefella (@nicefella) @ 2024-06-22 15:41 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
> Had the same problem and indeed `make` (as instructed for Linux and Mac in the `README`) uses the Command Line Tools referred to by Postgresql. So it's not pgvector's fault.
>
> In my case, it's because the Mac installer from https://www.postgresql.org/download/ installs Postgresql configured to use outdated version of Command Line Tools.
>
> I solved it like this:
>
> * Uninstall Postgresql (there is an uninstall file in `/Library/Postgresql/16/`)
> * Install it again using homebrew: `brew install postgresql@16`
> * Run `pg_config`, you should have the installed version of Command Line Tools configured
> * If `pg_config` fails, maybe you forgot to export the bin folder path. To do so run: `echo 'export PATH="/opt/homebrew/opt/postgresql@16/bin:$PATH"' >> ~/.zshrc`
> * Then `make` ... (as per installation instructions)
>
> Here are some other things to try:
>
> * Check that indeed it's the case by running `pg_config`. You should see the faulty SDK.
> * Try to reinstall Command Line Tools to see if this gets you the right version
>
> * Rename `/Library/Developer/CommandLineTools` to `/Library/Developer/CommandLineTools_BACKUP` or whatever, for an eventual backup.
> * run `xcode-select --install`
> * Follow the install wizard
> * Check if you now have the right SDKs inside `/Library/Developer/CommandLineTools/SDKs/`
> * Otherwise you can try to install the (most probably) outdated version from https://developer.apple.com/download/all/ (You need an apple ID to login).
>
> * In my case it simply told me none of the disks were an option for the installation because the OS does not support it.
It definitely worked for my case, thank you so much :)
^ permalink raw [nested|flat] 10+ messages in thread
* Re: [pgvector/pgvector] issue #592: can't make pgvector
@ 2024-12-30 22:12 ` "nileshtrivedi (@nileshtrivedi)" <noreply+nileshtrivedi@github.com>
8 siblings, 0 replies; 10+ messages in thread
From: nileshtrivedi (@nileshtrivedi) @ 2024-12-30 22:12 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
I noticed this happens when mac os is upgraded to a version newer than what `pg_config --cppflags` and `pg_config --ldflags` report. XCode removes the older SDK but pg_config continues to refer to it.
It can be fixed by creating a symlink like this:
```
$ cd /Library/Developer/CommandLineTools/SDKs
SDKs $ sudo ln -s MacOSX15.2.sdk MacOSX15.1.sdk
SDKs $ ls -l
total 0
lrwxr-xr-x 1 root wheel 14 Dec 28 21:33 MacOSX.sdk -> MacOSX15.2.sdk
drwxr-xr-x 7 root wheel 224 Dec 28 21:34 MacOSX14.5.sdk
lrwxr-xr-x 1 root wheel 14 Dec 28 21:33 MacOSX14.sdk -> MacOSX14.5.sdk
lrwxr-xr-x 1 root wheel 14 Dec 31 03:36 MacOSX15.1.sdk -> MacOSX15.2.sdk
drwxr-xr-x 7 root wheel 224 Dec 31 03:26 MacOSX15.2.sdk
lrwxr-xr-x 1 root wheel 14 Dec 28 21:33 MacOSX15.sdk -> MacOSX15.2.sdk
```
Now `MacOSX15.1.sdk` exists as a symlink to the newer SDK `MacOSX15.2.sdk` which makes postgres build tools happy without recompiling it.
^ permalink raw [nested|flat] 10+ messages in thread
* Re: [pgvector/pgvector] issue #592: can't make pgvector
@ 2025-02-18 19:24 ` "MalikRumi (@MalikRumi)" <noreply+MalikRumi@github.com>
8 siblings, 0 replies; 10+ messages in thread
From: MalikRumi (@MalikRumi) @ 2025-02-18 19:24 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
I have never had MacOSX11, or any SDK related thereto, on this computer. I have:
MacOSX.sdk
MacOSX14.5.sdk
MacOSX14.sdk
MacOSX15.2.sdk
MacOSX15.sdk
I ran sudo xcode-select –install yesterday, but as near as I can tell, it did nothing. All the referenced SDKs but one are dated January 20, 2025. The outlier is dated November 21, 2024. Neither date is this week.
I found a reference to MacOSX11.sdk on line 35 in pg_config.h. I thought a one character change on this line in this file from 1 to 5 would fix this problem. It has not.
Despite having recently upgraded to 15.3.1, I do not have a similarly named SDK, and as indicated, I never had 11. Nevertheless, I decided to try nileshtrivedi’s suggestion, because re-installing and recompiling for this very small change in text – wherever it is coming from – is simply ridiculous.
SDKs % sudo ln -s MacOSX15.2.sdk MacOSX11.sdk
SDKs % ls -l
total 0
lrwxr-xr-x 1 root wheel 14 Jan 20 15:05 MacOSX.sdk -> MacOSX15.2.sdk
lrwxr-xr-x 1 root wheel 14 Feb 18 12:50 MacOSX11.sdk -> MacOSX15.2.sdk
drwxr-xr-x 7 root wheel 224 Jan 20 15:06 MacOSX14.5.sdk
lrwxr-xr-x 1 root wheel 14 Jan 20 15:05 MacOSX14.sdk -> MacOSX14.5.sdk
drwxr-xr-x 7 root wheel 224 Nov 21 02:05 MacOSX15.2.sdk
lrwxr-xr-x 1 root wheel 14 Jan 20 15:05 MacOSX15.sdk -> MacOSX15.2.sdk
SDKs %
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk' [-Wmissing-sysroot]
The same error every time, regardless of what I do. And this one, too, which I also get every time, but is also wrong, because that file is right where make claims it can’t find it:
/Library/PostgreSQL/16/include/postgresql/server/c.h:59:10: fatal error: 'stdio.h' file not found
59 | #include <stdio.h>
| ^~~~~~~~~
1 error generated.
make: *** [src/bitutils.o] Error 1
Why can’t someone upstream fix this? Has an issue been opened? A pull request? Where exactly is this coming from? What happened to the rule against hard coding changeable values? Sheesh…
^ permalink raw [nested|flat] 10+ messages in thread
end of thread, other threads:[~2025-02-18 19:24 UTC | newest]
Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-06-11 02:09 [pgvector/pgvector] issue #592: can't make pgvector "ZacharyWu11 (@ZacharyWu11)" <noreply+ZacharyWu11@github.com>
2024-06-11 04:39 ` "ankane (@ankane)" <noreply+ankane@github.com>
2024-06-11 04:39 ` "ankane (@ankane)" <noreply+ankane@github.com>
2024-06-19 06:40 ` "ZacharyWu11 (@ZacharyWu11)" <noreply+ZacharyWu11@github.com>
2024-06-19 06:40 ` "ZacharyWu11 (@ZacharyWu11)" <noreply+ZacharyWu11@github.com>
2024-06-19 06:56 ` "ankane (@ankane)" <noreply+ankane@github.com>
2024-06-21 12:40 ` "Luminilion (@Luminilion)" <noreply+Luminilion@github.com>
2024-06-22 15:41 ` "nicefella (@nicefella)" <noreply+nicefella@github.com>
2024-12-30 22:12 ` "nileshtrivedi (@nileshtrivedi)" <noreply+nileshtrivedi@github.com>
2025-02-18 19:24 ` "MalikRumi (@MalikRumi)" <noreply+MalikRumi@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