2ndQuadrant / pglogical

Logical Replication extension for PostgreSQL 17, 16, 15, 14, 13, 12, 11, 10, 9.6, 9.5, 9.4 (Postgres), providing much faster replication than Slony, Bucardo or Londiste, as well as cross-version upgrades.
http://2ndquadrant.com/en/resources/pglogical/
Other
1.04k stars 155 forks source link

Can't compile in windows due to spaces in paths #112

Open vanceism7 opened 7 years ago

vanceism7 commented 7 years ago

pglogical_apply.o pglogical_conflict.o pglogical_manager.o pglogical.o pglogical_node.o pglogical_relcache.o pglogical_repset.o pglogical_rpc.o pglogical_functions.o pglogical_queue.o pglogical_fe.o pglogical_worker.o pglogical_sync.o pglogical_sequences.o pglogical_executor.o pglogical_dependency.o pglogical_apply_heap.o pglogical_apply_spi.o pglogical_output_config.o pglogical_output_plugin.o pglogical_output_proto.o pglogical_proto_json.o pglogical_proto_native.o /compat96/pglogical_compat.o makefile:81: C:/Program: No such file or directory makefile:81: Files/PostgreSQL/9.6/lib/pgxs/src/makefiles/pgxs.mk: No such file or directory make: *** No rule to make target `Files/PostgreSQL/9.6/lib/pgxs/src/makefiles/pgxs.mk'. Stop.

Basically as the title says, since windows loves to use spaces in its paths, ie C:/Program Files, make interprets this as two separate paths and so the make process fails. Any way to fix this without having to install postgres to a less standard directory?

Thanks!

PJMODOS commented 7 years ago

Is this mingw build? I am not sure if we support that even, all our windows work was done using Visual Studio.

vanceism7 commented 7 years ago

I believe I was using gcc at the time. I was just following the instructions from the readme to build from source. I cloned the repo and used the command "make USE_PGXS=1". But make isn't space-in-file-name friendly

petere commented 6 years ago

There is basically no way to make this work with the make-based build system.

For now, either use a different directory naming or use the Visual Studio build.

vanceism7 commented 6 years ago

Gotcha, ok, thanks for the help!

pashagolub commented 6 years ago

@petere Do you have any howto on building pglogical using Visual Studio?

alexitheodore commented 4 years ago

@PJMODOS Can you give any more detailed instructions on how to build pglogical in visual studio? I am not experienced with VS but am being required to instal pglogical on a windows machine and seem to have no other choice...

nikhilramabhadra commented 3 years ago

@PJMODOS @petere I want to build pglogical on Windows in Visual Studio. Is there a howto? I will try and check if I can build it it and update on how far I got with this.

aintitfun commented 3 years ago

current thread adivice about visual studio is contradictory with this one where is stated that the way to build on windows is msys(mingw) and visual studio is not supported:

https://github.com/2ndQuadrant/pglogical/issues/266

I think that building with mingw is a little hit & miss. Maybe a detailed steps to mingw or a solution for visual studio will be fine

pashagolub commented 3 years ago

I think that building with mingw is a little hit & miss. Maybe a detailed steps to mingw or a solution for visual studio will be fine @aintitfun hope this might help https://www.cybertec-postgresql.com/en/bulding-postgresql-x86-x64-and-openssl-using-msys2-and-mingw-under-windows/

aintitfun commented 3 years ago

Thanks Pashagolub, what I really mean is that detailed instructions to build this pglogical extension out the Postgrsql build tree on windows will be very good to help.

Maybe you mean that copying this extension source on the contrib folder of Postgresql source and making a global build of postgresql with mingw will genenerate ok the extension?

By the way I sucessfully builded the pglogical 1.2 version for pg 9.6 with msys/mingw but I did some modifications to make it work.

Thanks in advance.

pashagolub commented 3 years ago

Maybe you mean that copying this extension source on the contrib folder of Postgresql source and making a global build of postgresql with mingw will genenerate ok the extension?

Yes, that's exactly my thought. Sorry for being terse. :)

aintitfun commented 3 years ago

Maybe you mean that copying this extension source on the contrib folder of Postgresql source and making a global build of postgresql with mingw will genenerate ok the extension?

Yes, that's exactly my thought. Sorry for being terse. :)

Thanks a lot! I'll try!