pg.ddx.io pgvector/pgvector GitHub issues and pull requests
help / color / mirror / Atom feed[pgvector/pgvector] issue #792: MSVC compiler error (C1017: invalid integer constant expression)
7+ messages / 2 participants
[nested] [flat]
* [pgvector/pgvector] issue #792: MSVC compiler error (C1017: invalid integer constant expression)
@ 2025-03-04 18:50 "musabaku (@musabaku)" <noreply+musabaku@github.com>
0 siblings, 0 replies; 7+ messages in thread
From: musabaku (@musabaku) @ 2025-03-04 18:50 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Iam encountering an MSVC compiler error (C1017: invalid integer constant expression) triggered by a macro in PostgreSQL 16’s tupmacs.h. It arises because MSVC’s strict constant expression rules conflict with how the macro is defined in the PostgreSQL header.

^ permalink raw [nested|flat] 7+ messages in thread
* Re: [pgvector/pgvector] issue #792: MSVC compiler error (C1017: invalid integer constant expression)
@ 2025-03-04 19:08 ` "ankane (@ankane)" <noreply+ankane@github.com>
5 siblings, 0 replies; 7+ messages in thread
From: ankane (@ankane) @ 2025-03-04 19:08 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Hi @musabaku, this seems like an issue with your Postgres installation or build environment rather than pgvector (`#if SIZEOF_DATUM == 8` should be a valid expression).
^ permalink raw [nested|flat] 7+ messages in thread
* Re: [pgvector/pgvector] issue #792: MSVC compiler error (C1017: invalid integer constant expression)
@ 2025-03-04 19:09 ` "ankane (@ankane)" <noreply+ankane@github.com>
5 siblings, 0 replies; 7+ messages in thread
From: ankane (@ankane) @ 2025-03-04 19:09 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
@ankane closed this.
^ permalink raw [nested|flat] 7+ messages in thread
* Re: [pgvector/pgvector] issue #792: MSVC compiler error (C1017: invalid integer constant expression)
@ 2025-03-05 03:12 ` "musabaku (@musabaku)" <noreply+musabaku@github.com>
5 siblings, 0 replies; 7+ messages in thread
From: musabaku (@musabaku) @ 2025-03-05 03:12 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
I didnt quite understand what exactly was happening, lots of new terms for me
I figured out below was error, using gpt's help
----------------------------------
The main problem was that some object files (.obj) were compiled for x86 (32-bit), but the linker was trying to create a 64-bit (x64) DLL. This caused the LNK1112 error:
"module machine type 'x86' conflicts with target machine type 'x64'"
Why did nmake clean fix it?
The object files (.obj) were already compiled in x86 mode, so when you ran nmake again, the linker tried to mix x86 and x64 files, causing the conflict.
By running nmake clean, you deleted all the old x86 object files, forcing nmake to recompile everything in x64 mode.
----------------------------------

^ permalink raw [nested|flat] 7+ messages in thread
* Re: [pgvector/pgvector] issue #792: MSVC compiler error (C1017: invalid integer constant expression)
@ 2025-03-05 03:17 ` "ankane (@ankane)" <noreply+ankane@github.com>
5 siblings, 0 replies; 7+ messages in thread
From: ankane (@ankane) @ 2025-03-05 03:17 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Thanks for following up for future readers.
^ permalink raw [nested|flat] 7+ messages in thread
* Re: [pgvector/pgvector] issue #792: MSVC compiler error (C1017: invalid integer constant expression)
@ 2025-03-05 03:31 ` "musabaku (@musabaku)" <noreply+musabaku@github.com>
5 siblings, 0 replies; 7+ messages in thread
From: musabaku (@musabaku) @ 2025-03-05 03:31 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
> Thanks for following up for future readers.
👍
Also, I forgot to add this. I had to add /Machine=64 in makefile.win file. The error was fixed after adding this

^ permalink raw [nested|flat] 7+ messages in thread
* Re: [pgvector/pgvector] issue #792: MSVC compiler error (C1017: invalid integer constant expression)
@ 2025-03-05 04:10 ` "ankane (@ankane)" <noreply+ankane@github.com>
5 siblings, 0 replies; 7+ messages in thread
From: ankane (@ankane) @ 2025-03-05 04:10 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
With `vcvars64.bat`, you shouldn't need to change `Makefile.win` (fwiw).
^ permalink raw [nested|flat] 7+ messages in thread
end of thread, other threads:[~2025-03-05 04:10 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-03-04 18:50 [pgvector/pgvector] issue #792: MSVC compiler error (C1017: invalid integer constant expression) "musabaku (@musabaku)" <noreply+musabaku@github.com>
2025-03-04 19:08 ` "ankane (@ankane)" <noreply+ankane@github.com>
2025-03-04 19:09 ` "ankane (@ankane)" <noreply+ankane@github.com>
2025-03-05 03:12 ` "musabaku (@musabaku)" <noreply+musabaku@github.com>
2025-03-05 03:17 ` "ankane (@ankane)" <noreply+ankane@github.com>
2025-03-05 03:31 ` "musabaku (@musabaku)" <noreply+musabaku@github.com>
2025-03-05 04:10 ` "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