Sandro Santilli <s...@kbt.io> writes: > On Wed, Oct 13, 2021 at 12:08:50PM -0400, Greg Troxel wrote: >> >> Sandro Santilli <s...@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. > > Before I go on testing this let me please ask: why would you > pass -W,-R/usr/foo/lib to the build ?
Well, you did test (thanks!), and you did reproduce the problem, but: Stepping back from just thinking about geos, in the context of a packaging system, there is a desire to do things in a way that works in the general case, rather than tightly adapating to particular systems. In general: ${PREFIX}/lib is not necessarily in the default linker search path a given package may depend on other libraries which are already in ${PREFIX}/lib as dependency packages build systems often either check for libraries with a test program with #include <foo.h> and compiled with -lfoo, and for this to work the -R needs to be present. some build systems just add -lfoo because it's documented they need them and don't check, and in that case -R needs to be present and in the case of pkgsrc, passing -R in LDFLAGS as the standard approach has survived the test of time in a system that runs on many (20 in theory, probably only 10 of which have users - HP-UX no longer counts) systems with ~25K packages. So there could be special logic to avoid it, but on the other hand it's possible that on one of those systems pthreads is not part of the OS and is a package that gets depended on, and thus it would be necessary. I realize that the world is moving from "just use it" to "packages are expected to use pkg-config", and that's a good thing as it's a single uniform interface. Packaging systems have to deal with such interfaces, and do -- but it imposes a lot of work when there are boutique methods to do things. Fortunately geos is producing a pc file, and in general things are getting more regularized.
signature.asc
Description: PGP signature
_______________________________________________ geos-devel mailing list geos-devel@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/geos-devel