[Qgis-developer] Compiling against geos-3.0.0rc4

Mike Leahy mgleahy at alumni.uwaterloo.ca
Thu Feb 15 17:57:39 EST 2007


Tim,

I can clarify that without any patching, both 0.8.0 and the svn trunk
will compile and run fine with geos-3.0.0rc3.  If I then uninstall rc3,
install rc4, and add a symbolic link that points from libgeos-3.0.0rc3
to libgeos-3.0.0rc4, QGis will still run.  So it's binary compatible at
least.  It just doesn't seem to like compiling against rc4.

When the svn trunk is compiled against rc4, the output is essentially
the same as the first error I was getting with the release 0.8 version.
 The only difference is that if I make clean then make again with the
svn trunk doesn't give me a different error (as the release version had
been).  So...does this then point to a problem with some changes with
geos-3.0.0rc4?

P.S.: How do you set the install libdir to /usr/lib64 with the cmake
setup?  With the ./configure script, I would just add
--libdir=/usr/lib64.  I tried using -D LIBRARY_OUTPUT_PATH=/usr/lib64,
but unless I got something wrong, that option seems to put the libraries
there during make, rather than make install.  I also tried
CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_RPATH, but neither of those did
the trick.

Mike

======================================================================

[ 64%] Building CXX object
src/app/CMakeFiles/qgis.dir/moc_qgspgquerybuilder.o
[ 64%] Building CXX object src/app/CMakeFiles/qgis.dir/moc_qgspythondialog.o
Linking CXX executable qgis
/usr/lib64/python2.4/config/libpython2.4.a(posixmodule.o): In function
`posix_tmpnam':
(.text+0x665): warning: the use of `tmpnam_r' is dangerous, better use
`mkstemp'
/usr/lib64/python2.4/config/libpython2.4.a(posixmodule.o): In function
`posix_tempnam':
(.text+0x748): warning: the use of `tempnam' is dangerous, better use
`mkstemp'
/home/sources/qgis_unstable/src/core/libqgis_core.so: undefined
reference to `geos::geom::Coordinate::Coordinate(double, double, double)'
/home/sources/qgis_unstable/src/core/libqgis_core.so: undefined
reference to `geos::io::WKTReader::~WKTReader()'
/home/sources/qgis_unstable/src/core/libqgis_core.so: undefined
reference to `geos::io::WKTReader::WKTReader(geos::geom::GeometryFactory
const*)'
/home/sources/qgis_unstable/src/core/libqgis_core.so: undefined
reference to `geos::geom::Coordinate::~Coordinate()'
collect2: ld returned 1 exit status
make[2]: *** [src/app/qgis] Error 1
make[1]: *** [src/app/CMakeFiles/qgis.dir/all] Error 2
make: *** [all] Error 2



Tim Sutton wrote:
> Hi
> 
> Have you tried building against svn trunk? Martin or somebody was
> talking about abstracting all the geos calls away, I dont know if its
> been done in trunk or not. Also can you clarify you built wihtout the
> geos patch aplied to qgis?
> 
> Regards
> 
> Tim
> 
> 2007/2/15, Mike Leahy <mgleahy at alumni.uwaterloo.ca>:
>> Hello list,
>>
>> I know that GEOS 3.x is not officially supported yet, but I've been able
>> to compile the released qgis 0.8 against geos-3.0.0rc3 without any
>> trouble - the patch that was posted in December, or something similar,
>> must have been applied before it was released.  I just tried compiling
>> against rc4 of GEOS, and produces some new problems.  The first error
>> (below) seems to be an issue with the linker.  After getting that error,
>> if I make clean then make again, I get a different error (also below).
>> Since the problem only happens with rc4 of GEOS and not rc3, I checked
>> with the geos-devel mailing list first, but so far no answers seem to be
>> jumping out.  Can anyone make sense of what's going on, or offer some
>> ideas that I could try?
>>
>> Regards,
>> Mike
>>
>> =====================================================================
>>
>> Here's the first build attempt:
>>
>> /bin/sh ../../libtool --tag=CXX --mode=link g++  -g -O2  -L/usr/lib64
>> -L/usr/lib -lproj -L/usr/lib -o qgis -rdynamic qgis-main.o
>> ../raster/libqgis_raster.la ../legend/libqgis_legend.la
>> ../composer/libqgis_composer.la  -L/usr/lib64 -lQtCore -lQt3Support
>> -lQtGui -lQtNetwork -lQtSvg -lQtCore -lQt3Support -lQtGui -lQtNetwork
>> -lQtXml -lQtSvg -lQtTest -lQtDesigner -L/usr/lib64 -lgdal -L/usr/lib64
>> -lpq -L/usr/lib64 -lgeos -lpython2.4 -lproj -lsqlite3 libqgis_gui.la
>> ../core/libqgis_core.la  -lutil
>> g++ -g -O2 -o .libs/qgis -rdynamic qgis-main.o  -L/usr/lib64 -L/usr/lib
>> ../raster/.libs/libqgis_raster.so ../legend/.libs/libqgis_legend.so
>> ../composer/.libs/libqgis_composer.so -lQtCore -lQt3Support -lQtGui
>> -lQtNetwork -lQtXml -lQtSvg -lQtTest -lQtDesigner /usr/lib64/libgdal.so
>> -lpq /usr/lib64/libgeos.so -lpython2.4 -lproj -lsqlite3
>> ./.libs/libqgis_gui.so ../core/.libs/libqgis_core.so -lutil -Wl,--rpath
>> -Wl,/usr/lib64
>> ../core/.libs/libqgis_core.so: undefined reference to
>> `geos::geom::Coordinate::Coordinate(double, double, double)'
>> ../core/.libs/libqgis_core.so: undefined reference to
>> `geos::io::WKTReader::~WKTReader()'
>> ../core/.libs/libqgis_core.so: undefined reference to
>> `geos::io::WKTReader::WKTReader(geos::geom::GeometryFactory const*)'
>> ../core/.libs/libqgis_core.so: undefined reference to
>> `geos::geom::Coordinate::~Coordinate()'
>> collect2: ld returned 1 exit status
>> make[4]: *** [qgis] Error 1
>> make[4]: Leaving directory `/home/sources/qgis-0.8.0/src/gui'
>> make[3]: *** [all] Error 2
>> make[3]: Leaving directory `/home/sources/qgis-0.8.0/src/gui'
>> make[2]: *** [all-recursive] Error 1
>> make[2]: Leaving directory `/home/sources/qgis-0.8.0/src'
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory `/home/sources/qgis-0.8.0'
>> make: *** [all] Error 2
>>
>> =====================================================================
>>
>> And here's what I get if I make clean, then try again (starting from a
>> fresh source instead will return me to the error above):
>>
>> ranlib .libs/libqgis_core.a
>> creating libqgis_core.la
>> (cd .libs && rm -f libqgis_core.la && ln -s ../libqgis_core.la
>> libqgis_core.la)
>> make[4]: Leaving directory `/home/sources/qgis-0.8.0/src/core'
>> make[3]: Leaving directory `/home/sources/qgis-0.8.0/src/core'
>> Making all in ui
>> make[3]: Entering directory `/home/sources/qgis-0.8.0/src/ui'
>> make[3]: *** No rule to make target `ui_qgisappbase.h', needed by `all'.
>>  Stop.
>> make[3]: Leaving directory `/home/sources/qgis-0.8.0/src/ui'
>> make[2]: *** [all-recursive] Error 1
>> make[2]: Leaving directory `/home/sources/qgis-0.8.0/src'
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory `/home/sources/qgis-0.8.0'
>> make: *** [all] Error 2
>>
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.qgis.org
>> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>>
> 
> 



More information about the Qgis-developer mailing list