Opened 15 years ago

Closed 14 years ago

#473 closed defect (fixed)

Can't compile at all under Windows

Reported by: robe Owned by: pramsey
Priority: medium Milestone: PostGIS 2.0.0
Component: postgis Version: master
Keywords: mingw Cc:

Description

I'm having difficulty compiling the PostGIS trunk under windows.

I can't compile GEOS 3.3 under mingw either. If someone could verify its not just my box that would be swell. Unfortunately I don't have the computer I was testing on in front of me so can't recall the exact errors. I'm in the middle of rebuilding my other Windows VM since doesn't seem to like being mounted on my new windows 7 box.

Thanks, Regina

Change History (6)

comment:1 by nicklas, 15 years ago

I have never been able to compile GEOS 3.3 in windows. Haven't tried for a while but now it ended like this:

In file included from ../../../include/geos/geom/Geometry.h:26,
                 from IndexedPointInAreaLocator.cpp:18:
../../../include/geos/platform.h:104:2: #error "Can not compile without isnan fu                        nction or macro"
In file included from ../../../include/geos/geom/Coordinate.h:154,
                 from ../../../include/geos/geom/Envelope.h:26,
                 from ../../../include/geos/geom/Geometry.h:28,
                 from IndexedPointInAreaLocator.cpp:18:
../../../include/geos/geom/Coordinate.inl: In member function `bool geos::geom::                        Coordinate::isNull() const':
../../../include/geos/geom/Coordinate.inl:46: error: `ISNAN' was not declared in                         this scope
../../../include/geos/geom/Coordinate.inl: In member function `bool geos::geom::                        Coordinate::equals3D(const geos::geom::Coordinate&) const':
../../../include/geos/geom/Coordinate.inl:111: error: `ISNAN' was not declared i                        n this scope
make[4]: *** [IndexedPointInAreaLocator.lo] Error 1
make[4]: Leaving directory `/c/utv/src/geos_trunk/src/algorithm/locate'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/c/utv/src/geos_trunk/src/algorithm/locate'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/c/utv/src/geos_trunk/src/algorithm'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/c/utv/src/geos_trunk/src'
make: *** [all-recursive] Error 1

/Nicklas

comment:2 by nicklas, 15 years ago

without any further investigation compiling postgis trunk ended like this:

lwout_wkb.c: In function `wkb_swap_bytes':
lwout_wkb.c:130: error: `BYTE_ORDER' undeclared (first use in this function)
lwout_wkb.c:130: error: (Each undeclared identifier is reported only once
lwout_wkb.c:130: error: for each function it appears in.)
lwout_wkb.c:130: error: `LITTLE_ENDIAN' undeclared (first use in this function)
lwout_wkb.c:131: error: `BIG_ENDIAN' undeclared (first use in this function)
make[1]: *** [lwout_wkb.o] Error 1
make[1]: Leaving directory `/c/utv/src/postgis_trunk/liblwgeom'
make: *** [liblwgeom] Error 2


/Nicklas

comment:3 by nicklas, 14 years ago

The geos issue might have a solution http://trac.osgeo.org/geos/ticket/365

The postgis problem seems to be solved if <sys/param.h> is included in lwout_wkb.c

Mark, I see you removed <sys/param.h> from some other file in 2009-03-16 according to the changelog with the comment that it isn't needed any more. It seems to be needed for mingw, is there any problem with adding it?

/Nicklas

in reply to:  3 comment:4 by mcayland, 14 years ago

Replying to nicklas:

The geos issue might have a solution http://trac.osgeo.org/geos/ticket/365

The postgis problem seems to be solved if <sys/param.h> is included in lwout_wkb.c

Mark, I see you removed <sys/param.h> from some other file in 2009-03-16 according to the changelog with the comment that it isn't needed any more. It seems to be needed for mingw, is there any problem with adding it?

/Nicklas

No, I don't think so at all. Try adding it and then build on Windows/Linux/Solaris to ensure that there are no errors - if it looks good then feel free to commit.

Mark.

comment:5 by robe, 14 years ago

Nicklas,

Just want to thank you for fixing this and the GEOS patch. You are such a life saver. Now we can compile in windows again and start testing all the cool features in PostGIS 2.0 (like Olivier's starting work on Polyhedral surfaces).

Mark — do you really expect Nicklas to have a Solaris machine or VM lying around?

I say just commit the changes and let people test on their various platforms to confirm it still works. Its just a 1 liner anyway. We are still in alpha production after all, and no one else seemed to care that we could no longer build on windows for months.

comment:6 by nicklas, 14 years ago

Resolution: fixed
Status: newclosed

Thanks Regina :-)

I committed the inclusion of param.h in lwout_wkb.c at r5757

As you expected Regina I have no Solaris installation, but it seems to build as expected in mingw and ubuntu 64

/Nicklas

Note: See TracTickets for help on using tickets.