From: mdsardar (@mdsardar) <noreply+mdsardar@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: [pgvector/pgvector] issue #492: trouble while instaling postgres pgvector in windows
Date: Fri, 15 Mar 2024 17:51:29 +0000
Message-ID: <gh-pgvector-pgvector-492@github.com> (raw)
Hey All,
I'm keenly following the steps explained in this github page. [pgvector](https://github.com/pgvector/pgvector?tab=readme-ov-file#conda-forge)
Windows
Ensure [C++ support in Visual Studio](https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#download-and-...) is installed, and run:
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
Note: The exact path will vary depending on your Visual Studio version and edition
Then use nmake to build:
set "PGROOT=C:\Program Files\PostgreSQL\16"
git clone --branch v0.6.1 https://github.com/pgvector/pgvector.git
cd pgvector
nmake /F Makefile.win
nmake /F Makefile.win install
The issue pops while I try to invoke nmake /F MakeFile.win. The below error is shown.
C:\Users\moham\pgvector\pgvector>nmake /F Makefile.win
Microsoft (R) Program Maintenance Utility Version 14.39.33522.0
Copyright (C) Microsoft Corporation. All rights reserved.
cl /nologo /I"C:\Program Files\PostgreSQL\16\include\server\port\win32_msvc" /I"C:\Program Files\PostgreSQL\16\include\server\port\win32" /I"C:\Program Files\PostgreSQL\16\include\server" /I"C:\Program Files\PostgreSQL\16\include" /O2 /fp:fast /c src\hnsw.c /Fosrc\hnsw.obj
hnsw.c
src\hnsw.c(1): fatal error C1083: Cannot open include file: 'postgres.h': No such file or directory
NMAKE : fatal error U1077: 'cl /nologo /I"C:\Program Files\PostgreSQL\16\include\server\port\win32_msvc" /I"C:\Program Files\PostgreSQL\16\include\server\port\win32" /I"C:\Program Files\PostgreSQL\16\include\server" /I"C:\Program Files\PostgreSQL\16\include" /O2 /fp:fast /c src\hnsw.c /Fosrc\hnsw.obj' : return code '0x2'
Stop.
I tried to work this out but couldn't find anything useful from net. Can someone like to help to move forward that's appreciated.Thanks.