Re: JIT on Windows with Postgres 12.1

From: 109 ktke <yuuki109gn(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Josef Šimánek <josef(dot)simanek(at)gmail(dot)com>, Catch All <catchall(at)lightn(dot)org>, pgsql-general(at)lists(dot)postgresql(dot)org, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: JIT on Windows with Postgres 12.1
Date: 2021-01-30 11:20:17
Message-ID: CAOQ-05HCQBYS_LV6F1OhioV04rRi53a_R4KEJ-LAe_Lkc0P28Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Feb 12, 2020 at 12:05:11PM -0800, Andres Freund wrote:
> Yes, LLVM would work on windows. I'd not even be surprised if one could
> make it work on windows already when using a mingw based build, instead
> of msvc.
In my mingw environment, postgresql build with option "--with-llvm"
failed with the follwing message. Is it difficult to make PostgreSQL
JIT work on windows using mingw?

--Message1
/mingw64/bin/clang -Wno-ignored-attributes -fno-strict-aliasing
-fwrapv -O2 -I../../../../src/include -I./src/include/port/win32
"-I../../../../src/include/port/win32" -DWIN32_STACK_RLIMIT=4194304
-DBUILDING_DLL -flto=thin -emit-llvm -c -o latch.bc latch.c
latch.c:680:19: error: static_assert expression is not an integral
constant expression
StaticAssertStmt(WSA_INVALID_EVENT == NULL, "");
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--

--Message2(When commenting latch.c:680 out)
llvmjit_inline.cpp:32:10: fatal error: sys/mman.h: No such file or directory
32 | #include <sys/mman.h>
| ^~~~~~~~~~~~
compilation terminated.
--

--Environment
PostgreSQL:postgresql13.0
Windows:Windows10
MSYS2 packages:mingw-w64-x86_64-gcc base-devel
mingw-w64-x86_64-llvm(llvm11 installed) mingw-w64-x86_64-clang(clang11
installed)
--

--
Yuuki Fujii

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeremy Smith 2021-01-30 11:28:06 Re: Foreign table performance issue / PostgreSQK vs. ORACLE
Previous Message Sebastian Dressler 2021-01-30 10:45:08 Re: Foreign table performance issue / PostgreSQK vs. ORACLE