[geos-devel] Compiling on Solaris

Joshua Buysse buysse at socsci.umn.edu
Fri Sep 10 16:21:08 EDT 2004


I think I've got it fixed.  Based on a quick look and an attempt to 
understand the STL, the code looks OK to me.  I don't know if this is 
going to be safe, but I was able to get 
operation/overlay/PolygonBuilder.cpp past the compiler with an explicit 
cast.  Smells like a compiler bug to me, actually, but an easy one to 
work around.

I also had to do a little bit of cleanup in io/markup/MarkupSTL.cpp 
where const char * could not be cast to char (using a temporary 
variable on the stack)  and a mem.allocate() call was not cast from 
void  * to char * explicitly.  Looks like Sun's compiler is a bit more 
picky about such things.

My patch to geos-1.0 is attached.  I don't know C or C++ very well 
(perl has destroyed my ability to deal with memory allocation), so I'd 
like for someone to check it over and make sure that it's not going to 
break anything.  Also, if anyone would prefer to clean up my use of a 
buffer on the stack in MarkupSTL.cpp I'd appreciate it (if necessary).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: geos-1.0.suncc.patch
Type: application/octet-stream
Size: 1757 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/geos-devel/attachments/20040910/415dff2d/geos-1.0.suncc.obj
-------------- next part --------------


That gets it to compile.

Now, the XMLTester test in source/test fails.  Here's the result (from  
dbx):

-----------
bash-2.03$ LD_LIBRARY_PATH=../geom/.libs /opt/forte8/SUNWspro/bin/dbx   
.libs/XMLTester
For information about new features see `help changes'
To remove this message, put `dbxenv suppress_startup_message 7.1' in  
your .dbxrc
Reading XMLTester
Reading ld.so.1
Reading libgeos.so.1
Reading libCstd.so.1
Reading libCrun.so.1
Reading libm.so.1
Reading libw.so.1
Reading libc.so.1
Reading libdl.so.1
Reading libCstd_isa.so.1
Reading libc_psr.so.1
(dbx) run
Running: XMLTester
(process id 27696)
Precision Model: FLOATING
Case #1
         A/A-6-18: a polygon overlapping a very skinny polygon  
[dim(2){A.A.Int = B.A.Int}, dim(1){A.A.Bdy.V-EP = B.A.Bdy.NV-EP},  
dim(0){A.A.Bdy.CP = B.A.Bdy.CP}, dim(0){A.A.Bdy.NV = B.A.Bdy.NV}]

signal SEGV (no mapping at the fault address) in  
geos::WKTReader::getCoordinates at line 62 in file "WKTReader.cpp"
    62           CoordinateList  
*coordinates=CoordinateListFactory::internalFactory- 
 >createCoordinateList();
--------------

Any ideas?  I feel like a fool for asking this, but since make  
test/make check didn't run these, do they normally work?

Thanks for any help.

-Josh

> no; it has similar problems...
>
> Chris
>
>
> -----Original Message-----
> From:	Paul Ramsey [mailto:pramsey at refractions.net]
> Sent:	Thu 9/9/2004 3:31 PM
> To:	GEOS Development List
> Cc:	
> Subject:	Re: [geos-devel] Compiling on Solaris
> Does GEOS 2.0 give any nicer results?
>
> Joshua Buysse wrote:
>
>> I'm attempting to package PostGIS, Mapserver, etc. for Solaris
>> as part of the CSW effort (http://www.blastwave.org/).  Under
>> our packaging standards, we're limited to using the Sun compilers
>> as much as humanly possible, and I'm getting the following
>> errors when compiling geos 1.0 (on PolygonBuilder.cpp).  Any ideas?
>>
>>
>> /bin/bash ../../libtool --mode=compile CC -DHAVE_CONFIG_H -I. -I.
>> -I../../source
>> /headers -I../../source/headers -I../../source/headers
>> -DGEOS_VERSION=""1.0""
>>  -g -c -o PolygonBuilder.lo `test -f
>> '../operation/overlay/PolygonBuilder.cpp' |
>> | echo './'`../operation/overlay/PolygonBuilder.cpp
>> rm -f .libs/PolygonBuilder.lo
>> CC -DHAVE_CONFIG_H -I. -I. -I../../source/headers  
>> -I../../source/headers
>> -I../..
>> /source/headers -DGEOS_VERSION=1.0 -g -c
>> ../operation/overlay/PolygonBuilder.cpp
>>   -KPIC -DPIC -o .libs/PolygonBuilder.lo
>> "../operation/overlay/../../headers/geom.h", line 946: Warning:
>> geos::LineString
>> ::compareTo hides the virtual function geos::Geometry::compareTo(const
>> geos::Geo
>> metry*) const.
>> "../operation/overlay/../../headers/geom.h", line 1031: Warning:
>> geos::MultiPoin
>> t::getCoordinate hides the virtual function
>> geos::GeometryCollection::getCoordin
>> ate() const.
>> "../operation/overlay/../../headers/indexStrtree.h", line 153:  
>> Warning:
>> geos::SI
>> Rtree::insert hides the virtual function
>> geos::AbstractSTRtree::insert(void*, vo
>> id*).
>> "../operation/overlay/../../headers/indexStrtree.h", line 153:  
>> Warning:
>> geos::SI
>> Rtree::query hides the virtual function
>> geos::AbstractSTRtree::query(void*).
>> "../operation/overlay/../../headers/indexStrtree.h", line 153:  
>> Warning:
>> geos::SI
>> Rtree::query hides the virtual function
>> geos::AbstractSTRtree::query(void*, geos
>> ::AbstractNode*, std::vector<void*>*).
>> "../operation/overlay/../../headers/geosAlgorithm.h", line 190:  
>> Warning:
>> geos::R
>> obustLineIntersector::computeIntersection hides the virtual function
>> geos::LineI
>> ntersector::computeIntersection(const geos::Coordinate&, const
>> geos::Coordinate&
>> , const geos::Coordinate&, const geos::Coordinate&).
>> "../operation/overlay/../../headers/geosAlgorithm.h", line 201:  
>> Warning:
>> geos::N
>> onRobustLineIntersector::computeIntersection hides the virtual  
>> function
>> geos::Li
>> neIntersector::computeIntersection(const geos::Coordinate&, const
>> geos::Coordina
>> te&, const geos::Coordinate&, const geos::Coordinate&).
>> "../operation/overlay/../../headers/geosAlgorithm.h", line 275:  
>> Warning:
>> geos::M
>> CPointInRing::MCSelecter::select hides the virtual function
>> geos::MonotoneChainS
>> electAction::select(geos::indexMonotoneChain*, int).
>> "../operation/overlay/../../headers/graph.h", line 228: Warning:
>> geos::Edge::upd
>> ateIM hides the virtual function
>> geos::GraphComponent::updateIM(geos::Intersecti
>> onMatrix*).
>> "../operation/overlay/../../headers/graph.h", line 350: Warning:
>> geos::Node::set
>> Label hides the virtual function
>> geos::GraphComponent::setLabel(geos::Label*).
>> "../operation/overlay/../../headers/graph.h", line 606: Warning:
>> geos::GeometryG
>> raph::findEdge hides the virtual function
>> geos::PlanarGraph::findEdge(const geos
>> ::Coordinate&, const geos::Coordinate&).
>> "../operation/overlay/../../headers/graph.h", line 606: Warning:
>> geos::GeometryG
>> raph::add hides the virtual function
>> geos::PlanarGraph::add(geos::EdgeEnd*).
>> "../operation/overlay/PolygonBuilder.cpp", line 127: Error: Could not
>> find a mat
>> ch for std::vector<geos::EdgeRing*>::insert(geos::EdgeRing**,
>> geos::MinimalEdgeR
>> ing**, geos::MinimalEdgeRing**).
>> 1 Error(s) and 12 Warning(s) detected.
>> gmake[2]: *** [PolygonBuilder.lo] Error 1
>> gmake[2]: Leaving directory
>> `/export/home/buysse/build/geos-1.0/source/geom'
>> gmake[1]: *** [all-recursive] Error 1
>>
>>
>
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel
>
>
>
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel
>
-- 
Josh Buysse, Sysadmin
Social Science Research Facility        University of Minnesota

"What difference does it make to the dead, the orphans and the
homeless, whether the mad destruction is wrought under the name
of totalitarianism or the holy name of liberty or democracy?"
      -- Mahatma Gandhi, "Non-Violence in Peace and War"



More information about the geos-devel mailing list