Open rafal1137 opened 2 years ago
Please try to launch it in verbose mode or with a debug option, and add more details on the action you are trying to run. There is not much to see in that log right now.
@uraimo Here is a part of the code responsible for building packages, release files and it fails here. Before this one compilation takes place which is compiling and have no issues with it. But cpack is another story here.
- name: Generate packages
shell: bash
working-directory: build/
run: cpack
I did runned cpack with both options --verbose
and --debug
Run cpack --verbose
CPack: Enable Verbose
CPack Verbose: Read CPack config file:
CPack Verbose: Read CPack configuration file: /home/runner/work/name/name/build/CPackConfig.cmake
CPack Verbose: Specified generator: TGZ
CPack Verbose: Use generator: cmCPackArchiveGenerator
CPack Verbose: For project: name
CPack: Create package using TGZ
CPack Verbose: [TGZ] requested component grouping = ONE_PER_GROUP
CPack: Install projects
CPack Error: Problem creating temporary directory: /home/runner/work/name/name/build/_CPack_Packages/Linux/TGZ/name-arm/
CPack Error: Error when generating package: name
Error: Process completed with exit code 1.
Run cpack --debug
CPack: /builds/cmake ci/Source/CPack/cpack.cxx:202 Enable Debug
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1022 cmCPackArchiveGenerator::SetOption(CPACK_GENERATOR, TGZ)
CPack Error: /builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:201 Problem creating temporary directory: /home/runner/work/name/name/build/_CPack_Packages/Linux/TGZ/name-arm/
CPack Error: /builds/cmake ci/Source/CPack/cpack.cxx:436 Error when generating package: name
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1022 cmCPackArchiveGenerator::SetOption(CPACK_PACKAGING_INSTALL_PREFIX, /)
CPack: /builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1038 Create package using TGZ
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:60 Create temp directory.
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1022 cmCPackArchiveGenerator::SetOption(CPACK_OUTPUT_FILE_PREFIX, /home/runner/work/name/name/build)
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1022 cmCPackArchiveGenerator::SetOption(CPACK_TOPLEVEL_DIRECTORY, /home/runner/work/name/name/build/_CPack_Packages/Linux/TGZ)
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1022 cmCPackArchiveGenerator::SetOption(CPACK_TEMPORARY_DIRECTORY, /home/runner/work/name/name/build/_CPack_Packages/Linux/TGZ/name-arm)
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1022 cmCPackArchiveGenerator::SetOption(CPACK_OUTPUT_FILE_NAME, name-arm.tar.gz)
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1022 cmCPackArchiveGenerator::SetOption(CPACK_OUTPUT_FILE_PATH, /home/runner/work/name/name/build/name-arm.tar.gz)
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1022 cmCPackArchiveGenerator::SetOption(CPACK_TEMPORARY_PACKAGE_FILE_NAME, /home/runner/work/name/name/build/_CPack_Packages/Linux/TGZ/name-arm.tar.gz)
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1022 cmCPackArchiveGenerator::SetOption(CPACK_INSTALL_DIRECTORY, /usr/local/)
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1022 cmCPackArchiveGenerator::SetOption(CPACK_NATIVE_INSTALL_DIRECTORY, /usr/local/)
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1022 cmCPackArchiveGenerator::SetOption(CPACK_TEMPORARY_INSTALL_DIRECTORY, /home/runner/work/name/name/build/_CPack_Packages/Linux/TGZ/name-arm)
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:125 Look for: CPACK_PACKAGE_DESCRIPTION_FILE
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1267 Warning, GetOption return NULL for: CPACK_PACKAGE_CHECKSUM
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1022 cmCPackArchiveGenerator::SetOption(CPACK_REMOVE_TOPLEVEL_DIRECTORY, 1)
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1267 Warning, GetOption return NULL for: CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1267 Warning, GetOption return NULL for: CPACK_COMPONENTS_IGNORE_GROUPS
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1267 Warning, GetOption return NULL for: CPACK_COMPONENTS_ONE_PACKAGE_PER_GROUP
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1267 Warning, GetOption return NULL for: CPACK_COMPONENTS_GROUPING
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1066 About to install project
CPack: /builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:183 Install projects
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1320 GetPackagingInstallPrefix: '/'
Error: Process completed with exit code 1.
Only thing so far that brought my attention is this:
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1267 Warning, GetOption return NULL for: CPACK_PACKAGE_CHECKSUM
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1022 cmCPackArchiveGenerator::SetOption(CPACK_REMOVE_TOPLEVEL_DIRECTORY, 1)
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1267 Warning, GetOption return NULL for: CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1267 Warning, GetOption return NULL for: CPACK_COMPONENTS_IGNORE_GROUPS
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1267 Warning, GetOption return NULL for: CPACK_COMPONENTS_ONE_PACKAGE_PER_GROUP
/builds/cmake ci/Source/CPack/cmCPackGenerator.cxx:1267 Warning, GetOption return NULL for: CPACK_COMPONENTS_GROUPING
Run cpack CPack: Create package using TGZ CPack: Install projects CPack Error: Problem creating temporary directory: /home/runner/work/name/name/build/_CPack_Packages/Linux/TGZ/name-arm/ CPack Error: Error when generating package: name Error: Process completed with exit code 1.
@uraimo I have used NSIS + CPack + Qt + CMake + VS2019 in my own project and encountered the same problem as you, did you solve it later?
I did small search in Cmake Source Code and found where it fails:
if (!cmsys::SystemTools::MakeDirectory(bareTempInstallDirectory)) {
cmCPackLogger(cmCPackLog::LOG_ERROR,
"Problem creating temporary directory: "
<< (tempInstallDirectory ? tempInstallDirectory : "(NULL)")
<< std::endl);
return 0;
}
Will have to dig deeper inside MakeDirectory
to find where it is failing at.
After fiddling with github action script. I decided to run cpack with sudo command and as expected new issue came out of it.
Looks like it does not have issue with creating temp install directory
I did tried cat PreinstallOutput.log
file but it does not le me after this issue occur.
@rafal1137 Thanks for your answer, it was a lot of fun 😄, maybe I can build it successfully locally first before trying GH Action.
PS:I will keep trying it when I get my PC (Win10) back in my hands a little later
Hi there. I am using your action in 1 of project that I participate.
I am having issue with executing cpack
PS: We have several jobs with no issues just it fails with that one.