Skip to content

Does linuxdeployqt for aarch64 work ? #491

@trevorsandy

Description

@trevorsandy

Context:

My aarch64 AppImage (Travis-CI/Ubuntu/Xenial) is successfully built but my build check test returns the following messages:

appImage_Check/LPub3D-2.4.3.21.2808_20210604-aarch64.AppImage: 1: appImage_Check/LPub3D-2.4.3.21.2808_20210604-aarch64.AppImage: hsqs: not found
appImage_Check/LPub3D-2.4.3.21.2808_20210604-aarch64.AppImage: 2: appImage_Check/LPub3D-2.4.3.21.2808_20210604-aarch64.AppImage: Syntax error: "|" unexpected

appImage_Check/LPub3D-2.4.3.21.2808_20210604-aarch64.AppImage: cannot execute binary file: Exec format error

Do I have to remove the magic bytes with sed -i 's|AI\x02|\x00\x00\x00|' <path to appimage>/LPub3D-2.4.3.21.2808_20210604-aarch64.AppImage ?

I'm building linuxdeployqt from source using the following commands:

echo && echo "Setup linuxdeployqt..."
if [ ! -e linuxdeployqt ]; then
    if [ "$TRAVIS_CPU_ARCH" = "amd64" ]; then
        echo "Insalling linuxdeployqt for amd64 arch..."
        wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" -O linuxdeployqt
    elif [ "$TRAVIS_CPU_ARCH" = "arm64" ]; then
        echo "Building linuxdeployqt for arm64 arch..."
        export PATH="${AppImageBuildPath}/bin":"$PATH"
        git clone https://github.com/probonopd/linuxdeployqt.git linuxdeployqt-build
        ( cd linuxdeployqt-build && qmake && make && cp -a ./bin/* ../ ) 
        if [ -f linuxdeployqt ]; then
          echo "linuxdeployqt copied to ${AppImageBuildPath}"
        else
          echo "ERROR - linuxdeployqt not found."
        fi
        echo "Building patchelf..."
        wget https://nixos.org/releases/patchelf/patchelf-0.9/patchelf-0.9.tar.bz2
        tar xf patchelf-0.9.tar.bz2
        ( cd patchelf-0.9/ && ./configure && make && sudo make install )
        echo "Installing appimagetool..."
        sudo wget -c -nv "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-aarch64.AppImage" -O /usr/local/bin/appimagetool
        sudo chmod a+x /usr/local/bin/appimagetool
        convertApp="$(which lconvert)"
        if [ -n "$convertApp" ]; then
            ( mkdir bin && cd bin && ln -sf $convertApp lconvert ) && \
            echo "bin/lconvert linked to $convertApp"
        fi
    fi
    chmod a+x linuxdeployqt
    echo "Setup linuxdeployqt completed" && echo
fi
renderers=$(find $AppImageBuildPath/opt -type f);
for r in $renderers; do executables="$executables -executable=$r"; done;
unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH;
export VERSION="$LP3D_VERSION"    # linuxdeployqt uses this for naming the file
./linuxdeployqt $AppImageBuildPath/usr/share/applications/*.desktop $executables -bundle-non-qt-libs -verbose=2 > CreateAppImage.log 2>&1;
./linuxdeployqt $AppImageBuildPath/usr/share/applications/*.desktop -appimage -verbose=2 >> CreateAppImage.log 2>&1;
echo && echo "AppImage Dynamic Library Dependencies:" && \
find $AppImageBuildPath -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq && echo;
AppImageFile=$(ls LPub3D*.AppImage)
if [ -f $AppImageFile ]; then
  echo "AppImage build completed successfully.";
  AppImageExtension=${AppImageFile##*-};
  mkdir -p $AppImageBuildPath/AppImage;
  mv -f ${AppImageFile} "${AppImageBuildPath}/AppImage/LPub3D-${LP3D_APP_VERSION_LONG}-${AppImageExtension}";
  echo "    Download package..: LPub3D-${LP3D_APP_VERSION_LONG}-${AppImageExtension}";
else
  echo "AppImage build failed. $AppImageFile not found.";
fi

You can see a full trace for the Travis-CI build job in this raw log. Search for Start build_checks.sh execution

And here are the built AppImages (x86_64 and aarch64) Continuous DevOps Build

Cheers,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions