[4.0.1.48] Can't install aarch64 build target

I updated my Sailfish Application SDK to include the brand-new 4.0.1.48 build, no issues there. Then I noticed that it had dropped my aarch64 build target, so I restarted the maintenance tool, selected it, started the installation, and it errored out:

Preparing the installation...

Downloading packages...
Downloading archive "2021.02.11-1Sailfish_OS-4.0.1.48-Sailfish_SDK_Target-aarch64.tar.7z.sha1" 
for component SailfishOS-latest-aarch64 (4.0.1.48).
Downloading archive "2021.02.11-1Sailfish_OS-4.0.1.48-Sailfish_SDK_Target-aarch64.tar.7z" for 
component SailfishOS-latest-aarch64 (4.0.1.48).

Installing component SailfishOS-latest-aarch64 (4.0.1.48)
Extracting "2021.02.11-1Sailfish_OS-4.0.1.48-Sailfish_SDK_Target-aarch64.tar.7z"
The command needs to be used under Sailfish SDK workspace, which is currently configured as 
"/home/direc85/SFOS"

I started the maintenance tool from the .desktop file as usual, and it has worked quite reliably for me.

I did a fresh install, and it didn’t change the error.

If I run the command from SailfishOS folder like ./SDKMaintenanceTool, I get the above error with aarch64 build engine. If I go to my workspace dir and run ../SailfishOS/SDKMaintenanceTool I get a plethora of other errors instead… So it suggests that the aarch64 installation script is at fault here.

Unfortunately you found a bug. You can use the following workaround until it is fixed:

  mv ~/SailfishOS/bin/sfdk{,.orig}

  cat <<'END' >~/SailfishOS/bin/sfdk
  #!/bin/bash

  if [[ $(ps -p $PPID -o cmd h) != *SDKMaintenanceTool* ]]; then
      exec "$0".orig "$@" || exit
  fi

  installdir=$(dirname "$0")/..
  globalconfig=$installdir/share/qtcreator/SailfishSDK
  workspace=$(sed -n 's,^.*"SharedSrc">\(.*\)</value>,\1,p' "$globalconfig/libsfdk/buildengines.xml")
  real=$(readlink -f "$0".orig)

  cd "${workspace:?}" || exit
  exec "$real" "$@"
  END

  chmod +x ~/SailfishOS/bin/sfdk
1 Like

Moved this to a more appropriate place: bug reports (with the “sdk” tag). The bug has been filed in our internal tracker; we’ll fix this before the “to all users” release.

Thank you!

The workaround didn’t work for me when I tried to install the non-EA aarch64 4.1.0.48… The error was that sfdk.orig wasn’t executable, and when I fixed it, it said that sfdk.orig.orig wasn’t find l found…

Well, I don’t need it, so I can just as well wait for the proper fix.

Interesting, for me it works well. Though I spot an issue that it does not work when workspace directory is changed later from Qt Creator, in which case the global configuration is not updated, so one would need to use globalconfig=$HOME/.config/SailfishSDK instead. But that doesn’t sound like your case.