pglogical icon indicating copy to clipboard operation
pglogical copied to clipboard

Can't compile in windows due to spaces in paths

Open vanceism7 opened this issue 7 years ago • 12 comments

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!

vanceism7 avatar Jun 20 '17 21:06 vanceism7

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

PJMODOS avatar Oct 10 '17 20:10 PJMODOS

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

vanceism7 avatar Oct 10 '17 23:10 vanceism7

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.

petere avatar Jan 29 '18 17:01 petere

Gotcha, ok, thanks for the help!

vanceism7 avatar Jan 29 '18 19:01 vanceism7

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

pashagolub avatar Mar 21 '18 14:03 pashagolub

@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...

alexitheodore avatar Dec 31 '19 06:12 alexitheodore

@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.

nikhilramabhadra avatar Dec 06 '20 22:12 nikhilramabhadra

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

aintitfun avatar Jan 28 '21 11:01 aintitfun

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/

pashagolub avatar Jan 28 '21 11:01 pashagolub

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.

aintitfun avatar Jan 28 '21 12:01 aintitfun

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. :)

pashagolub avatar Jan 28 '21 12:01 pashagolub

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!

aintitfun avatar Feb 03 '21 15:02 aintitfun