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 install on Debian 12 #93

Open
hax0rbana-adam opened this issue Jan 19, 2025 · 7 comments
Open

Unable to install on Debian 12 #93

hax0rbana-adam opened this issue Jan 19, 2025 · 7 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@hax0rbana-adam
Copy link

Problem

When running ./install-linux.sh on Debian 12, the serial program failed to run due to a linking error.

./serial-ubuntu-latest/serial: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by ./serial-ubuntu-latest/serial)

Solution

Include a version of serial with the release package that will work with Debian 12 (and other distros with the same version of GLIBC).

Workaround

Compile serial from source and use the resulting executable.

# Start from the directory that you unpacked the release into
sudo apt install -y cargo
git clone https://github.com/EFForg/rayhunter
cd rayhunter/serial
cargo build
cd ../..
sed -i 's|./serial-ubuntu-latest/serial|./rayhunter/target/debug/serial|g' install-linux.sh
./install-linux.sh
@hax0rbana-adam
Copy link
Author

I'm not much of a Microsoft fan, but I think getting serial compiled for Debian might just be a matter of adding a few lines here and waiting for Microsoft to run the CI job.

The linux-install.sh script would still need to be updated, perhaps by looking at the output of lsb_release -a or similar to determine which version of serial should be used.

@cooperq
Copy link
Collaborator

cooperq commented Jan 30, 2025

I think that we don't want to support the many varied versions of libc. I think the better solution here is to improve the documentation on how to build from scratch for people on systems we don't support.

@cooperq
Copy link
Collaborator

cooperq commented Jan 30, 2025

this is a sub issue of #29

@cooperq cooperq self-assigned this Jan 30, 2025
@cooperq cooperq added the documentation Improvements or additions to documentation label Jan 30, 2025
@hax0rbana-adam
Copy link
Author

hax0rbana-adam commented Jan 30, 2025

This issue of releases not supporting Debian seems like it is orthogonal to improving the documentation. Asking people to set up an entire rust development environment is a lot to ask, let alone to ask it of journalists and activists. Maybe we can find some way we can make this easier for people to use, particularly those who are not developers.

Would you be willing to add RUSTFLAGS="-C target-feature=+crt-static" to the compilation so serial will run everywhere with a single executable?

If not, would you be willing to add --target x86_64-unknown-linux-musl to the cargo build command to create a statically linked release? This option would require one additional command before compilation (rustup target add x86_64-unknown-linux-musl) but musl is more stable than glibc when it comes to static linking.

If not, would you accept a pull request that compiles a version of serial that functions on Debian (in addition to the exiting executable in the release)?

If neither of those are acceptable, would you be willing to switch to binaries that work on Debian, which is reportedly more popular the Ubuntu?

@cooperq
Copy link
Collaborator

cooperq commented Jan 30, 2025

I think adding the static compilation flag to serial or switching to MUSL would be the ideal solution here as it would make Serial more portablle and robust in line with my goals for #88 . It would also increase the number of systems we support installing on. So yes, that would be my ideal solution.

@hax0rbana-adam
Copy link
Author

Static compilation using glibc results in an executable that can't run (tested on Debian 12 and 13). I didn't do a deep dive into why since the musl route is probably going to be better.

Static compilation using musl is something I'm still working on and am trying to collaborate with developers of rusb and udev-rs. Hopefully someone who is familiar with rust can help out on this one (I'm just a hacker, I don't actually know Rust)

@cooperq
Copy link
Collaborator

cooperq commented Jan 30, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants