pg.ddx.io pgvector/pgvector GitHub issues and pull requestshelp / color / mirror / Atom feed
[pgvector/pgvector] issue #1062: LNK1112: x64 object files conflict with x86 target when building pgvector on PostgreSQL 18.6 (Windows) 3+ messages / 2 participants [nested] [flat]
* [pgvector/pgvector] issue #1062: LNK1112: x64 object files conflict with x86 target when building pgvector on PostgreSQL 18.6 (Windows) @ 2026-11-11 20:33 "jtb0964 (@jtb0964)" <noreply+jtb0964@github.com> 0 siblings, 0 replies; 3+ messages in thread From: jtb0964 (@jtb0964) @ 2026-11-11 20:33 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> ### Environment - pgvector master - git describe --tags - v0.8.7-57-g66accb3 - PostgreSQL 18.6 x64 (EnterpriseDB installer) - Windows 11 Pro - Visual Studio Build Tools 2026 - MSVC 19.52.37029 ### Build Procedure ```cmd call "C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools\Common7\Tools\VsDevCmd.bat" -host_arch=x64 -arch=x64 set PGROOT=C:\Program Files\PostgreSQL\18 cd %TEMP%\pgvector nmake /F Makefile.win ``` ### Verification Compiler: ```text Microsoft (R) C/C++ Optimizing Compiler Version 19.52.37029 for x64 ``` Environment: ```text VSCMD_ARG_HOST_ARCH=x64 VSCMD_ARG_TGT_ARCH=x64 ``` postgres.lib: ```cmd dumpbin /headers "C:\Program Files\PostgreSQL\18\lib\postgres.lib" | findstr machine ``` Output: ```text 8664 machine (x64) ``` hnsw.obj: ```cmd dumpbin /headers src\hnsw.obj | findstr machine ``` Output: ```text 8664 machine (x64) ``` vector.obj: ```cmd dumpbin /headers src\vector.obj | findstr machine ``` Output: ```text 8664 machine (x64) ``` ### Issue All source files compile successfully. The build fails only during DLL linking with: ```text src\hnsw.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86' ``` The build reaches: ```text /OUT:vector.dll ``` before failing. ### Notes I initially encountered: ```text tupmacs.h(66): error C2196: case value '4' already used ``` which was resolved by switching from an x86 build environment to: ```cmd VsDevCmd.bat -host_arch=x64 -arch=x64 ``` After correcting the architecture mismatch, all .c files compile successfully and only the final link step fails. Has anyone successfully built pgvector on PostgreSQL 18.6 x64 with Visual Studio Build Tools 2026, or is there a known workaround for this linker issue? [git issue screennshots.docx](https://github.com/user-attachments/files/34704456/git.issue.screennshots.docx) [git issue screennshots.docx](https://github.com/user-attachments/files/34704484/git.issue.screennshots.docx) [git issue screennshots.docx](https://github.com/user-attachments/files/34704494/git.issue.screennshots.docx) ^ permalink raw [nested|flat] 3+ messages in thread
* Re: [pgvector/pgvector] issue #1062: LNK1112: x64 object files conflict with x86 target when building pgvector on PostgreSQL 18.6 (Windows) @ 2026-11-11 20:40 "ankane (@ankane)" <noreply+ankane@github.com> 1 sibling, 0 replies; 3+ messages in thread From: ankane (@ankane) @ 2026-11-11 20:40 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> Hi @jtb0964, be sure to use `x64 Native Tools Command Prompt` and run `nmake /F Makefile.win clean` after correcting the architecture ([docs](https://github.com/pgvector/pgvector#mismatched-architecture)). ^ permalink raw [nested|flat] 3+ messages in thread
* Re: [pgvector/pgvector] issue #1062: LNK1112: x64 object files conflict with x86 target when building pgvector on PostgreSQL 18.6 (Windows) @ 2026-11-11 20:40 "ankane (@ankane)" <noreply+ankane@github.com> 1 sibling, 0 replies; 3+ messages in thread From: ankane (@ankane) @ 2026-11-11 20:40 UTC (permalink / raw) To: pgvector/pgvector <noreply+pgvector-pgvector@github.com> @ankane closed this. ^ permalink raw [nested|flat] 3+ messages in thread
end of thread, other threads:[~2026-11-11 20:40 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-11-11 20:33 [pgvector/pgvector] issue #1062: LNK1112: x64 object files conflict with x86 target when building pgvector on PostgreSQL 18.6 (Windows) "jtb0964 (@jtb0964)" <noreply+jtb0964@github.com> 2026-11-11 20:40 ` "ankane (@ankane)" <noreply+ankane@github.com> 2026-11-11 20:40 ` "ankane (@ankane)" <noreply+ankane@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