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

Don't export symbols or synthetic object files in Scratchbox #1

Closed
wants to merge 1 commit into from

Conversation

direc85
Copy link
Collaborator

@direc85 direc85 commented Dec 30, 2023

It evidently looks like the linker in Scratchbox / Sailfish SDK does not work with - nor need - the exported symbols and synthetic object files. Taking inspiration of the plain if-return just above the patch lines, I added a detection of SB2_RUST_TARGET_TRIPLE environment variable, which then results in those files not being created, and thus not being added to the linker file list.

With this patch Rust 1.75.0 compiles in Platform SDK shell (the hanging problem in the build target still exists - statx syscall is the main culprit) and installing the resulting packages into Sailfish SDK successfully lets me build Whisperfish 1.72 branch for i486, armv7hl and aarch64. The functionality of the armv7hl build was tested on-device with Jolla Phone, and it seems to work just fine (as a test I sent a message and checked the output on terminal).

This patch is kind of a hack, but then again, so are many of the other patches. Further improvements are most welcome!

@rubdos
Copy link
Owner

rubdos commented Dec 30, 2023

N.b., this would unfix this issue: rust-lang/rust#47384

@direc85
Copy link
Collaborator Author

direc85 commented Dec 31, 2023

As it turned out, the bug is fixable in environment (Whisperfish .spec in my use case) instead:

export TMPDIR=$(realpath "%{_sourcedir}/.tmp")
mkdir -p $TMPDIR

So, it's a bug somewhere in Scratchbox instead -- closing this PR as redundant (and potentially harmful).

@direc85 direc85 closed this Dec 31, 2023
@rubdos rubdos mentioned this pull request Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants