tl;dr: I've done things the cmake way and the test are still not ok. The problem is that the test RPATH is being *appended* to the BUILD RPATH, instead of prepended.
long version: My build script is: ---------------------------------------- #!/bin/sh if [ -d $HOME/bin/ccache ]; then echo "enabling ccache" ccache -z PATH=$HOME/bin/ccache:$PATH fi PREFIX=/usr/pkg LIBDIR=${PREFIX}/lib # In theory, BSD make is ok. MAKE=make (rm -rf build destdir && mkdir build && cd build && cmake .. \ -DCMAKE_INSTALL_PREFIX=${PREFIX} \ -DCMAKE_BUILD_RPATH=${LIBDIR} \ -DCMAKE_INSTALL_RPATH=${LIBDIR} \ > OUT.00.cmake 2>&1 && ${MAKE} > OUT.10.make 2>&1 && (${MAKE} check > OUT.20.check 2>&1 || true) && \ make DESTDIR=../destdir install > OUT.30.install 2>&1 && \ echo BUILD DONE ) ---------------------------------------- BUILD_RPATH is passed because a packaging system invoking cmake must in general ensure that programs/libs in the build environment can find their dependencies at test time. Some tests pass, and some fail, with "std:alloc bad" and various other stuff. But a quick look shows that objdump -x of one of the test programs has: RPATH /usr/pkg/lib:/home/n0/gdt/SOFTWARE/GEO/GEOS/geos-master/build/lib so I expect it to go badly. This should have been RPATH /home/n0/gdt/SOFTWARE/GEO/GEOS/geos-master/build/lib:/usr/pkg/lib and then I think it would have been fine. If anyone can tell me what cmake args I should be using instead for the general case of a program with a correct cmake setup and which might be finding dependencies from ${PREFIX}, I'd like to hear about it. The list above is what I came up after reading the cmake docs pointed out by pramsey@ and strk@. Greg
signature.asc
Description: PGP signature
_______________________________________________ geos-devel mailing list geos-devel@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/geos-devel