Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make fletch install use relative paths #574

Open
Erotemic opened this issue Feb 13, 2020 · 4 comments
Open

Make fletch install use relative paths #574

Erotemic opened this issue Feb 13, 2020 · 4 comments

Comments

@Erotemic
Copy link
Member

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:

  • 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?

@mleotta
Copy link
Member

mleotta commented Feb 13, 2020 via email

@Erotemic
Copy link
Member Author

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.

@dstoup
Copy link
Collaborator

dstoup commented Feb 13, 2020 via email

@mleotta
Copy link
Member

mleotta commented Feb 13, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants