-
-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to specify multiple server includes towards mingw64/msys2 windows build #1129
Comments
Quickly looking at We then pass all of that to bindgen/clang (around line 707) as 1 argument, and I bet it needs to be split into one argument per So you might can change That's probably where I'd go next if I were doing this. That may solve this quest, leading to another... |
@eeeebbbbrrrr Thanks I'll give that a try and report back once I get the right incantation of rust. I understand the general idea, just trying to grok the whole Some, Ok, overriden stuff. |
and add additional include path needed for mingw64 Closes pgcentralfoundation#1129
Okay I think that worked, though some of stuff I need to revisit. clang_args is supposed to be able to take a vector set so in theory I shouldn't have to have changed that but I was getting syntax errors. My changes are here to support multiple includes and here to explicitly handle windows: Now I have a pgxs issue, but I think that's cause I was trying to use VC build and the VC build doesn't ship with pgxs.mk files so I'll revise to just build a mingw64 pg from scratch. BTW PostgreSQL is phasing out pgxs once they fully switch their autoconf setup to Meson building. But we can deal with that some other time as it's probably 2 years down the pipe. |
pgrx-pg-sys has a "cshim" that is itself a little Postgres extension, and it's compiled as part of the "build.rs" process in that crate. |
and add additional include path needed for mingw64 Closes pgcentralfoundation#1129
and add additional include path needed for mingw64 Closes pgcentralfoundation#1129
and add additional include path needed for mingw64 Closes pgcentralfoundation#1129
I've been working on trying to get pgrx to work under windows. More specifically msys2/mingw64 which I think is an easier task to do than MSVC builds since msys2 uses unix tooling for building.
I must admit I'm a newbie in Rust, so some of my questions might be obvious. But I have a fair amount of experience with windows building extensions for PostgreSQL and am the packager of the PostGIS windows bundle builds which includes postgis, pgrouting, ogr_fdw.
My work in progress is here:
https://github.com/robe2/pgrx/tree/support-windows-via-msys2
Right now I've gotten to the point where I can build cargo-pgrx, and initialize the database with it.
I'm now stuck on the tests
https://github.com/robe2/pgrx/actions/runs/4846299083/jobs/8635750605
The part here clang diagnosed error: D:/a/pgrx/pgrx/pgsql/include/server/port.h:422:10: fatal error: 'netinet/in.h' file not found
I've had this same issue with other PostgreSQL Extension projects, and the way we fixed it is that for
mingw64 -- adding the additional includedir_server (or CPP FLAGS) needs to include the include/server/win32 folder
For MSVC it needs to include: include/server/win32_msvc
I tried setting variable
That clearly did something as it broke things more.
also tried
For example here is is the PostGIS snippet that handles this in the configure.ac
Here is the equivalent in pgRouting CMakeLists
P.S. I don't expect getting this to work to be a quick process, but am hopeful I can get it working in a couple of months. I think it would be well worth it since this seems to be a great project.
The text was updated successfully, but these errors were encountered: