HakanKoseoglu / hamdocker

GNU General Public License v3.0
2 stars 1 forks source link

Container doesn't run, missing libraries #2

Closed billschell closed 2 years ago

billschell commented 2 years ago

After pulling the container from dockerhub and attempting to run it, the following results:

$ docker run -it --device /dev/snd:/dev/snd -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix:0 hakankoseoglu/wsjtx ./wsjtx: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory $

I attempted to build the container using the provided Dockerfile, with a similar result (see the end of the output below). Looks like the build for the wsjt-x app is failing:

make[1]: Leaving directory '/wsjtx-src/hamlib-prefix/build' Cloning into 'src'... -- The C compiler identification is GNU 11.2.0 -- The CXX compiler identification is GNU 11.2.0 -- The Fortran compiler identification is GNU 11.2.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting Fortran compiler ABI info -- Detecting Fortran compiler ABI info - done -- Check for working Fortran compiler: /usr/bin/gfortran - skipped -- Checking whether /usr/bin/gfortran supports Fortran 90 -- Checking whether /usr/bin/gfortran supports Fortran 90 - yes -- ** -- Building for for: Linux-x86_64 -- ** -- Building wsjtx v2.5.2.0 -- Looking for 4 include files stdlib.h, ..., float.h -- Looking for 4 include files stdlib.h, ..., float.h - found -- Looking for include file stdio.h -- Looking for include file stdio.h - found -- Looking for include file stdlib.h -- Looking for include file stdlib.h - found -- Looking for include file unistd.h -- Looking for include file unistd.h - found -- Looking for include file sys/ioctl.h -- Looking for include file sys/ioctl.h - found -- Looking for include file sys/types.h -- Looking for include file sys/types.h - found -- Looking for include file fcntl.h -- Looking for include file fcntl.h - found -- Looking for include file sys/stat.h -- Looking for include file sys/stat.h - found -- Looking for include files linux/ppdev.h, linux/parport.h -- Looking for include files linux/ppdev.h, linux/parport.h - found -- Looking for include files dev/ppbus/ppi.h, dev/ppbus/ppbconf.h -- Looking for include files dev/ppbus/ppi.h, dev/ppbus/ppbconf.h - not found -- Performing Test HAVE_MATH -- Performing Test HAVE_MATH - Failed -- Performing Test HAVE_LIBM_MATH -- Performing Test HAVE_LIBM_MATH - Success -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.62") found components: log_setup log -- Found OpenMP_C: -fopenmp (found version "4.5") -- Found OpenMP_CXX: -fopenmp (found version "4.5") -- Found OpenMP_Fortran: -fopenmp (found version "4.5") -- Found OpenMP: TRUE (found version "4.5")
-- Found FFTW3: /usr/lib/x86_64-linux-gnu/libfftw3f_threads.so
-- Found Usb -- Found Hamlib 4.4~git -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of CACHE_ALL -- Check size of CACHE_ALL - failed -- Looking for rig_set_cache_timeout_ms -- Looking for rig_set_cache_timeout_ms - not found -- Detecting Fortran/C Interface -- Detecting Fortran/C Interface - Found GLOBAL and MODULE mangling -- Verifying Fortran/CXX Compiler Compatibility -- Verifying Fortran/CXX Compiler Compatibility - Success -- Asking qmake for QT_PLUGINS_DIR and got /usr/lib/x86_64-linux-gnu/qt5/plugins -- Asking qmake for QT_TRANSLATIONS_DIR and got /usr/share/qt5/translations -- Asking qmake for QT_IMPORTS_DIR and got /usr/lib/x86_64-linux-gnu/qt5/imports -- Asking qmake for QT_DATA_DIR and got /usr/lib/x86_64-linux-gnu/qt5 -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success -- Performing Test COMPILER_HAS_DEPRECATED_ATTR -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Failed -- Performing Test COMPILER_HAS_DEPRECATED -- Performing Test COMPILER_HAS_DEPRECATED - Failed -- Configuring done -- Generating done -- Build files have been written to: /wsjtx-src/build [ 0%] Automatic MOC for target qcp [ 0%] Built target qcp_autogen [ 0%] Building CXX object CMakeFiles/qcp.dir/qcp_autogen/mocs_compilation.cpp.o [ 0%] Building CXX object CMakeFiles/qcp.dir/qcustomplot-source/qcustomplot.cpp.o [ 0%] Linking CXX static library libqcp.a [ 0%] Built target qcp [ 0%] Getting source control system revision information -- Checking for revision information -- Checking for gitrevision information -- Source tree based on revision refs/heads/master 68dc11 appears to have local changes On branch master Your branch is up to date with 'origin/master'.

Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: widgets/mainwindow.cpp

no changes added to commit (use "git add" and/or "git commit -a") -- refspec: refs/heads/master - SHA1: 68dc11 [ 0%] Built target revisiontag [ 0%] Automatic MOC for target wsjt_qt [ 0%] Built target wsjt_qt_autogen [ 0%] Generating ui_wf_palette_design_dialog.h /usr/lib/qt5/bin/uic: error while loading shared libraries: libQt5Core.so.5: cannot open shared object file: No such file or directory gmake[2]: ** [CMakeFiles/wsjt_qt.dir/build.make:74: ui_wf_palette_design_dialog.h] Error 127 gmake[1]: [CMakeFiles/Makefile2:582: CMakeFiles/wsjt_qt.dir/all] Error 2 gmake: * [Makefile:156: all] Error 2

real 0m41.433s user 0m43.883s sys 0m5.968s

HakanKoseoglu commented 2 years ago

Cannot replicate. Which commit are you on and have you allowed docker via xhost?

hakan@blackbird:~$ docker run -it --device /dev/snd:/dev/snd -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix:0 hakankoseoglu/wsjtx Unable to find image 'hakankoseoglu/wsjtx:latest' locally latest: Pulling from hakankoseoglu/wsjtx Digest: sha256:73eea6d5c638315397ab27135834aab6bb6bbd722626ae6afe429cc7fc941d53 Status: Downloaded newer image for hakankoseoglu/wsjtx:latest No protocol specified qt.qpa.xcb: could not connect to display unix:0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

/wsjtx/wsjtx.sh: line 4: 7 Aborted (core dumped) ./wsjtx

So this is normal because X11 inside the docker can't access the display.

hakan@blackbird:~$ xhost +"local:docker@" non-network local connections being added to access control list hakan@blackbird:~$ docker run -it --device /dev/snd:/dev/snd -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix:0 hakankoseoglu/wsjtx QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root' libGL error: MESA-LOADER: failed to retrieve device information

Then the app initializes w/o a problem.

HakanKoseoglu commented 2 years ago

Just ran: docker build wsjtx -t hakankoseoglu/wsjtx:arch --no-cache with the Docker file and shell script as checked in:

-- Found Hamlib 4.4~git -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of CACHE_ALL -- Check size of CACHE_ALL - failed -- Looking for rig_set_cache_timeout_ms -- Looking for rig_set_cache_timeout_ms - not found -- Detecting Fortran/C Interface -- Detecting Fortran/C Interface - Found GLOBAL and MODULE mangling -- Verifying Fortran/CXX Compiler Compatibility -- Verifying Fortran/CXX Compiler Compatibility - Success -- Asking qmake for QT_PLUGINS_DIR and got /usr/lib/x86_64-linux-gnu/qt5/plugins -- Asking qmake for QT_TRANSLATIONS_DIR and got /usr/share/qt5/translations -- Asking qmake for QT_IMPORTS_DIR and got /usr/lib/x86_64-linux-gnu/qt5/imports -- Asking qmake for QT_DATA_DIR and got /usr/lib/x86_64-linux-gnu/qt5 -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success -- Performing Test COMPILER_HAS_DEPRECATED_ATTR -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Failed -- Performing Test COMPILER_HAS_DEPRECATED -- Performing Test COMPILER_HAS_DEPRECATED - Failed -- Configuring done -- Generating done -- Build files have been written to: /wsjtx-src/build [ 0%] Building C object CMakeFiles/wsjt_cxx.dir/lib/ftrsd/decode_rs.c.o [ 0%] Building C object CMakeFiles/wsjt_cxx.dir/lib/ftrsd/encode_rs.c.o [ 0%] Building C object CMakeFiles/wsjt_cxx.dir/lib/ftrsd/init_rs.c.o [ 0%] Building C object CMakeFiles/wsjt_cxx.dir/lib/ftrsd/ftrsdap.c.o [ 0%] Building C object CMakeFiles/wsjt_cxx.dir/lib/sgran.c.o [ 0%] Building C object CMakeFiles/wsjt_cxx.dir/lib/golay24_table.c.o [ 1%] Building C object CMakeFiles/wsjt_cxx.dir/lib/gran.c.o [ 1%] Building C object CMakeFiles/wsjt_cxx.dir/lib/igray.c.o [ 1%] Building C object CMakeFiles/wsjt_cxx.dir/lib/init_random_seed.c.o

......

[ 76%] Linking Fortran executable wsprd [ 76%] Built target wsprd [ 76%] Automatic MOC for target qcp [ 76%] Built target qcp_autogen [ 76%] Building CXX object CMakeFiles/qcp.dir/qcp_autogen/mocs_compilation.cpp.o [ 76%] Building CXX object CMakeFiles/qcp.dir/qcustomplot-source/qcustomplot.cpp.o [ 76%] Linking CXX static library libqcp.a [ 76%] Built target qcp [ 76%] Automatic MOC for target wsjt_qt [ 76%] Built target wsjt_qt_autogen [ 76%] Generating ui_wf_palette_design_dialog.h [ 76%] Generating ui_CabrilloLogWindow.h [ 77%] Generating ui_FoxLogWindow.h [ 77%] Building CXX object CMakeFiles/wsjt_qt.dir/wsjt_qt_autogen/mocs_compilation.cpp.o [ 77%] Building CXX object CMakeFiles/wsjt_qt.dir/helper_functions.cpp.o [ 77%] Building CXX object CMakeFiles/wsjt_qt.dir/qt_helpers.cpp.o [ 77%] Building CXX object CMakeFiles/wsjt_qt.dir/widgets/MessageBox.cpp.o [ 77%] Building CXX object CMakeFiles/wsjt_qt.dir/MetaDataRegistry.cpp.o [ 77%] Building CXX object CMakeFiles/wsjt_qt.dir/Network/NetworkServerLookup.cpp.o

...... [100%] Built target test_qt_helpers_autogen Consolidate compiler generated dependencies of target test_qt_helpers [100%] Built target test_qt_helpers Install the project... -- Install configuration: "RELEASE" -- Installing: /wsjtx/bin/wsjtx -- Installing: /wsjtx/bin/udp_daemon -- Installing: /wsjtx/bin/message_aggregator -- Installing: /wsjtx/bin/wsjtx_app_version -- Installing: /wsjtx/bin/jt9 -- Installing: /wsjtx/bin/wsprd -- Installing: /wsjtx/bin/fmtave -- Installing: /wsjtx/bin/fcal -- Installing: /wsjtx/bin/fmeasure -- Installing: /wsjtx/bin/ft8code -- Installing: /wsjtx/bin/jt65code -- Installing: /wsjtx/bin/jt9code -- Installing: /wsjtx/bin/jt4code -- Installing: /wsjtx/bin/msk144code -- Installing: /wsjtx/bin/q65code -- Installing: /wsjtx/bin/fst4sim -- Installing: /wsjtx/bin/q65sim -- Installing: /wsjtx/bin/rigctl-wsjtx -- Installing: /wsjtx/bin/rigctld-wsjtx -- Installing: /wsjtx/bin/rigctlcom-wsjtx -- Installing: /wsjtx/share/doc/wsjtx/README -- Installing: /wsjtx/share/doc/wsjtx/COPYING -- Installing: /wsjtx/share/doc/wsjtx/AUTHORS -- Installing: /wsjtx/share/doc/wsjtx/THANKS -- Installing: /wsjtx/share/doc/wsjtx/NEWS -- Installing: /wsjtx/share/doc/wsjtx/BUGS -- Installing: /wsjtx/share/wsjtx/cty.dat -- Installing: /wsjtx/share/wsjtx/cty.dat_copyright.txt -- Installing: /wsjtx/share/wsjtx/JPLEPH -- Installing: /wsjtx/share/doc/wsjtx/example_log_configurations -- Installing: /wsjtx/share/doc/wsjtx/example_log_configurations/README -- Installing: /wsjtx/share/doc/wsjtx/example_log_configurations/wsjtx_log_config.ini.debugger -- Installing: /wsjtx/share/doc/wsjtx/example_log_configurations/wsjtx_log_config.ini.rig_control -- Installing: /wsjtx/share/doc/wsjtx/example_log_configurations/wsjtx_log_config.ini.console -- Installing: /wsjtx/share/doc/wsjtx/example_log_configurations/wsjtx_log_config.ini.simple_verbose -- Installing: /wsjtx/share/applications/wsjtx.desktop -- Installing: /wsjtx/share/applications/message_aggregator.desktop -- Installing: /wsjtx/share/pixmaps/wsjtx_icon.png -- Installing: /wsjtx/share/doc/wsjtx/changelog.gz -- Installing: /wsjtx/share/doc/wsjtx/copyright

real 0m2.301s user 0m1.525s sys 0m0.797s

and then the Docker build moves to the packaging stage.