[geos-devel] cmake detailed comments

Greg Troxel gdt at lexort.com
Wed Oct 13 09:08:50 PDT 2021


Sandro Santilli <strk at kbt.io> writes:

> What do you mean by "I like how our tests work now" ? How do they work
> for you ? Are them guaranteed to be using the *just_built* (rather
> than the *installed*) libraries ?

I believe I've found a bug in running tests.  When one passes in
-W,-R/usr/foo/lib to the build (in LDFLAGS), the not-installed tests end
up having two RPATH entries:

  /usr/foo/lib
  /path/to/build/tree/lib

and they are ordered that way, resulting in libgeos_c being found in
/usr/foo/lib.

So maybe strk can test (on Linux I'm guessing):

  build and install geos 3.9.1 as --prefix=/usr/foo

  build geos 3.10 by telling cmake to use /usr/foo as prefix, and
  passing in the environment
    CPPFLAGS=-I/usr/foo/include
    LDFLAGS="-L/usr/foo/lib -Wl,-R/usr/foo/lib"
  as a packaging system building everything for /usr/foo would do.

  Then look at the test binaries  with objdump -x, ldd, and run them.I
  expect they will mislink against the installed geos.

If so, the bug in cmake or geos cmakefiles is that the extra RPATH for
tests is put after the other RPATH values, rather then being put first.

Or rather, that is the bug, but if you can reproduce it that's progress
in understanding its scope.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20211013/9798d59e/attachment.sig>


More information about the geos-devel mailing list