[pdal] cmake issues on Ubuntu 12.04 x64

Newcomb, Doug doug_newcomb at fws.gov
Wed Feb 20 09:52:51 PST 2013


Thanks Howard!  Throwing in a newer version of Libgeotiff is not a problem.
 I'll test the changes with cairo.

Doug



On Wed, Feb 20, 2013 at 12:43 PM, Howard Butler <hobu.inc at gmail.com> wrote:

> Doug,
>
> I have pushed some changes that should take care of the cairo detection
> issues.
>
> As for this geotiff one, I think the issue was not having a new enough
> libtiff, libgeotiff, and GDAL.  All three of these libraries unfortunately
> ship slightly different cpl_serv.h files, and there's a bunch of
> unfortunate #ifdef magic to pick the correct ones depending on the
> situation.
>
> A new enough GDAL should be 1.9.x, because I'm using that in other
> situations and things link/compile ok.
>
> An incompatible libtiff might be the one that's causing the conflict.
>
> Catch me on IRC for interactive debugging if you're still stuck.
>
> Howard
>
> On Feb 16, 2013, at 4:23 PM, Doug Newcomb <newcomb.ttg at gmail.com> wrote:
>
> > OK,
> > I got this with Libgeotiff 1.3:
> >
> ---------------------------------------------------------------------------------------------------------------------------------------------------------
> >
> > In file included from /usr/local/include/cpl_conv.h:35:0,
> >                  from
> /usr/local/PDAL-master/src/drivers/las/GeotiffSupport.hpp:42,
> >                  from
> /usr/local/PDAL-master/src/drivers/las/GeotiffSupport.cpp:35:
> > /usr/local/include/cpl_vsi.h:171:35: error: declaration of C function
> ‘void* _GTIFcalloc(size_t)’ conflicts with
> > /usr/local/include/cpl_vsi.h:170:17: error: previous declaration ‘void*
> _GTIFcalloc(size_t*)’ here
> > In file included from /usr/local/include/cpl_conv.h:36:0,
> >                  from
> /usr/local/PDAL-master/src/drivers/las/GeotiffSupport.hpp:42,
> >                  from
> /usr/local/PDAL-master/src/drivers/las/GeotiffSupport.cpp:35:
> > /usr/local/include/cpl_error.h:50:15: error: conflicting declaration
> ‘CE_None’
> > /usr/local/include/cpl_serv.h:168:5: error: ‘CE_None’ has a previous
> declaration as ‘CPLErr CE_None’
> > /usr/local/include/cpl_error.h:52:18: error: conflicting declaration
> ‘CE_Warning’
> > /usr/local/include/cpl_serv.h:170:5: error: ‘CE_Warning’ has a previous
> declaration as ‘CPLErr CE_Warning’
> > /usr/local/include/cpl_error.h:53:18: error: conflicting declaration
> ‘CE_Failure’
> > /usr/local/include/cpl_serv.h:171:5: error: ‘CE_Failure’ has a previous
> declaration as ‘CPLErr CE_Failure’
> > /usr/local/include/cpl_error.h:54:16: error: conflicting declaration
> ‘CE_Fatal’
> > /usr/local/include/cpl_serv.h:172:5: error: ‘CE_Fatal’ has a previous
> declaration as ‘CPLErr CE_Fatal’
> > /usr/local/include/cpl_error.h:55:3: error: conflicting declaration
> ‘typedef enum CPLErr CPLErr’
> > /usr/local/include/cpl_serv.h:173:3: error: ‘CPLErr’ has a previous
> declaration as ‘typedef enum CPLErr CPLErr’
> > /usr/local/include/cpl_error.h:71:71: error: declaration of C function
> ‘void (* gtCPLSetErrorHandler(CPLErrorHandler))(CPLErr, int, const char*)’
> conflicts with
> > /usr/local/include/cpl_serv.h:186:14: error: previous declaration ‘void
> gtCPLSetErrorHandler(void (*)(CPLErr, int, const char*))’ here
> > In file included from
> /usr/local/PDAL-master/src/drivers/las/GeotiffSupport.hpp:42:0,
> >                  from
> /usr/local/PDAL-master/src/drivers/las/GeotiffSupport.cpp:35:
> > /usr/local/include/cpl_conv.h:63:33: error: declaration of C function
> ‘void* gtCPLMalloc(size_t)’ conflicts with
> > /usr/local/include/cpl_serv.h:147:15: error: previous declaration ‘void*
> gtCPLMalloc(int)’ here
> > /usr/local/include/cpl_conv.h:64:41: error: declaration of C function
> ‘void* gtCPLCalloc(size_t, size_t)’ conflicts with
> > /usr/local/include/cpl_serv.h:148:15: error: previous declaration ‘void*
> gtCPLCalloc(int, int)’ here
> > /usr/local/include/cpl_conv.h:65:42: error: declaration of C function
> ‘void* gtCPLRealloc(void*, size_t)’ conflicts with
> > /usr/local/include/cpl_serv.h:149:15: error: previous declaration ‘void*
> gtCPLRealloc(void*, int)’ here
> > make[2]: *** [src/CMakeFiles/pdal.dir/drivers/las/GeotiffSupport.cpp.o]
> Error 1
> > make[1]: *** [src/CMakeFiles/pdal.dir/all] Error 2
> > make: *** [all] Error 2
> > -------------------------------------------------------
> >
> > So, Installed geotiff 1.4  and tried again.  Success past the geotiff
> library !
> >
> > This time ,however ,  it had problems with the system cairo ( had to
> specify cairo includes manually,)
> >
> > Linking CXX executable ../../bin/pshape
> > CMakeFiles/pshape.dir/Draw.cpp.o: In function `Draw':
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:37: undefined reference to
> `cairo_svg_surface_create'
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:38: undefined reference to
> `cairo_create'
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:41: undefined reference to
> `cairo_translate'
> > CMakeFiles/pshape.dir/Draw.cpp.o: In function `~Draw':
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:46: undefined reference to
> `cairo_surface_destroy'
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:47: undefined reference to
> `cairo_destroy'
> > CMakeFiles/pshape.dir/Draw.cpp.o: In function
> `Pshape::Draw::drawHexagon(Pshape::Hexagon*, bool)':
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:55: undefined reference to
> `cairo_set_line_width'
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:56: undefined reference to
> `cairo_set_source_rgb'
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:64: undefined reference to
> `cairo_move_to'
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:68: undefined reference to
> `cairo_line_to'
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:70: undefined reference to
> `cairo_close_path'
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:73: undefined reference to
> `cairo_fill'
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:77: undefined reference to
> `cairo_set_source_rgb'
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:78: undefined reference to
> `cairo_fill'
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:86: undefined reference to
> `cairo_stroke'
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:87: undefined reference to
> `cairo_surface_flush'
> > CMakeFiles/pshape.dir/Draw.cpp.o: In function
> `Pshape::Draw::drawSegment(Pshape::Segment, Pshape::Color)':
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:93: undefined reference to
> `cairo_set_line_width'
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:94: undefined reference to
> `cairo_set_source_rgb'
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:112: undefined reference to
> `cairo_move_to'
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:113: undefined reference to
> `cairo_line_to'
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:114: undefined reference to
> `cairo_stroke'
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:115: undefined reference to
> `cairo_surface_flush'
> > CMakeFiles/pshape.dir/Draw.cpp.o: In function
> `Pshape::Draw::drawPoint(Pshape::Mathpair<double>)':
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:122: undefined reference to
> `cairo_arc'
> > /usr/local/PDAL-master/apps/pshape/Draw.cpp:123: undefined reference to
> `cairo_stroke'
> > collect2: ld returned 1 exit status
> > make[2]: *** [bin/pshape] Error 1
> > make[1]: *** [apps/pshape/CMakeFiles/pshape.dir/all] Error 2
> >
> >
> >
> > Do I need to update cairo beyond the system default for Ubuntu 12.04?
> >
> > Doug
> >
> >
> > On Fri, Feb 15, 2013 at 10:05 AM, Howard Butler <hobu.inc at gmail.com>
> wrote:
> >
> > On Feb 15, 2013, at 8:37 AM, Doug Newcomb <newcomb.ttg at gmail.com> wrote:
> >
> > > Hi Folks,
> > > My cmake-fu is still in it's infancy ( using cmake-gui) .  I'm still
> getting the Cairo-dir not found when trying to configure. Using the zip
> file pulled down this morning with the FindCairo.cmake module embedded.
> > >
> > >  whereis cairo.h -  gives:
> > > cairo: /usr/include/cairo
> > >
> > > using the standard system cairo2-dev package
> > > cairo (1.10.2-6.1ubuntu3)
> >
> > Doug,
> >
> > Sorry. The Cairo CMake module I just added isn't very smart, and I can
> report it is breaking for me locally too.  I'll to to push a fix in the
> next few hours, and I'll email you when a new one is available.
> >
> > Alternatively, you could remove/comment out the find_package(Cairo) line
> from apps/pshape/CMakeLists.txt to work around things.
> >
> > Howard
> >
>
> _______________________________________________
> pdal mailing list
> pdal at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pdal
>



-- 
Doug Newcomb
USFWS
Raleigh, NC
919-856-4520 ext. 14 doug_newcomb at fws.gov
---------------------------------------------------------------------------------------------------------
The opinions I express are my own and are not representative of the
official policy of the U.S.Fish and Wildlife Service or Dept. of the
Interior.   Life is too short for undocumented, proprietary data formats.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20130220/fcf0d250/attachment-0001.html>


More information about the pdal mailing list