Skip to content

insync: fix build - #578975

Open
lonerOrz wants to merge 1 commit into
NixOS:masterfrom
lonerOrz:fix/insync
Open

lonerOrz wants to merge 1 commit into
NixOS:masterfrom
lonerOrz:fix/insync

Conversation

@lonerOrz

Copy link
Copy Markdown
Member

auto-patchelf mistakes upstream *.debug objects for dynamic executables and runs patchelf on them, which aborts with "data offset extends past file end". Drop them in installPhase before the hook runs; they are not needed at runtime.

fixed #576779

Things done

@nixpkgs-ci
nixpkgs-ci Bot requested a review from hellwolf October 25, 2026 21:02
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Oct 25, 2026
@hellwolf

Copy link
Copy Markdown
Contributor

I have tried this fix, but somehow the binary itself didn't run for me. Have you tried? It might be my side of mistake too, I could try again.

@lonerOrz

Copy link
Copy Markdown
Member Author

I have tried this fix, but somehow the binary itself didn't run for me. Have you tried? It might be my side of mistake too, I could try again.

Could you try the new changes and see if it works now?

@lonerOrz

Copy link
Copy Markdown
Member Author

✅ nixpkgs-review result

Generated using nixpkgs-review-gha (6a91201)

Command: nixpkgs-review pr 578975
Commit: 8a506f65cc2bf9b150c42db7c99dddb9c947afd7 (subsequent changes)
Merge: 6301dc5944932580667f3002d8b39f910bc5062f

Logs: https://github.com/lonerOrz/nixpkgs-review-gha/actions/runs/40321964364/attempts/1


x86_64-linux

✅ 1 package built:
  • insync

aarch64-linux

✅ No rebuilds

@MaxWipfli

Copy link
Copy Markdown
Contributor

Thanks for the patch, I fully agree with removing *.debug files.

I am not really the biggest fan of the second part, however.

First, it is quite unclear in the code why this is needed. It would be great to add a comment to #576779 (or NixOS/patchelf#672, #577387, or all of them), to make it a bit more transparent, and allow anyone touching this in the future to understand when it can be removed again.

Second, if you look at the tracking issue, other packages have taken the approach of simply "reverting" patchelf instead, going back to v0.15.2 until the fixed version is merged into Nixpkgs. I suggest also taking that approach, since it feels a lot cleaner than shuffling around files just so autoPatchelfHook cannot find them. This would also avoid having to add zlib to the FHS environment.

What do you think?

@lonerOrz

Copy link
Copy Markdown
Member Author

Second, if you look at the tracking issue, other packages have taken the approach of simply "reverting" patchelf instead, going back to v0.15.2 until the fixed version is merged into Nixpkgs. I suggest also taking that approach, since it feels a lot cleaner than shuffling around files just so autoPatchelfHook cannot find them. This would also avoid having to add zlib to the FHS environment.

all done

@MaxWipfli

Copy link
Copy Markdown
Contributor

Great, thanks! The folks at #577387 pointed out that it would be great if you could split your changes into two commits. This would make it easy to revert the one with the patchelf override once that is no longer required.

I've tested this locally and it builds and starts just fine for me.

@MaxWipfli

Copy link
Copy Markdown
Contributor

Thank you, LGTM from my side. After merging, the commit hash of the to-be-reverted commit should be sent to the folks at #577387 so it can be reverted as soon as possible.

@hellwolf hellwolf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we just wait for the patchelf to be patched in the main branch?

@MaxWipfli

Copy link
Copy Markdown
Contributor

Shouldn't we just wait for the patchelf to be patched in the main branch?

When this PR was made, patchelf v0.19.3 didn't even exist yet. We can consider waiting, but that would waiting for that version to (1) be merged into staging and then (2) waiting until staging is merged into main. This would take quite some time, right?

@MaxWipfli

Copy link
Copy Markdown
Contributor

Okay, so patchelf has been reverted to v0.15.2 in master: 61a15be

This means the second part of this PR can be removed, since any new version bump will be to v0.19.3 which fixes that issue. I suggest that we keep and merge the first part (removing the debug object) since (1) this is not needed and (2) it's unclear whether that will still break once the new patchelf is re-introduced.

@hellwolf

hellwolf commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

🥳

Btw, I have a related question. Do you also use "insync-nautilus", does it work for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build failure: insync

3 participants