Kitware / fletch

Computer Vision Software Development Environment
63 stars 54 forks source link

Make fletch install use relative paths #574

Open Erotemic opened 4 years ago

Erotemic commented 4 years ago

I'm curious is there is a reason running a make install on fletch doesn't use relative paths.

A listing of a few of the offending files/lines is as follows:

(py38) joncrall@namek:~/code/kwiver/staging/fletch_install$ cgrep "build/release"
bin/png-config:prefix="/fletch/build/release/install"
bin/png-config:exec_prefix="/fletch/build/release/install"
bin/png-config:libdir="/fletch/build/release/install/lib"
bin/png-config:includedir="/fletch/build/release/install/include/libpng16"
bin/libpng-config:prefix="/fletch/build/release/install"
bin/libpng-config:exec_prefix="/fletch/build/release/install"
bin/libpng-config:libdir="/fletch/build/release/install/lib"
bin/libpng-config:includedir="/fletch/build/release/install/include/libpng16"
share/pkgconfig/zlib.pc:prefix=/fletch/build/release/install
share/pkgconfig/zlib.pc:exec_prefix=/fletch/build/release/install
share/pkgconfig/zlib.pc:libdir=/fletch/build/release/install/lib
share/pkgconfig/zlib.pc:sharedlibdir=/fletch/build/release/install/lib
share/pkgconfig/zlib.pc:includedir=/fletch/build/release/install/include
share/OpenCV/OpenCVModules.cmake:  INTERFACE_LINK_LIBRARIES "/fletch/build/release/install/lib/libz.so"
share/OpenCV/OpenCVModules.cmake:  INTERFACE_LINK_LIBRARIES "\$<LINK_ONLY:dl>;\$<LINK_ONLY:m>;\$<LINK_ONLY:pthread>;\$<LINK_ONLY:rt>;\$<LINK_ONLY:ippiw>;\$<LINK_ONLY:ippicv>;/fletch/build/release/install/lib/libz.so;\$<LINK_ONLY:ittnotify>"
share/OpenCV/OpenCVModules.cmake:  INTERFACE_LINK_LIBRARIES "opencv_core;opencv_imgproc;\$<LINK_ONLY:dl>;\$<LINK_ONLY:m>;\$<LINK_ONLY:pthread>;\$<LINK_ONLY:rt>;\$<LINK_ONLY:ippiw>;\$<LINK_ONLY:ippicv>;/fletch/build/release/install/lib/libz.so;/fletch/build/release/install/lib/libjpeg.a;\$<LINK_ONLY:libwebp>;/fletch/build/release/install/lib/libpng.a;/fletch/build/release/install/lib/libz.so;/fletch/build/release/install/lib/libtiff.a;\$<LINK_ONLY:IlmImf>"
lib/pkgconfig/png.pc:prefix=/fletch/build/release/install
lib/pkgconfig/png.pc:exec_prefix=/fletch/build/release/install
lib/pkgconfig/png.pc:libdir=/fletch/build/release/install/lib
lib/pkgconfig/png.pc:includedir=/fletch/build/release/install/include/libpng16
lib/pkgconfig/libavutil.pc:prefix=/fletch/build/release/install
lib/pkgconfig/protobuf.pc:prefix=/fletch/build/release/install
lib/pkgconfig/protobuf-lite.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libavfilter.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libzmq.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libavformat.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libpng.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libpng.pc:exec_prefix=/fletch/build/release/install
lib/pkgconfig/libpng.pc:libdir=/fletch/build/release/install/lib
lib/pkgconfig/libpng.pc:includedir=/fletch/build/release/install/include/libpng16
lib/pkgconfig/libswscale.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libtiff-4.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libtiff-4.pc:exec_prefix=/fletch/build/release/install
lib/pkgconfig/libtiff-4.pc:libdir=/fletch/build/release/install/lib
lib/pkgconfig/libtiff-4.pc:includedir=/fletch/build/release/install/include
lib/pkgconfig/libtiff-4.pc:Libs: -L/fletch/build/release/install/lib -ltiff
lib/pkgconfig/libtiff-4.pc:Cflags: -I/fletch/build/release/install/include
lib/pkgconfig/opencv.pc:prefix=/fletch/build/release/install
lib/pkgconfig/opencv.pc:Libs.private: -L${exec_prefix}/share/OpenCV/3rdparty/lib -littnotify -llibprotobuf -llibwebp -lIlmImf -lippiw -lippicv -lgthread-2.0 -lglib-2.0 -L/fletch/build/release/install/lib -ljpeg -lpng -lz -ltiff -lavformat -lavcodec -lxcb -lxcb-shm -lxcb-xfixes -lxcb-shape -lswresample -lswscale -lavutil -ldl -lm -lpthread -lrt
lib/pkgconfig/libavdevice.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libavcodec.pc:prefix=/fletch/build/release/install
lib/pkgconfig/yaml-cpp.pc:prefix=/fletch/build/release/install
lib/pkgconfig/yaml-cpp.pc:exec_prefix=/fletch/build/release/install
lib/pkgconfig/libswresample.pc:prefix=/fletch/build/release/install
lib/libprotobuf-lite.la:libdir='/fletch/build/release/install/lib'
lib/libprotobuf.la:libdir='/fletch/build/release/install/lib'
lib/libpng/libpng-release.cmake:  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "/fletch/build/release/install/lib/libz.a;/usr/lib64/libm.so"
lib/libpng/libpng-release.cmake:  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "/fletch/build/release/install/lib/libz.a;/usr/lib64/libm.so"
lib/libprotoc.la:dependency_libs=' /fletch/build/release/install/lib/libprotobuf.la -lpthread -lz'
lib/libprotoc.la:libdir='/fletch/build/release/install/lib'
lib/libturbojpeg.la:libdir='/fletch/build/release/install/lib'
lib/libjpeg.la:libdir='/fletch/build/release/install/lib'
(py38) joncrall@namek:~/code/kwiver/staging/fletch_install$ cgrep "/fletch/build/release"
bin/png-config:prefix="/fletch/build/release/install"
bin/png-config:exec_prefix="/fletch/build/release/install"
bin/png-config:libdir="/fletch/build/release/install/lib"
bin/png-config:includedir="/fletch/build/release/install/include/libpng16"
bin/libpng-config:prefix="/fletch/build/release/install"
bin/libpng-config:exec_prefix="/fletch/build/release/install"
bin/libpng-config:libdir="/fletch/build/release/install/lib"
bin/libpng-config:includedir="/fletch/build/release/install/include/libpng16"
share/pkgconfig/zlib.pc:prefix=/fletch/build/release/install
share/pkgconfig/zlib.pc:exec_prefix=/fletch/build/release/install
share/pkgconfig/zlib.pc:libdir=/fletch/build/release/install/lib
share/pkgconfig/zlib.pc:sharedlibdir=/fletch/build/release/install/lib
share/pkgconfig/zlib.pc:includedir=/fletch/build/release/install/include
share/OpenCV/OpenCVModules.cmake:  INTERFACE_LINK_LIBRARIES "/fletch/build/release/install/lib/libz.so"
share/OpenCV/OpenCVModules.cmake:  INTERFACE_LINK_LIBRARIES "\$<LINK_ONLY:dl>;\$<LINK_ONLY:m>;\$<LINK_ONLY:pthread>;\$<LINK_ONLY:rt>;\$<LINK_ONLY:ippiw>;\$<LINK_ONLY:ippicv>;/fletch/build/release/install/lib/libz.so;\$<LINK_ONLY:ittnotify>"
share/OpenCV/OpenCVModules.cmake:  INTERFACE_LINK_LIBRARIES "opencv_core;opencv_imgproc;\$<LINK_ONLY:dl>;\$<LINK_ONLY:m>;\$<LINK_ONLY:pthread>;\$<LINK_ONLY:rt>;\$<LINK_ONLY:ippiw>;\$<LINK_ONLY:ippicv>;/fletch/build/release/install/lib/libz.so;/fletch/build/release/install/lib/libjpeg.a;\$<LINK_ONLY:libwebp>;/fletch/build/release/install/lib/libpng.a;/fletch/build/release/install/lib/libz.so;/fletch/build/release/install/lib/libtiff.a;\$<LINK_ONLY:IlmImf>"
lib/pkgconfig/png.pc:prefix=/fletch/build/release/install
lib/pkgconfig/png.pc:exec_prefix=/fletch/build/release/install
lib/pkgconfig/png.pc:libdir=/fletch/build/release/install/lib
lib/pkgconfig/png.pc:includedir=/fletch/build/release/install/include/libpng16
lib/pkgconfig/libavutil.pc:prefix=/fletch/build/release/install
lib/pkgconfig/protobuf.pc:prefix=/fletch/build/release/install
lib/pkgconfig/protobuf-lite.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libavfilter.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libzmq.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libavformat.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libpng.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libpng.pc:exec_prefix=/fletch/build/release/install
lib/pkgconfig/libpng.pc:libdir=/fletch/build/release/install/lib
lib/pkgconfig/libpng.pc:includedir=/fletch/build/release/install/include/libpng16
lib/pkgconfig/libswscale.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libtiff-4.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libtiff-4.pc:exec_prefix=/fletch/build/release/install
lib/pkgconfig/libtiff-4.pc:libdir=/fletch/build/release/install/lib
lib/pkgconfig/libtiff-4.pc:includedir=/fletch/build/release/install/include
lib/pkgconfig/libtiff-4.pc:Libs: -L/fletch/build/release/install/lib -ltiff
lib/pkgconfig/libtiff-4.pc:Cflags: -I/fletch/build/release/install/include
lib/pkgconfig/opencv.pc:prefix=/fletch/build/release/install
lib/pkgconfig/opencv.pc:Libs.private: -L${exec_prefix}/share/OpenCV/3rdparty/lib -littnotify -llibprotobuf -llibwebp -lIlmImf -lippiw -lippicv -lgthread-2.0 -lglib-2.0 -L/fletch/build/release/install/lib -ljpeg -lpng -lz -ltiff -lavformat -lavcodec -lxcb -lxcb-shm -lxcb-xfixes -lxcb-shape -lswresample -lswscale -lavutil -ldl -lm -lpthread -lrt
lib/pkgconfig/libavdevice.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libavcodec.pc:prefix=/fletch/build/release/install
lib/pkgconfig/yaml-cpp.pc:prefix=/fletch/build/release/install
lib/pkgconfig/yaml-cpp.pc:exec_prefix=/fletch/build/release/install
lib/pkgconfig/libswresample.pc:prefix=/fletch/build/release/install
lib/libprotobuf-lite.la:libdir='/fletch/build/release/install/lib'
lib/libprotobuf.la:libdir='/fletch/build/release/install/lib'
lib/libpng/libpng-release.cmake:  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "/fletch/build/release/install/lib/libz.a;/usr/lib64/libm.so"
lib/libpng/libpng-release.cmake:  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "/fletch/build/release/install/lib/libz.a;/usr/lib64/libm.so"
lib/libprotoc.la:dependency_libs=' /fletch/build/release/install/lib/libprotobuf.la -lpthread -lz'
lib/libprotoc.la:libdir='/fletch/build/release/install/lib'
lib/libturbojpeg.la:libdir='/fletch/build/release/install/lib'
lib/libjpeg.la:libdir='/fletch/build/release/install/lib'
(py38) joncrall@namek:~/code/kwiver/staging/fletch_install$ ^C
(py38) joncrall@namek:~/code/kwiver/staging/fletch_install$ cgrep "/fletch/build/release"
bin/png-config:prefix="/fletch/build/release/install"
bin/png-config:exec_prefix="/fletch/build/release/install"
bin/png-config:libdir="/fletch/build/release/install/lib"
bin/png-config:includedir="/fletch/build/release/install/include/libpng16"
bin/libpng-config:prefix="/fletch/build/release/install"
bin/libpng-config:exec_prefix="/fletch/build/release/install"
bin/libpng-config:libdir="/fletch/build/release/install/lib"
bin/libpng-config:includedir="/fletch/build/release/install/include/libpng16"
share/pkgconfig/zlib.pc:prefix=/fletch/build/release/install
share/pkgconfig/zlib.pc:exec_prefix=/fletch/build/release/install
share/pkgconfig/zlib.pc:libdir=/fletch/build/release/install/lib
share/pkgconfig/zlib.pc:sharedlibdir=/fletch/build/release/install/lib
share/pkgconfig/zlib.pc:includedir=/fletch/build/release/install/include
share/OpenCV/OpenCVModules.cmake:  INTERFACE_LINK_LIBRARIES "/fletch/build/release/install/lib/libz.so"
share/OpenCV/OpenCVModules.cmake:  INTERFACE_LINK_LIBRARIES "\$<LINK_ONLY:dl>;\$<LINK_ONLY:m>;\$<LINK_ONLY:pthread>;\$<LINK_ONLY:rt>;\$<LINK_ONLY:ippiw>;\$<LINK_ONLY:ippicv>;/fletch/build/release/install/lib/libz.so;\$<LINK_ONLY:ittnotify>"
share/OpenCV/OpenCVModules.cmake:  INTERFACE_LINK_LIBRARIES "opencv_core;opencv_imgproc;\$<LINK_ONLY:dl>;\$<LINK_ONLY:m>;\$<LINK_ONLY:pthread>;\$<LINK_ONLY:rt>;\$<LINK_ONLY:ippiw>;\$<LINK_ONLY:ippicv>;/fletch/build/release/install/lib/libz.so;/fletch/build/release/install/lib/libjpeg.a;\$<LINK_ONLY:libwebp>;/fletch/build/release/install/lib/libpng.a;/fletch/build/release/install/lib/libz.so;/fletch/build/release/install/lib/libtiff.a;\$<LINK_ONLY:IlmImf>"
lib/pkgconfig/png.pc:prefix=/fletch/build/release/install
lib/pkgconfig/png.pc:exec_prefix=/fletch/build/release/install
lib/pkgconfig/png.pc:libdir=/fletch/build/release/install/lib
lib/pkgconfig/png.pc:includedir=/fletch/build/release/install/include/libpng16
lib/pkgconfig/libavutil.pc:prefix=/fletch/build/release/install
lib/pkgconfig/protobuf.pc:prefix=/fletch/build/release/install
lib/pkgconfig/protobuf-lite.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libavfilter.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libzmq.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libavformat.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libpng.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libpng.pc:exec_prefix=/fletch/build/release/install
lib/pkgconfig/libpng.pc:libdir=/fletch/build/release/install/lib
lib/pkgconfig/libpng.pc:includedir=/fletch/build/release/install/include/libpng16
lib/pkgconfig/libswscale.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libtiff-4.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libtiff-4.pc:exec_prefix=/fletch/build/release/install
lib/pkgconfig/libtiff-4.pc:libdir=/fletch/build/release/install/lib
lib/pkgconfig/libtiff-4.pc:includedir=/fletch/build/release/install/include
lib/pkgconfig/libtiff-4.pc:Libs: -L/fletch/build/release/install/lib -ltiff
lib/pkgconfig/libtiff-4.pc:Cflags: -I/fletch/build/release/install/include
lib/pkgconfig/opencv.pc:prefix=/fletch/build/release/install
lib/pkgconfig/opencv.pc:Libs.private: -L${exec_prefix}/share/OpenCV/3rdparty/lib -littnotify -llibprotobuf -llibwebp -lIlmImf -lippiw -lippicv -lgthread-2.0 -lglib-2.0 -L/fletch/build/release/install/lib -ljpeg -lpng -lz -ltiff -lavformat -lavcodec -lxcb -lxcb-shm -lxcb-xfixes -lxcb-shape -lswresample -lswscale -lavutil -ldl -lm -lpthread -lrt
lib/pkgconfig/libavdevice.pc:prefix=/fletch/build/release/install
lib/pkgconfig/libavcodec.pc:prefix=/fletch/build/release/install
lib/pkgconfig/yaml-cpp.pc:prefix=/fletch/build/release/install
lib/pkgconfig/yaml-cpp.pc:exec_prefix=/fletch/build/release/install
lib/pkgconfig/libswresample.pc:prefix=/fletch/build/release/install
lib/libprotobuf-lite.la:libdir='/fletch/build/release/install/lib'
lib/libprotobuf.la:libdir='/fletch/build/release/install/lib'
lib/libpng/libpng-release.cmake:  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "/fletch/build/release/install/lib/libz.a;/usr/lib64/libm.so"
lib/libpng/libpng-release.cmake:  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "/fletch/build/release/install/lib/libz.a;/usr/lib64/libm.so"
lib/libprotoc.la:dependency_libs=' /fletch/build/release/install/lib/libprotobuf.la -lpthread -lz'
lib/libprotoc.la:libdir='/fletch/build/release/install/lib'
lib/libturbojpeg.la:libdir='/fletch/build/release/install/lib'
lib/libjpeg.la:libdir='/fletch/build/release/install/lib'

lib/cmake/fletch/fletchConfig.cmake:set(fletch_ROOT "/fletch_install")

Note that my CMAKE_INSTALL_PREFIX at build time was /fletch_install and my build directory was '/fletch/build`. I build the package in a docker manylinux container.

When I use sed to replace all of these paths with the absolute path where I copied it on my local machine ($HOME/code/kwiver/staging/fletch_install), I was able to build kwiver (or at least start building kwiver, it hasn't finished so there might be an error).

In summary:

mleotta commented 4 years ago

I believe the issue is that fletch is not relocatable. The install path you pick at build time is passed down to the third party packages and several of those packages hard code that install path at build time. So if you try to relocate the install tree some of the libraries will have incorrect paths and things will break at run time. I think we've looked at this before and it's not an easy to make all the third party packages relocatable. I don't remember the details, but I expect if you used a relative path at least one of those packages would turn it into an absolute path which would be wrong after you try to relocate. My understanding of this issue might not be entirely correct, but I've definitely wrestled with this before and this is what I remember.

On Wed, Feb 12, 2020 at 8:08 PM Jon Crall notifications@github.com wrote:

I'm curious is there is a reason running a make install on fletch doesn't use relative paths.

A listing of a few of the offending files/lines is as follows:

(py38) joncrall@namek:~/code/kwiver/staging/fletch_install$ cgrep "build/release" bin/png-config:prefix="/fletch/build/release/install" bin/png-config:exec_prefix="/fletch/build/release/install" bin/png-config:libdir="/fletch/build/release/install/lib" bin/png-config:includedir="/fletch/build/release/install/include/libpng16" bin/libpng-config:prefix="/fletch/build/release/install" bin/libpng-config:exec_prefix="/fletch/build/release/install" bin/libpng-config:libdir="/fletch/build/release/install/lib" bin/libpng-config:includedir="/fletch/build/release/install/include/libpng16" share/pkgconfig/zlib.pc:prefix=/fletch/build/release/install share/pkgconfig/zlib.pc:exec_prefix=/fletch/build/release/install share/pkgconfig/zlib.pc:libdir=/fletch/build/release/install/lib share/pkgconfig/zlib.pc:sharedlibdir=/fletch/build/release/install/lib share/pkgconfig/zlib.pc:includedir=/fletch/build/release/install/include share/OpenCV/OpenCVModules.cmake: INTERFACE_LINK_LIBRARIES "/fletch/build/release/install/lib/libz.so" share/OpenCV/OpenCVModules.cmake: INTERFACE_LINK_LIBRARIES "\$;\$;\$;\$;\$;\$;/fletch/build/release/install/lib/libz.so;\$" share/OpenCV/OpenCVModules.cmake: INTERFACE_LINK_LIBRARIES "opencv_core;opencv_imgproc;\$;\$;\$;\$;\$;\$;/fletch/build/release/install/lib/libz.so;/fletch/build/release/install/lib/libjpeg.a;\$;/fletch/build/release/install/lib/libpng.a;/fletch/build/release/install/lib/libz.so;/fletch/build/release/install/lib/libtiff.a;\$" lib/pkgconfig/png.pc:prefix=/fletch/build/release/install lib/pkgconfig/png.pc:exec_prefix=/fletch/build/release/install lib/pkgconfig/png.pc:libdir=/fletch/build/release/install/lib lib/pkgconfig/png.pc:includedir=/fletch/build/release/install/include/libpng16 lib/pkgconfig/libavutil.pc:prefix=/fletch/build/release/install lib/pkgconfig/protobuf.pc:prefix=/fletch/build/release/install lib/pkgconfig/protobuf-lite.pc:prefix=/fletch/build/release/install lib/pkgconfig/libavfilter.pc:prefix=/fletch/build/release/install lib/pkgconfig/libzmq.pc:prefix=/fletch/build/release/install lib/pkgconfig/libavformat.pc:prefix=/fletch/build/release/install lib/pkgconfig/libpng.pc:prefix=/fletch/build/release/install lib/pkgconfig/libpng.pc:exec_prefix=/fletch/build/release/install lib/pkgconfig/libpng.pc:libdir=/fletch/build/release/install/lib lib/pkgconfig/libpng.pc:includedir=/fletch/build/release/install/include/libpng16 lib/pkgconfig/libswscale.pc:prefix=/fletch/build/release/install lib/pkgconfig/libtiff-4.pc:prefix=/fletch/build/release/install lib/pkgconfig/libtiff-4.pc:exec_prefix=/fletch/build/release/install lib/pkgconfig/libtiff-4.pc:libdir=/fletch/build/release/install/lib lib/pkgconfig/libtiff-4.pc:includedir=/fletch/build/release/install/include lib/pkgconfig/libtiff-4.pc:Libs: -L/fletch/build/release/install/lib -ltiff lib/pkgconfig/libtiff-4.pc:Cflags: -I/fletch/build/release/install/include lib/pkgconfig/opencv.pc:prefix=/fletch/build/release/install lib/pkgconfig/opencv.pc:Libs.private: -L${exec_prefix}/share/OpenCV/3rdparty/lib -littnotify -llibprotobuf -llibwebp -lIlmImf -lippiw -lippicv -lgthread-2.0 -lglib-2.0 -L/fletch/build/release/install/lib -ljpeg -lpng -lz -ltiff -lavformat -lavcodec -lxcb -lxcb-shm -lxcb-xfixes -lxcb-shape -lswresample -lswscale -lavutil -ldl -lm -lpthread -lrt lib/pkgconfig/libavdevice.pc:prefix=/fletch/build/release/install lib/pkgconfig/libavcodec.pc:prefix=/fletch/build/release/install lib/pkgconfig/yaml-cpp.pc:prefix=/fletch/build/release/install lib/pkgconfig/yaml-cpp.pc:exec_prefix=/fletch/build/release/install lib/pkgconfig/libswresample.pc:prefix=/fletch/build/release/install lib/libprotobuf-lite.la:libdir='/fletch/build/release/install/lib' lib/libprotobuf.la:libdir='/fletch/build/release/install/lib' lib/libpng/libpng-release.cmake: IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "/fletch/build/release/install/lib/libz.a;/usr/lib64/libm.so" lib/libpng/libpng-release.cmake: IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "/fletch/build/release/install/lib/libz.a;/usr/lib64/libm.so" lib/libprotoc.la:dependency_libs=' /fletch/build/release/install/lib/libprotobuf.la -lpthread -lz' lib/libprotoc.la:libdir='/fletch/build/release/install/lib' lib/libturbojpeg.la:libdir='/fletch/build/release/install/lib' lib/libjpeg.la:libdir='/fletch/build/release/install/lib' (py38) joncrall@namek:~/code/kwiver/staging/fletch_install$ cgrep "/fletch/build/release" bin/png-config:prefix="/fletch/build/release/install" bin/png-config:exec_prefix="/fletch/build/release/install" bin/png-config:libdir="/fletch/build/release/install/lib" bin/png-config:includedir="/fletch/build/release/install/include/libpng16" bin/libpng-config:prefix="/fletch/build/release/install" bin/libpng-config:exec_prefix="/fletch/build/release/install" bin/libpng-config:libdir="/fletch/build/release/install/lib" bin/libpng-config:includedir="/fletch/build/release/install/include/libpng16" share/pkgconfig/zlib.pc:prefix=/fletch/build/release/install share/pkgconfig/zlib.pc:exec_prefix=/fletch/build/release/install share/pkgconfig/zlib.pc:libdir=/fletch/build/release/install/lib share/pkgconfig/zlib.pc:sharedlibdir=/fletch/build/release/install/lib share/pkgconfig/zlib.pc:includedir=/fletch/build/release/install/include share/OpenCV/OpenCVModules.cmake: INTERFACE_LINK_LIBRARIES "/fletch/build/release/install/lib/libz.so" share/OpenCV/OpenCVModules.cmake: INTERFACE_LINK_LIBRARIES "\$;\$;\$;\$;\$;\$;/fletch/build/release/install/lib/libz.so;\$" share/OpenCV/OpenCVModules.cmake: INTERFACE_LINK_LIBRARIES "opencv_core;opencv_imgproc;\$;\$;\$;\$;\$;\$;/fletch/build/release/install/lib/libz.so;/fletch/build/release/install/lib/libjpeg.a;\$;/fletch/build/release/install/lib/libpng.a;/fletch/build/release/install/lib/libz.so;/fletch/build/release/install/lib/libtiff.a;\$" lib/pkgconfig/png.pc:prefix=/fletch/build/release/install lib/pkgconfig/png.pc:exec_prefix=/fletch/build/release/install lib/pkgconfig/png.pc:libdir=/fletch/build/release/install/lib lib/pkgconfig/png.pc:includedir=/fletch/build/release/install/include/libpng16 lib/pkgconfig/libavutil.pc:prefix=/fletch/build/release/install lib/pkgconfig/protobuf.pc:prefix=/fletch/build/release/install lib/pkgconfig/protobuf-lite.pc:prefix=/fletch/build/release/install lib/pkgconfig/libavfilter.pc:prefix=/fletch/build/release/install lib/pkgconfig/libzmq.pc:prefix=/fletch/build/release/install lib/pkgconfig/libavformat.pc:prefix=/fletch/build/release/install lib/pkgconfig/libpng.pc:prefix=/fletch/build/release/install lib/pkgconfig/libpng.pc:exec_prefix=/fletch/build/release/install lib/pkgconfig/libpng.pc:libdir=/fletch/build/release/install/lib lib/pkgconfig/libpng.pc:includedir=/fletch/build/release/install/include/libpng16 lib/pkgconfig/libswscale.pc:prefix=/fletch/build/release/install lib/pkgconfig/libtiff-4.pc:prefix=/fletch/build/release/install lib/pkgconfig/libtiff-4.pc:exec_prefix=/fletch/build/release/install lib/pkgconfig/libtiff-4.pc:libdir=/fletch/build/release/install/lib lib/pkgconfig/libtiff-4.pc:includedir=/fletch/build/release/install/include lib/pkgconfig/libtiff-4.pc:Libs: -L/fletch/build/release/install/lib -ltiff lib/pkgconfig/libtiff-4.pc:Cflags: -I/fletch/build/release/install/include lib/pkgconfig/opencv.pc:prefix=/fletch/build/release/install lib/pkgconfig/opencv.pc:Libs.private: -L${exec_prefix}/share/OpenCV/3rdparty/lib -littnotify -llibprotobuf -llibwebp -lIlmImf -lippiw -lippicv -lgthread-2.0 -lglib-2.0 -L/fletch/build/release/install/lib -ljpeg -lpng -lz -ltiff -lavformat -lavcodec -lxcb -lxcb-shm -lxcb-xfixes -lxcb-shape -lswresample -lswscale -lavutil -ldl -lm -lpthread -lrt lib/pkgconfig/libavdevice.pc:prefix=/fletch/build/release/install lib/pkgconfig/libavcodec.pc:prefix=/fletch/build/release/install lib/pkgconfig/yaml-cpp.pc:prefix=/fletch/build/release/install lib/pkgconfig/yaml-cpp.pc:exec_prefix=/fletch/build/release/install lib/pkgconfig/libswresample.pc:prefix=/fletch/build/release/install lib/libprotobuf-lite.la:libdir='/fletch/build/release/install/lib' lib/libprotobuf.la:libdir='/fletch/build/release/install/lib' lib/libpng/libpng-release.cmake: IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "/fletch/build/release/install/lib/libz.a;/usr/lib64/libm.so" lib/libpng/libpng-release.cmake: IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "/fletch/build/release/install/lib/libz.a;/usr/lib64/libm.so" lib/libprotoc.la:dependency_libs=' /fletch/build/release/install/lib/libprotobuf.la -lpthread -lz' lib/libprotoc.la:libdir='/fletch/build/release/install/lib' lib/libturbojpeg.la:libdir='/fletch/build/release/install/lib' lib/libjpeg.la:libdir='/fletch/build/release/install/lib' (py38) joncrall@namek:~/code/kwiver/staging/fletch_install$ ^C (py38) joncrall@namek:~/code/kwiver/staging/fletch_install$ cgrep "/fletch/build/release" bin/png-config:prefix="/fletch/build/release/install" bin/png-config:exec_prefix="/fletch/build/release/install" bin/png-config:libdir="/fletch/build/release/install/lib" bin/png-config:includedir="/fletch/build/release/install/include/libpng16" bin/libpng-config:prefix="/fletch/build/release/install" bin/libpng-config:exec_prefix="/fletch/build/release/install" bin/libpng-config:libdir="/fletch/build/release/install/lib" bin/libpng-config:includedir="/fletch/build/release/install/include/libpng16" share/pkgconfig/zlib.pc:prefix=/fletch/build/release/install share/pkgconfig/zlib.pc:exec_prefix=/fletch/build/release/install share/pkgconfig/zlib.pc:libdir=/fletch/build/release/install/lib share/pkgconfig/zlib.pc:sharedlibdir=/fletch/build/release/install/lib share/pkgconfig/zlib.pc:includedir=/fletch/build/release/install/include share/OpenCV/OpenCVModules.cmake: INTERFACE_LINK_LIBRARIES "/fletch/build/release/install/lib/libz.so" share/OpenCV/OpenCVModules.cmake: INTERFACE_LINK_LIBRARIES "\$;\$;\$;\$;\$;\$;/fletch/build/release/install/lib/libz.so;\$" share/OpenCV/OpenCVModules.cmake: INTERFACE_LINK_LIBRARIES "opencv_core;opencv_imgproc;\$;\$;\$;\$;\$;\$;/fletch/build/release/install/lib/libz.so;/fletch/build/release/install/lib/libjpeg.a;\$;/fletch/build/release/install/lib/libpng.a;/fletch/build/release/install/lib/libz.so;/fletch/build/release/install/lib/libtiff.a;\$" lib/pkgconfig/png.pc:prefix=/fletch/build/release/install lib/pkgconfig/png.pc:exec_prefix=/fletch/build/release/install lib/pkgconfig/png.pc:libdir=/fletch/build/release/install/lib lib/pkgconfig/png.pc:includedir=/fletch/build/release/install/include/libpng16 lib/pkgconfig/libavutil.pc:prefix=/fletch/build/release/install lib/pkgconfig/protobuf.pc:prefix=/fletch/build/release/install lib/pkgconfig/protobuf-lite.pc:prefix=/fletch/build/release/install lib/pkgconfig/libavfilter.pc:prefix=/fletch/build/release/install lib/pkgconfig/libzmq.pc:prefix=/fletch/build/release/install lib/pkgconfig/libavformat.pc:prefix=/fletch/build/release/install lib/pkgconfig/libpng.pc:prefix=/fletch/build/release/install lib/pkgconfig/libpng.pc:exec_prefix=/fletch/build/release/install lib/pkgconfig/libpng.pc:libdir=/fletch/build/release/install/lib lib/pkgconfig/libpng.pc:includedir=/fletch/build/release/install/include/libpng16 lib/pkgconfig/libswscale.pc:prefix=/fletch/build/release/install lib/pkgconfig/libtiff-4.pc:prefix=/fletch/build/release/install lib/pkgconfig/libtiff-4.pc:exec_prefix=/fletch/build/release/install lib/pkgconfig/libtiff-4.pc:libdir=/fletch/build/release/install/lib lib/pkgconfig/libtiff-4.pc:includedir=/fletch/build/release/install/include lib/pkgconfig/libtiff-4.pc:Libs: -L/fletch/build/release/install/lib -ltiff lib/pkgconfig/libtiff-4.pc:Cflags: -I/fletch/build/release/install/include lib/pkgconfig/opencv.pc:prefix=/fletch/build/release/install lib/pkgconfig/opencv.pc:Libs.private: -L${exec_prefix}/share/OpenCV/3rdparty/lib -littnotify -llibprotobuf -llibwebp -lIlmImf -lippiw -lippicv -lgthread-2.0 -lglib-2.0 -L/fletch/build/release/install/lib -ljpeg -lpng -lz -ltiff -lavformat -lavcodec -lxcb -lxcb-shm -lxcb-xfixes -lxcb-shape -lswresample -lswscale -lavutil -ldl -lm -lpthread -lrt lib/pkgconfig/libavdevice.pc:prefix=/fletch/build/release/install lib/pkgconfig/libavcodec.pc:prefix=/fletch/build/release/install lib/pkgconfig/yaml-cpp.pc:prefix=/fletch/build/release/install lib/pkgconfig/yaml-cpp.pc:exec_prefix=/fletch/build/release/install lib/pkgconfig/libswresample.pc:prefix=/fletch/build/release/install lib/libprotobuf-lite.la:libdir='/fletch/build/release/install/lib' lib/libprotobuf.la:libdir='/fletch/build/release/install/lib' lib/libpng/libpng-release.cmake: IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "/fletch/build/release/install/lib/libz.a;/usr/lib64/libm.so" lib/libpng/libpng-release.cmake: IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "/fletch/build/release/install/lib/libz.a;/usr/lib64/libm.so" lib/libprotoc.la:dependency_libs=' /fletch/build/release/install/lib/libprotobuf.la -lpthread -lz' lib/libprotoc.la:libdir='/fletch/build/release/install/lib' lib/libturbojpeg.la:libdir='/fletch/build/release/install/lib' lib/libjpeg.la:libdir='/fletch/build/release/install/lib'

lib/cmake/fletch/fletchConfig.cmake:set(fletch_ROOT "/fletch_install")

Note that my CMAKE_INSTALL_PREFIX at build time was /fletch_install and my build directory was '/fletch/build`. I build the package in a docker manylinux container.

When I use sed to replace all of these paths with the absolute path where I copied it on my local machine ($HOME/code/kwiver/staging/fletch_install), I was able to build kwiver (or at least start building kwiver, it hasn't finished so there might be an error).

In summary:

-

Is there any reason these paths are not relative?

If not, how hard it is to make paths relative so I can build fletch in docker and then build a local version of kwiver that targets that fletch install?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Kitware/fletch/issues/574?email_source=notifications&email_token=AAGJWMKXXMBDXM5K7G7NCBTRCSMQTA5CNFSM4KUHV2D2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4INDWC5Q, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGJWMJHWSZRI3ZPJNMXGNDRCSMQTANCNFSM4KUHV2DQ .

Erotemic commented 4 years ago

So, I think we should at least spend some effort to determine which third-party-libraries actually have this problem. A condensed list of the above is as follows:

I doubt that all 16 of these have the problem where the third party library itself relies on absolute paths. Perhaps a few of them do though. In any case if we can reduce the number of times an absolute path is referenced in the fletch install that will make this issue simpler to address in the future and then we can either (1) patch any offending third party libraries or (2) manual hack a small number of offending installs in order to relocate the fletch install.

dstoup commented 4 years ago

The other issue will come if you need to use a package's cmake file to find its components. If you were to call find_package( VXL .... ) for example, its cmake file will point to libraries, etc that don't exist in the specified location. This issue exists for any of the packages that build with CMake which is a much bigger list that what you've posted.

The (less than perfect) solution in place that works is to pass -Dfletch_BUILD_INSTALL_PREFIX:PATH=/opt/fletch ... or wherever you want fletch to live. It's not relocatable per se, but makes it easy to have your install of fletch live separately from any build or source directory. You could tar that up and move it in/out of docker or wherever provided that path is maintained.

On Thu, Feb 13, 2020 at 10:52 AM Jon Crall notifications@github.com wrote:

So, I think we should at least spend some effort to determine which third-party-libraries actually have this problem. A condensed list of the above is as follows:

  • libpng
  • libjpeg
  • libtiff
  • libturbojpeg
  • libzmq
  • libprotobuf
  • yaml-cpp
  • zlib
  • opencv
  • libavcodec
  • libavdevice
  • libavfilter
  • libavformat
  • libavutil
  • libswresample
  • libswscale

I doubt that all 16 of these have the problem where the third party library itself relies on absolute paths. Perhaps a few of them do though. In any case if we can reduce the number of times an absolute path is referenced in the fletch install that will make this issue simpler to address in the future and then we can either (1) patch any offending third party libraries or (2) manual hack a small number of offending installs in order to relocate the fletch install.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Kitware/fletch/issues/574?email_source=notifications&email_token=ABKEAWXVQB3CBR5NCQ5KVE3RCVUDBA5CNFSM4KUHV2D2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELVQMRA#issuecomment-585827908, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKEAWVG4VQN3RS6CNU7YJDRCVUDBANCNFSM4KUHV2DQ .

-- David Stoup Principal Engineer

Kitware, Inc.

1712 Route 9, Suite 300 Clifton Park, NY 12065-3104 518-881-4949 (W) 518-312-3946 (M) 518-371-4573 (F)

mleotta commented 4 years ago

This list of libraries is far from the complete list. This might be just the subset of Fletch that you are building. It's possible that none of these libraries have the issue. It's hard to know for sure which libraries have the issue because they tend to break at run-time and only if you are using that library. I recall Qt being one of the offenders, but I don't remember what else.

On Thu, Feb 13, 2020 at 10:52 AM Jon Crall notifications@github.com wrote:

So, I think we should at least spend some effort to determine which third-party-libraries actually have this problem. A condensed list of the above is as follows:

  • libpng
  • libjpeg
  • libtiff
  • libturbojpeg
  • libzmq
  • libprotobuf
  • yaml-cpp
  • zlib
  • opencv
  • libavcodec
  • libavdevice
  • libavfilter
  • libavformat
  • libavutil
  • libswresample
  • libswscale

I doubt that all 16 of these have the problem where the third party library itself relies on absolute paths. Perhaps a few of them do though. In any case if we can reduce the number of times an absolute path is referenced in the fletch install that will make this issue simpler to address in the future and then we can either (1) patch any offending third party libraries or (2) manual hack a small number of offending installs in order to relocate the fletch install.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Kitware/fletch/issues/574?email_source=notifications&email_token=AAGJWMLSXHK6AHNE27HVGITRCVUDBA5CNFSM4KUHV2D2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELVQMRA#issuecomment-585827908, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGJWMIU6CAEA3HTFPBEBJDRCVUDBANCNFSM4KUHV2DQ .