openmpf / openmpf-docker

OpenMPF Docker deployment files and other artifacts
https://hub.docker.com/u/openmpf
5 stars 2 forks source link

openmpf/openmpf_cpp_executor image has unsatisfied shared lib dependencies #214

Open w3sip opened 2 months ago

w3sip commented 2 months ago
alex@aphelion:$ docker run -it --rm --entrypoint /bin/bash openmpf/openmpf_cpp_executor:8.0.0
root@6e2a8ae8893a:/opt/mpf# ldd bin/amq_detection_component
    linux-vdso.so.1 (0x00007ffcc45fe000)
    libpython3.8.so.1.0 => /lib/x86_64-linux-gnu/libpython3.8.so.1.0 (0x00007855d0aa2000)
    liblog4cxx.so.10 => not found
    libactivemq-cpp.so.19 => /lib/x86_64-linux-gnu/libactivemq-cpp.so.19 (0x00007855cf984000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007855cf961000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007855cf95b000)
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007855cf779000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007855cf75c000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007855cf56a000)
    libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007855cf53c000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007855cf520000)
    libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007855cf51b000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007855cf3cc000)
    libapr-1.so.0 => not found
    libssl.so.1.1 => /lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007855cf337000)
    libcrypto.so.1.1 => /lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007855cf061000)
    /lib64/ld-linux-x86-64.so.2 (0x00007855d1212000)
root@6e2a8ae8893a:/opt/mpf# find / -name liblog4cxx.so*
root@6e2a8ae8893a:/opt/mpf#

As you see, amq_detection_component included in the image requires liblog4cxx.so.10 and libapr-1.so.0 -- both not included in the image.

jrobble commented 2 months ago

You're right. Those libs are missing from the executor image. This has not been a problem for us since they do end up getting pulled into the C++ component images that need them. For example:

╰─❯ docker run -it --rm --entrypoint /bin/bash openmpf/openmpf_ocv_face_detection:8.0.0
root@6abe0afc3f86:/opt/mpf# ldd bin/amq_detection_component
    linux-vdso.so.1 (0x00007fff5eda4000)
    libpython3.8.so.1.0 => /lib/x86_64-linux-gnu/libpython3.8.so.1.0 (0x00007f5a6cee3000)
    liblog4cxx.so.10 => /opt/mpf/plugins/OcvFaceDetection/lib/liblog4cxx.so.10 (0x00007f5a6cd05000)
    libactivemq-cpp.so.19 => /lib/x86_64-linux-gnu/libactivemq-cpp.so.19 (0x00007f5a6bbe7000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5a6bbc4000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5a6bbbe000)
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f5a6b9dc000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f5a6b9bf000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5a6b7cd000)
    libexpat.so.1 => /opt/mpf/plugins/OcvFaceDetection/lib/libexpat.so.1 (0x00007f5a6b79f000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f5a6b783000)
    libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f5a6b77e000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5a6b62f000)
    libapr-1.so.0 => /opt/mpf/plugins/OcvFaceDetection/lib/libapr-1.so.0 (0x00007f5a6b5f4000)
    libaprutil-1.so.0 => /opt/mpf/plugins/OcvFaceDetection/lib/libaprutil-1.so.0 (0x00007f5a6b5c6000)
    libssl.so.1.1 => /lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f5a6b533000)
    libcrypto.so.1.1 => /lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f5a6b25d000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f5a6d653000)
    libuuid.so.1 => /opt/mpf/plugins/OcvFaceDetection/lib/libuuid.so.1 (0x00007f5a6b254000)
    libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f5a6b217000)

We developed a utility that gets executed as part of the build process that pulls in the transitive dependencies for the C++ components.

From https://github.com/openmpf/openmpf-docker/blob/master/components/cpp_executor/README.md:

deps