Skip to content

Cpack: Sporadically getting hdiutil: create failed - Resource busy

According to https://github.com/actions/runner-images/issues/7522 this is a race condition with XProtect in MacOs ≥ 13 ⇒ CMake clearly isn't causing this. But we could make it work around the issue by waiting a second on failure in this step and retrying the command afterwards.

I don't own a mac computer, but encounter this issue on a Github Actions runner (see for example https://github.com/wxMaxima-developers/wxmaxima/actions/runs/7862494985/job/21452044449#step:9:24) issuing the command

             cpack -G DragNDrop

the only strange thing in my CMakeLists.txt I am aware of doing is the typical link magic that makes the binary work on every Mac:

elseif(APPLE)
    set(MACOSX_BUNDLE_NAME wxmaxima)
    set(MACOSX_BUNDLE_ICON_FILE wxmac.icns)
    set(MACOSX_BUNDLE TRUE)
    list(APPEND SOURCE_FILES ${RESOURCE_FILES})
    add_executable(wxmaxima ${SOURCE_FILES})
    set_target_properties(wxmaxima PROPERTIES
        MACOSX_BUNDLE TRUE
	MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist
        RESOURCE "${RESOURCE_FILES}"
    )

    install(
        # The bundle utilities need to be run in a
        # separate step, meaning from within a string.
        # they provide the fixup command that makes the
        # .dylibs run from within the app bundle.
        CODE "include(BundleUtilities)
        # the separate step doesn't know about
        # the values our variables had in the
        # cmakefile so we need to set them again.
        set(BU_CHMOD_BUNDLE_ITEMS TRUE)
        fixup_bundle(\"${CMAKE_BINARY_DIR}/src/wxmaxima.app\"   \"\"   \"\")"
        COMPONENT Runtime)
else()
    add_executable(wxmaxima ${SOURCE_FILES})
endif()
Edited by Gunter Königsman
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information