Opened 15 years ago

Closed 7 years ago

#382 closed enhancement (wontfix)

PostGIS native VC++ / Express build

Reported by: robe Owned by: robe
Priority: medium Milestone: PostGIS Fund Me
Component: postgis Version: master
Keywords: Cc: mloskot, arencambre, dustymugs

Description

I'm not sure if this changes how we do things, but I suspect it does. Does mingW support compiling for native 64-bit windows? If it doesn't, does this mean the need for compiled PostGIS under VC++ is more urgent?

See Magnus' note: http://blog.hagander.net/archives/160-64-bit-Windows-in-PostgreSQL.html

Change History (14)

comment:1 by pramsey, 15 years ago

Not impossible, perhaps only scary? http://mingw-w64.sourceforge.net/ We should still take a stab at MSVC. It will happen.

comment:2 by robe, 15 years ago

—Putting in Mark Cave-Ayland correspondence — I'm sure he won't mind me sharing this :)

You want the MingW-W64 project: http://sourceforge.net/projects/mingw-w64/. Any 64-bit compiler can create a 64-bit DLL and so it doesn't matter whether it's VC++ or MingW (gcc). Note I actually donated to the mingw-w64 project a while back, and so have corresponded personally with both Kai and Nightstrike - they are both really helpful and active at bugfixes, which is sadly not what can be said for the original MingW project. It's also good to see that they are working on cutting edge gcc (4.4.1 in this case).

comment:3 by robe, 15 years ago

Owner: changed from pramsey to robe
Summary: Support for PostgreSQL native compiled 64-bit WindowsPostGIS native VC++ / Express build
Version: trunk

We'll shoot for 32-bit first and then do a 64-bit after we have 32-bit build process well-defined.

comment:4 by mloskot, 15 years ago

Cc: mloskot added

comment:5 by robe, 14 years ago

We are not having much success with this. So we will give up for now and hopefully will have better luck with MSys64. I was also thinking we really need to support Msys64 anyway. It seems unfair to require someone to go out and by VS professional just so they can compile PostGIS under windows for 64-bit. It doesn't seem the Express supports 64-bit. Granted we should at some point support VS/VC++, but I don't think (Leo and I) are capable of it giving our limited experience with C and C++.

Mat — tried to follow your directions — but not much luck. We started notes on it — not finished — http://trac.osgeo.org/postgis/wiki/DevWikiWinVC_15

Even on 32-bit not having much success compiling PostGIS 1.5.3SVN. We get errors such as below

/Od /I "C:\Projects\Geos\geos-3.2.2win\include" /I "C:\Projects\PostGIS\branches\postgis-1.5.3win\build\msvc80\..\..\platform\win32" /D "WIN32" /D "_DEBUG" /D "_LIB" /D "_USE_MATH_DEFINES" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MDd /Fo"Debug\\" /Fd"Debug\vc90.pdb" /W3 /c /Wp64 /ZI /TC "..\..\..\liblwgeom\wktparse.tab.c"

"..\..\..\liblwgeom\vsprintf.c"

"..\..\..\liblwgeom\ptarray.c"

"..\..\..\liblwgeom\measures.c"

"..\..\..\liblwgeom\lwutil.c"

"..\..\..\liblwgeom\lwtree.c"

"..\..\..\liblwgeom\lwspheroid.c"

"..\..\..\liblwgeom\lwsegmentize.c"

"..\..\..\liblwgeom\lwpoly.c"

"..\..\..\liblwgeom\lwpoint.c"

"..\..\..\liblwgeom\lwmsurface.c"

"..\..\..\liblwgeom\lwmpoly.c"

"..\..\..\liblwgeom\lwmpoint.c"

"..\..\..\liblwgeom\lwmline.c"

"..\..\..\liblwgeom\lwmcurve.c"

"..\..\..\liblwgeom\lwline.c"

"..\..\..\liblwgeom\lwgunparse.c"

"..\..\..\liblwgeom\lwgparse.c"

"..\..\..\liblwgeom\lwgeom_api.c"

"..\..\..\liblwgeom\lwgeom.c"

"..\..\..\liblwgeom\lwgeodetic.c"

"..\..\..\liblwgeom\lwcurvepoly.c"

"..\..\..\liblwgeom\lwcompound.c"

"..\..\..\liblwgeom\lwcollection.c"

"..\..\..\liblwgeom\lwcircstring.c"

"..\..\..\liblwgeom\lwalgorithm.c"

"..\..\..\liblwgeom\lex.yy.c"

"..\..\..\liblwgeom\g_util.c"

"..\..\..\liblwgeom\g_serialized.c"

"..\..\..\liblwgeom\g_ptarray.c"

"..\..\..\liblwgeom\g_geometry.c"

"..\..\..\liblwgeom\g_coord.c"

"..\..\..\liblwgeom\g_box.c"

"..\..\..\liblwgeom\box2d.c"
]
Creating command line "cl.exe @"c:\Projects\PostGIS\branches\postgis-1.5.3win\build\msvc80\liblwgeom\Debug\RSP00002120725080.rsp" /nologo /errorReport:prompt"
</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>
Output Window
</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>Compiling...
cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
box2d.c
c:\projects\postgis\branches\postgis-1.5.3win\liblwgeom\liblwgeom.h(177) : error C2054: expected '(' to follow 'va_dcl'
c:\projects\postgis\branches\postgis-1.5.3win\liblwgeom\liblwgeom.h(177) : error C2085: 'uchar' : not in formal parameter list
c:\projects\postgis\branches\postgis-1.5.3win\liblwgeom\liblwgeom.h(186) : error C2085: 'BOX2DFLOAT4' : not in formal parameter list
c:\projects\postgis\branches\postgis-1.5.3win\liblwgeom\liblwgeom.h(193) : error C2085: 'BOX3D' : not in formal parameter list
c:\projects\postgis\branches\postgis-1.5.3win\liblwgeom\liblwgeom.h(201) : error C2061: syntax error : identifier 'BOX3D'
c:\projects\postgis\branches\postgis-1.5.3win\liblwgeom\liblwgeom.h(238) : error C2059: syntax error : '}'
c:\projects\postgis\branches\postgis-1.5.3win\liblwgeom\liblwgeom.h(316) : error C2016: C requires that a struct or union has at least one member
c:\projects\postgis\branches\postgis-1.5.3win\liblwgeom\liblwgeom.h(316) : error C2061: syntax error : identifier 'uchar'
c:\projects\postgis\branches\postgis-1.5.3win\liblwgeom\liblwgeom.h(319) : error C2061: syntax error : identifier 'dims'
c:\projects\postgis\branches\postgis-1.5.3win\liblwgeom\liblwgeom.h(319) : error C2059: syntax error : ';'
c:\projects\postgis\branches\postgis-1.5.3win\liblwgeom\liblwgeom.h(322) : error C2059: syntax error : '}'
c:\projects\postgis\branches\postgis-1.5.3win\liblwgeom\liblwgeom.h(333) : error C2016: C requires that a struct or union has at least one member
c:\projects\postgis\branches\postgis-1.5.3win\liblwgeom\liblwgeom.h(333) : error C2061: syntax error : identifier 'POINTARRAY'
c:\projects\postgis\branches\postgis-1.5.3win\liblwgeom\liblwgeom.h(336) : error C2059: syntax error : '}'
c:\projects\postgis\branches\postgis-1.5.3win\liblwgeom\liblwgeom.h(340) : error C2143: syntax error : missing '{' before '*'
c:\projects\postgis\branches\postgis-1.5.3win\liblwgeom\liblwgeom.h(354) : error C2143: syntax error : missing ')' before '*'
c:\projects\postgis\branches\postgis-1.5.3win\liblwgeom\liblwgeom.h(354) : error C2143: syntax error : missing '{' before '*'
c:\projects\postgis\branches\postgis-1.5.3win\liblwgeom\liblwgeom.h(354) : error C2371: 'POINT4D' : redefinition; different basic types
        c:\projects\postgis\branches\postgis-1.5.3win\liblwgeom\liblwgeom.h(303) : see declaration of 'POINT4D'

And it goes on and on. Also not sure where we would put the libxml dependency that became a requirement in 1.5.

comment:6 by robe, 14 years ago

P.S. Is it possible to have makefile.vc files (like GEOS and Proj have) instead of these yucky solution/project files. The thought of having to work on a lower version of VS solutions file just so that it can be upgraded for higher versions doesn't leave me with much joy.

comment:7 by mloskot, 14 years ago

It is possible to have a makefile.vc. <annoying>Although, I'd suggest CMake</annoying>.

I'm going to not to forget about it and see if I can help next week/weekend.

comment:8 by robe, 14 years ago

Mat,

Thanks. I'm indifferent betweeh CMake and makefile.vc. Whichever is easiest. I think in long run we were going to do CMake correct especially since pgrouting is already using CMake. Just thought the makefile.vc or sln was a shorter term more achievable goal. Well if msys64 works okay for us, I'm willing to punt the whole VC thing for PostGIS 2.0.0 or whenever we can get CMake going - just need to get a 64-bit build out there soon.

comment:9 by mloskot, 14 years ago

Regina,

The line liblwgeom.h:177 to compile using Visual C++ should read:

#if defined(__STDC__) || defined(_MSC_VER)

Actually, all occurrences of this #if should be updated as above.

Regarding CMake and x64, surely I understand.

comment:10 by robe, 14 years ago

Milestone: PostGIS 2.0.0PostGIS Future

comment:11 by arencambre, 13 years ago

Cc: arencambre added

comment:12 by dustymugs, 12 years ago

Cc: dustymugs added

comment:13 by robe, 7 years ago

Milestone: PostGIS FuturePostGIS Fund Me

Milestone renamed

comment:14 by robe, 7 years ago

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.