Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error handler for ld-linux-x86-64.so.2 not found #17

Open
probonopd opened this issue Dec 11, 2021 · 2 comments
Open

Add error handler for ld-linux-x86-64.so.2 not found #17

probonopd opened this issue Dec 11, 2021 · 2 comments
Labels
help wanted Extra attention is needed qt Qt expertise needed

Comments

@probonopd
Copy link
Member

probonopd commented Dec 11, 2021

This happens when the user is trying to run a Linux application, linux64.ko is loaded but no /compat is mounted and we don't have a fully self-contained bundle:

Currently no error dialog is shown at all.

FreeBSD% launch '/home/user/Applications/Linuxulator/Spotify.AppDir' 
# Found "/home/user/Applications/Linuxulator/Spotify.AppDir"
ELF interpreter /lib64/ld-linux-x86-64.so.2 not found, error 2
Process is not running anymore and exit code was not 0
FreeBSD% launch '/home/user/Applications/Linuxulator/Discord.app' 
# Found "/home/user/Applications/Linuxulator/Discord.app"
ELF interpreter /lib64/ld-linux-x86-64.so.2 not found, error 2
Process is not running anymore and exit code was not 0

Maybe we should point the user toward a download link for the Linux userland/runtime.

@probonopd
Copy link
Member Author

probonopd commented Dec 11, 2021

Similarly, when linux64.ko is not loaded:

FreeBSD% launch '/home/user/Applications/Linuxulator/Discord.app' 
# Found "/home/user/Applications/Linuxulator/Discord.app"
ELF binary type "0" not known.
Process is not running anymore and exit code was not 0
"exec: /usr/home/user/Applications/Linuxulator/Discord.app/Discord.bin: Exec format error\n"

Currently this is shown:

exec: /usr/home/user/Applications/Linuxulator/Discord.app/Discord.bin: Exec format error

We should make it more concrete.

@probonopd probonopd reopened this Dec 11, 2021
@probonopd
Copy link
Member Author

Complication is that whenever we see "Could not launch...", then the payload application could not even be started, and I don't know how to get at the console output in this case, becasue apparently the console output is not produced by the playload application but by some other system component.

This does not work:

    if (p.state() == 0 and p.exitCode() != 0) {
        qDebug("Process is not running anymore and exit code was not 0");
        const QString error = p.readAllStandardError();
        if (!error.isEmpty()) {
            qDebug() << error;
            handleError(&p, error);
        } else {
            // If the exit code was not 0 but stderr is empty, we use stdout...
            const QString stdout = p.readAllStandardOutput();
            handleError(&p, stdout);
        }
        return(p.exitCode());
    }

@probonopd probonopd added help wanted Extra attention is needed qt Qt expertise needed labels Dec 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed qt Qt expertise needed
Projects
None yet
Development

No branches or pull requests

1 participant