[2.1.17][Arch Linux] Steam wrapper incompatible with FMTK

This subforum contains all the issues which we already resolved.
Derim422
Burner Inserter
Burner Inserter
Posts: 15
Joined: Wed Jul 07, 2021 11:16 am
Contact:

[2.1.17][Arch Linux] Steam wrapper incompatible with FMTK

Post by Derim422 »

The wrapper used to launch the x86_64 version of factorio calls a utility (arch) that is not natively on Arch Linux since 2023. When running using Steam, the script works fine, probably because the utility is part of the steam linux binaries, but this means that using the FMTK and other debugging tools does not work on Arch (or other systems without `arch`) unless the file is manually edited or wrapped itself.

It would be nice if the wrapper called `uname -m`, unless the steam emulation layers now require such a hook and their own binaries. I do not see that given the other binaries available in the runtime, though.

arch:

Code: Select all

SteamLibrary]$ find -name arch
./steamapps/common/SteamLinuxRuntime_soldier/var/tmp-Z11LU3/usr/bin/arch
./steamapps/common/SteamLinuxRuntime_soldier/soldier_platform_2.0.20260805.254767/files/bin/arch
uname:

Code: Select all

SteamLibrary]$ ./steamapps/common/SteamLinuxRuntime_soldier/var/tmp-Z11LU3/usr/bin/uname -m
x86_64
factorio.sh:

Code: Select all

#!/bin/bash

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
ARCH=$(arch)

if [[ "$ARCH" == "x86_64" ]]; then
    exec "$SCRIPT_DIR/../x64_/factorio" "$@"
elif [[ "$ARCH" == "aarch64" ]] || [[ "$ARCH" == "arm64" ]]; then
    if [[ -e "$SCRIPT_DIR/../arm64/factorio" ]]; then
        exec "$SCRIPT_DIR/../arm64/factorio" "$@"
    else
        echo "factorio.sh: arm64 binary missing, launching x64 binary instead"
        exec "$SCRIPT_DIR/../x64_/factorio" "$@"
    fi
else
    echo "factorio.sh: Unsupported architecture $ARCH"
    exit 1
fi
justarandomgeek
Filter Inserter
Filter Inserter
Posts: 334
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

Re: [2.1.17][Arch Linux] Steam wrapper incompatible with FMTK

Post by justarandomgeek »

i think some folks have found it works if you point fmtk at the real binary instead of the arch dispatch script, while we work on a cleaner solution
User avatar
Sanqui
Factorio Staff
Factorio Staff
Posts: 422
Joined: Mon May 07, 2018 7:22 pm
Contact:

Re: [2.1.17][Arch Linux] Steam wrapper incompatible with FMTK

Post by Sanqui »

Thank you for the report, I have patched the script to use uname -m and this change should be live.
devops • CI/CD • servers • websites

ovo
Post Reply

Return to “Resolved Problems and Bugs”