Opened 10 years ago

Closed 9 years ago

#521 closed defect (fixed)

Can't compile PostGIS 1.5 against PostgreSQL 9.0 beta1 under MingW

Reported by: robe Owned by: pramsey
Priority: medium Milestone: PostGIS 1.5.2
Component: postgis Version: 1.5.X
Keywords: Cc:

Description

We were trying to get a build of PostGIS 1.5 prepared for PostgreSQL 9.0 beta1 and we seem to be having some difficulties.

Has anyone tried this. The error we are getting

/bin/sh.exe c:/projects/pg/pg90b1/lib/POSTGR~1/pgxs/src/MAKEFI~1/../../config/missing perl ../utils/postgis_proc_upgrade.pl postgis.sql 1.5 > postgis_upgrade_15_minor.sql
c:/projects/pg/pg90b1/lib/POSTGR~1/pgxs/src/MAKEFI~1/../../config/missing: c:/projects/pg/pg90b1/lib/POSTGR~1/pgxs/src/MAKEFI~1/../../config/missing: No such file or directory

Not sure if this has to do with the pgxs change made in 1.5 or just a typo we have somewhere. We are going to try to build on another box to see if its just an error in our script.

On a side note -- since we seem to be stuck completely with PostGIS 2.0 (can't compile Geos 3.3 not PostGIS 2.0 under mingW) -- I'm thinking this may be a message from above that we should just do a native VS build for the 2.0 release. I'm hoping we can start tackling that in the next week or so. The PostgreSQL 9.0 is going to support native Windows 64-bit and with that said we'd have to start using msys64 or just compile under VS if we don't want to force people to run PostgreSQL in 32-bit mode. Given most windows developers seem to prefer Visual Studio/Express? as well as the cross boundary issues we have faced with libxml, seems we need to move there eventually.

Change History (6)

comment:1 Changed 10 years ago by mcayland

On first glance, it's likely that the issue is due to using a Windows-style path (C:\foo\bar) rather than an MSYS-style path (/c/foo/bar) in MSYS.

I generally always build PostGIS against an MSYS-built PostgreSQL in order to prevent these type of issues sneaking in, but maybe that is no longer practical.

In terms of a VS build, the infrastructure is pretty much there. The hard part is getting someone to maintain the independent build system, since it can't be expected for non-Windows users to have to make alterations to files that they can't really test. I know the PostgreSQL people try to get around this by parsing the existing Makefiles with Perl scripts, which is distinctly suboptimal :(

comment:2 Changed 10 years ago by robe

We did build postgresql 9.0 beta1 under msys and it built fine and ran fine as far as we could tell. I'll double check - don't have build in front of me, but think we did it the way we normally do with mys paths.

Well if we get it to work we would be willing to support it. We'll give it a shot with what is there so far. Hopefully sometime this week.

comment:3 Changed 10 years ago by robe

To clarify -- for the 1.5 release would be nice to build all under MingW and then move to VS for PostGIS 2.0.

As far as 2.0 goes, completely did in the water for all of MingW (8.3,8.4,9.0) and GEOS 3.3 anyway.

comment:4 Changed 10 years ago by robe

Okay I verified we are doing it the same way we built pg 83 and 84. We did make some progress by getting it to build the postgis-1.5.dll. Sadly the built .dll doesn't work so troubleshooting why that is to make sure its not just some missing file. The depends doesn't show anything else that we don't have in the bin or lib folder.

In order to get it to build the .dll, I had to change ${PERL} in the postgis/makefile script to perl. So something in the 9.0 pgxs.mk I presume is screwing up the perl path.

Our mingW build of PostgreSQL 9.0b1 on closer inspection also doesn't seem to have built the .dlls. It built the .exe. So will try to rebuild that and monitor more closely what is doing.

If someone could try this out too, that would be great.

Mark -- for reference we were specifying the paths as we always do

/c/projects/....

But the {PGXS} is being set to c:/projects/.... so not sure why its switching it back to c:. I forgot to check if the 8.4 does the same thing.

comment:5 Changed 10 years ago by robe

Okay we got over our major hurdle. Stupid problem. We forgot to copy the libproj.dll to the bin folder. So have PostGIS 1.5 working under windows PostgreSQL 9.0beta 1 now.

The only issue is why ${PERL} is being mangled for PostgreSQL 9.0beta 1 and not for the prior pgs. Mark any though on that?

Nicklas - if you get the chance -- can you try building on your mingW install against PG 9.0beta1. We have activestate perl and VS and a whole bunch of other things that may be making our box less than vanilla.

Agree with Paul -- for the 2.0 we are just going to bite the bullet and try to follow where Mat left off. Still trying to get all the dependencies for PostgreSQL to compile cleanly under VS so working on that.

comment:6 Changed 9 years ago by robe

Resolution: fixed
Status: newclosed

this was fixed long ago - though guess need to create a separate ticket for VC++ compile if we don't have one already

Note: See TracTickets for help on using tickets.