ankane/dexter

Installation fails on Windows 10

nitin065 opened this issue · 2 comments

I tried installing pgdexter using gem but it failed with missing win32_port.h file.

I have multiple installation of Postgres, so I manually set PG_CONFIG to pg_config.exe file.

More details can be found in attached log file.

gem_make.out

current directory: D:/Software/Ruby33-x64/lib/ruby/gems/3.3.0/gems/pg_query-4.2.3/ext/pg_query
D:/Software/Ruby33-x64/bin/ruby.exe extconf.rb
creating Makefile

current directory: D:/Software/Ruby33-x64/lib/ruby/gems/3.3.0/gems/pg_query-4.2.3/ext/pg_query
make DESTDIR\= sitearchdir\=./.gem.20240526-32604-o278wx sitelibdir\=./.gem.20240526-32604-o278wx clean

current directory: D:/Software/Ruby33-x64/lib/ruby/gems/3.3.0/gems/pg_query-4.2.3/ext/pg_query
make DESTDIR\= sitearchdir\=./.gem.20240526-32604-o278wx sitelibdir\=./.gem.20240526-32604-o278wx
generating pg_query-x64-mingw-ucrt.def
compiling D:/Software/Ruby33-x64/lib/ruby/gems/3.3.0/gems/pg_query-4.2.3/ext/pg_query/guc-file.c
compiling D:/Software/Ruby33-x64/lib/ruby/gems/3.3.0/gems/pg_query-4.2.3/ext/pg_query/pg_query.c
In file included from D:/Software/Ruby33-x64/lib/ruby/gems/3.3.0/gems/pg_query-4.2.3/ext/pg_query/include/c.h:1387,
                 from D:/Software/Ruby33-x64/lib/ruby/gems/3.3.0/gems/pg_query-4.2.3/ext/pg_query/include/postgres.h:46,
                 from D:/Software/Ruby33-x64/lib/ruby/gems/3.3.0/gems/pg_query-4.2.3/ext/pg_query/pg_query_internal.h:4,
                 from D:/Software/Ruby33-x64/lib/ruby/gems/3.3.0/gems/pg_query-4.2.3/ext/pg_query/pg_query.c:2:
D:/Software/Ruby33-x64/lib/ruby/gems/3.3.0/gems/pg_query-4.2.3/ext/pg_query/include/port.h:24:10: fatal error: port/win32_port.h: No such file or directory
   24 | #include "port/win32_port.h"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:248: D:/Software/Ruby33-x64/lib/ruby/gems/3.3.0/gems/pg_query-4.2.3/ext/pg_query/pg_query.o] Error 1

make failed, exit code 2

@ankane Added log inline.

Hi @nitin065, please paste the log file inline.

Thanks, it looks like pg_query added support for Windows in 5.1.0 (changelog), so updated the version in the commit above.

Ref: pganalyze/pg_query#60