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

Unable to start on NixOS #71

Closed
julius-boettger opened this issue Apr 13, 2024 · 4 comments
Closed

Unable to start on NixOS #71

julius-boettger opened this issue Apr 13, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@julius-boettger
Copy link

When trying to start SourceGit on NixOS (Linux), I get

> ./SourceGit
bash: ./SourceGit: cannot execute: required file not found

Even though the SourceGit binary is in the current directory.

> ls
libHarfBuzzSharp.so  libonigwrap.so  libSkiaSharp.so  SourceGit

Things I have tried

I tried out different versions of SourceGit, from the first one that supported Linux (8.3) to 8.7, they all behave the same. I also tried out if being on Xorg or Wayland changes anything, it doesn't.

Interestingly enough, a different shell (such as fish instead of bash) gives me a different error message:

fish: Job 1, './SourceGit' terminated by signal SIGSEGV (Address boundary error)

Steps to reproduce

  1. Be on NixOS (23.11?)
  2. Download a release tarball of SourceGit for Linux
  3. Extract
  4. Try to run ./SourceGit in the same directory as the bundled .so files
@julius-boettger
Copy link
Author

I have an idea what could cause this.

NixOS's directory structure works somewhat different to your average Linux distro. E.g. /bin/bash does not exist, instead bash is located in /nix/store/8cx8cg8h9vh65k4vgf6xh6shzbbgsa01-system-path/bin/bash (at least right now, the path is generated automatically and can change). The proper way to access bash in this scenario is through /usr/bin/env bash.

Are there any hard-coded paths to binaries or directories on Linux in the codebase that could cause issues like this?

@love-linger love-linger self-assigned this Apr 13, 2024
@love-linger love-linger added bug Something isn't working wontfix labels Apr 13, 2024
@love-linger
Copy link
Collaborator

In fact, this software does not use /bin/bash directly. Maybe you can find some help from AvaloniaUI/Avalonia#3020

@julius-boettger
Copy link
Author

Maybe you can find some help from AvaloniaUI/Avalonia#3020

That looks promising, I will try it out. Thanks!

@julius-boettger
Copy link
Author

I was able to get it up and running using this PR (which even mentioned this issue already). It was an issue with my lacking NixOS knowledge, not with SourceGit itself. But thank you for the fast answer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants