前提・実現したいこと
DockerでSPIRITをビルドしようとしています.
発生している問題・エラーメッセージ
Dockerhubでビルドしようとするとエラーになりますが,GitHub Actionでビルドすると上手くいきます.Dockerhubでの該当箇所のログは以下です.
bash
1[ 75%] Built target VFRendering 2Scanning dependencies of target Spirit_UI_CPP_autogen 3[ 76%] Automatic MOC for target Spirit_UI_CPP 4[ 76%] Built target Spirit_UI_CPP_autogen 5[ 77%] Automatic RCC for resources.qrc 6[91m 7AutoRcc subprocess error 8------------------------ 9The rcc process failed to compile 10"/home/docker/.local/spirit/ui-cpp/resources.qrc" 11into 12"/home/docker/.local/spirit/build/ui-cpp/Spirit_UI_CPP_autogen/EWIEGA46WW/qrc_resources.cpp" 13Command 14------- 15/usr/lib/qt5/bin/rcc -name resources -o /home/docker/.local/spirit/build/ui-cpp/Spirit_UI_CPP_autogen/EWIEGA46WW/qrc_resources.cpp /home/docker/.local/spirit/ui-cpp/resources.qrc 16Output 17------ 18RCC: Error in '/home/docker/.local/spirit/ui-cpp/resources.qrc': Cannot find file 'res/AppIcon32.png' 19[0m 20[91mmake[2]: *** [ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/build.make:118: ui-cpp/Spirit_UI_CPP_autogen/EWIEGA46WW/qrc_resources.cpp] Error 1 21[0m 22[91mmake[1]: *** [CMakeFiles/Makefile2:1032: ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/all] Error 2 23[0m 24[91mmake: *** [Makefile:163: all] Error 2 25[0m 26Removing intermediate container 26300b5cda3d 27The command '/bin/sh -c cd .local && git clone https://github.com/spirit-code/spirit.git && cd spirit && mkdir build && cd build && cmake SPIRIT_UI_CXX_USE_QT .. && make && echo "alias spirit='exec ${HOME}/.local/spirit/spirit'" >> ~/.bashrc' returned a non-zero code: 2
GitHub Actionのログは以下です.
bash
1[ 74%] Building C object VFRendering/CMakeFiles/VFRendering.dir/thirdparty/glad/src/glad.c.o 2[ 75%] Linking CXX static library libVFRendering.a 3[ 75%] Built target VFRendering 4Scanning dependencies of target Spirit_UI_CPP_autogen 5[ 76%] Automatic MOC for target Spirit_UI_CPP 6[ 76%] Built target Spirit_UI_CPP_autogen 7[ 77%] Automatic RCC for resources.qrc 8[ 78%] Generating ui_MainWindow.h 9[ 78%] Generating ui_ControlWidget.h 10[ 79%] Generating ui_ConfigurationsWidget.h 11[ 80%] Generating ui_GeometryWidget.h 12[ 80%] Generating ui_PlotsWidget.h 13[ 81%] Generating ui_DebugWidget.h 14[ 82%] Generating ui_IsosurfaceWidget.h 15[ 83%] Generating ui_InfoWidget.h 16[ 83%] Generating ui_SettingsWidget.h 17[ 84%] Generating ui_ParametersWidget.h 18[ 85%] Generating ui_HamiltonianHeisenbergWidget.h 19[ 85%] Generating ui_HamiltonianGaussianWidget.h 20[ 86%] Generating ui_VisualisationSettingsWidget.h 21Scanning dependencies of target Spirit_UI_CPP 22[ 86%] Building CXX object ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/main.cpp.o 23[ 87%] Building CXX object ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/utility/Handle_Signal.cpp.o 24[ 88%] Building CXX object ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/src/SpinWidget.cpp.o 25[ 88%] Building CXX object ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/src/MainWindow.cpp.o 26[ 89%] Building CXX object ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/src/ControlWidget.cpp.o 27[ 90%] Building CXX object ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/src/HamiltonianHeisenbergWidget.cpp.o 28[ 90%] Building CXX object ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/src/HamiltonianGaussianWidget.cpp.o 29[ 91%] Building CXX object ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/src/ConfigurationsWidget.cpp.o 30[ 92%] Building CXX object ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/src/GeometryWidget.cpp.o 31[ 93%] Building CXX object ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/src/MouseDecoratorWidget.cpp.o 32[ 93%] Building CXX object ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/src/SettingsWidget.cpp.o 33[ 94%] Building CXX object ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/src/ParametersWidget.cpp.o 34[ 95%] Building CXX object ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/src/VisualisationSettingsWidget.cpp.o 35[ 95%] Building CXX object ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/src/PlotsWidget.cpp.o 36[ 96%] Building CXX object ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/src/DebugWidget.cpp.o 37[ 97%] Building CXX object ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/src/PlotWidget.cpp.o 38[ 97%] Building CXX object ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/src/IsosurfaceWidget.cpp.o 39[ 98%] Building CXX object ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/src/InfoWidget.cpp.o 40[ 99%] Building CXX object ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/Spirit_UI_CPP_autogen/mocs_compilation.cpp.o 41[ 99%] Building CXX object ui-cpp/CMakeFiles/Spirit_UI_CPP.dir/Spirit_UI_CPP_autogen/EWIEGA46WW/qrc_resources.cpp.o 42[100%] Linking CXX executable ../../spirit 43[100%] Built target Spirit_UI_CPP 44Removing intermediate container 88e12f4fa985 45 ---> 4dfc284e5af7 46Step 20/20 : CMD ase test 47 ---> Running in 3d21b84c2470 48Removing intermediate container 3d21b84c2470 49 ---> 378344002a1d 50Successfully built 378344002a1d 51Successfully tagged naokicpp/simu_mate:latest
該当のソースコード
エラーが出る部分は以下の部分です.
Docker
1RUN cd .local && \ 2 git clone https://github.com/spirit-code/spirit.git && \ 3 cd spirit && \ 4 mkdir build && \ 5 cd build && \ 6 cmake SPIRIT_UI_CXX_USE_QT .. && \ 7 make && \ 8 echo "alias spirit='exec ${HOME}/.local/spirit/spirit'" >> ~/.bashrc
試したこと
自分のPCでビルドしようとすると上手くいきます.Dockerhubでもう一度ビルドしても同じ結果になります.
補足情報(FW/ツールのバージョンなど)
debianベースのコンテナです.Dockerfileはここにあります.
あなたの回答
tips
プレビュー