On Fri, 15 Oct 2021, Paul Ramsey wrote:



On Oct 15, 2021, at 10:26 AM, Paul Ramsey <pram...@cleverelephant.ca> wrote:



On Oct 15, 2021, at 8:20 AM, Roger Bivand <roger.biv...@nhh.no> wrote:

Good. I moved libryu.a to the installed lib64 directory and added -lryu to the g++ command, and there immediate failure is gone. I added libtinyxlm2.a too, because it was in the lib build directory. Adding -lryu and -lstdc++ to geos-config manually for --static-cclibs and --static-clibs permits the full check of the rgeos package to succeed. But please double-check, these are tricks I'm not at all familiar with.

I see that when building in non-dynamic mode cmake also links the test binaries by separately adding the libgeos.a and libryu.a libraries, so it might be that "do that" is the final answer.

You should not need to add libtinyxml2.a to your link line, since it's only used by the xml test program, not by any of the library functionality.


OK, this is coming directly out of https://trac.osgeo.org/geos/ticket/1103

If I go back to using an "OBJECT" library in building ryu, then it gets bundled right up into libgeos.a where we want it, and your link line is nice and simple again. That implies a minimum cmake of 3.13, whcih is 3+ years old now. My macports gives me 3.21 by default. I dunno, we backed out of the OBJECT library to STATIC to keep the cmake requirement low, but that implies generating two static libs and sticking them both on the link line.

I'm inclined to bias towards a newer cmake and still generating one static library.

For completeness, the version of cmake in the MXE environment we use for cross-compiling is 3.20.1, so requiring a version that supports a single, simple libgeos.a is certainly preferable for R packaging for Windows; macOS would be fine too at 3.20.2 in my case.

Roger


P


P.



--
Roger Bivand
Emeritus Professor
Department of Economics, Norwegian School of Economics,
Postboks 3490 Ytre Sandviken, 5045 Bergen, Norway.
e-mail: roger.biv...@nhh.no
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
_______________________________________________
geos-devel mailing list
geos-devel@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/geos-devel

Reply via email to